multi: surface server swap initiation grpc error codes

Formatting our error was stifling any grpc error returned by the
server. Instead, we bubble up our grpc error, setting an unknown
code if the server did not specifically return an error code.
This commit is contained in:
carla 2021-07-19 10:01:33 +02:00
parent e7ee29bd83
commit d1c26a20da
No known key found for this signature in database
GPG key ID: 4CA7FE54A6213C91
5 changed files with 59 additions and 8 deletions

View file

@ -4,15 +4,14 @@ import (
"context"
"testing"
"github.com/btcsuite/btcd/wire"
"github.com/btcsuite/btcutil"
"github.com/lightninglabs/loop/loopdb"
"github.com/lightninglabs/loop/swap"
"github.com/lightninglabs/loop/test"
"github.com/lightningnetwork/lnd/chainntnfs"
"github.com/lightningnetwork/lnd/channeldb"
"github.com/stretchr/testify/require"
"github.com/btcsuite/btcd/wire"
"github.com/btcsuite/btcutil"
)
var (