mirror of
https://github.com/lightninglabs/loop.git
synced 2026-08-13 12:33:03 +02:00
multi: move label validation to rpc and simplify validation function
Previously labels with reserved prefixes were added to provide us with a way to identify automatically dispatched loops. This commit moves the validation of these labels to the rpc level so that it will only apply to user-initiated swaps.
This commit is contained in:
parent
15a400b411
commit
7b56804bbe
5 changed files with 16 additions and 21 deletions
|
|
@ -14,7 +14,6 @@ import (
|
|||
"github.com/btcsuite/btcd/chaincfg/chainhash"
|
||||
"github.com/btcsuite/btcd/wire"
|
||||
"github.com/lightninglabs/lndclient"
|
||||
"github.com/lightninglabs/loop/labels"
|
||||
"github.com/lightninglabs/loop/loopdb"
|
||||
"github.com/lightninglabs/loop/swap"
|
||||
"github.com/lightningnetwork/lnd/chainntnfs"
|
||||
|
|
@ -79,11 +78,6 @@ func newLoopInSwap(globalCtx context.Context, cfg *swapConfig,
|
|||
currentHeight int32, request *LoopInRequest) (*loopInInitResult,
|
||||
error) {
|
||||
|
||||
// Before we start, check that the label is valid.
|
||||
if err := labels.Validate(request.Label); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// Request current server loop in terms and use these to calculate the
|
||||
// swap fee that we should subtract from the swap amount in the payment
|
||||
// request that we send to the server.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue