mirror of
https://github.com/lightninglabs/loop.git
synced 2026-08-18 13:08:28 +02:00
multi: fix most obvious linter errors
This commit is contained in:
parent
1cdb233a00
commit
36838cf7f4
21 changed files with 41 additions and 50 deletions
|
|
@ -41,8 +41,7 @@ func loopIn(ctx *cli.Context) error {
|
|||
args = args.Tail()
|
||||
default:
|
||||
// Show command help if no arguments and flags were provided.
|
||||
cli.ShowCommandHelp(ctx, "in")
|
||||
return nil
|
||||
return cli.ShowCommandHelp(ctx, "in")
|
||||
}
|
||||
|
||||
amt, err := parseAmt(amtStr)
|
||||
|
|
|
|||
|
|
@ -59,8 +59,7 @@ func loopOut(ctx *cli.Context) error {
|
|||
args = args.Tail()
|
||||
default:
|
||||
// Show command help if no arguments and flags were provided.
|
||||
cli.ShowCommandHelp(ctx, "out")
|
||||
return nil
|
||||
return cli.ShowCommandHelp(ctx, "out")
|
||||
}
|
||||
|
||||
amt, err := parseAmt(amtStr)
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ type limits struct {
|
|||
}
|
||||
|
||||
func getLimits(amt btcutil.Amount, quote *looprpc.QuoteResponse) *limits {
|
||||
maxSwapRoutingFee := getMaxRoutingFee(btcutil.Amount(amt))
|
||||
maxSwapRoutingFee := getMaxRoutingFee(amt)
|
||||
maxPrepayRoutingFee := getMaxRoutingFee(btcutil.Amount(
|
||||
quote.PrepayAmt,
|
||||
))
|
||||
|
|
@ -126,7 +126,7 @@ func displayLimits(swapType loop.Type, amt btcutil.Amount, l *limits,
|
|||
if l.maxPrepayRoutingFee != nil {
|
||||
totalSuccessMax += *l.maxPrepayRoutingFee
|
||||
}
|
||||
|
||||
|
||||
if swapType == loop.TypeIn && externalHtlc {
|
||||
fmt.Printf("On-chain fee for external loop in is not " +
|
||||
"included.\nSufficient fees will need to be paid " +
|
||||
|
|
@ -135,7 +135,7 @@ func displayLimits(swapType loop.Type, amt btcutil.Amount, l *limits,
|
|||
}
|
||||
|
||||
fmt.Printf("Max swap fees for %d Loop %v: %d\n",
|
||||
btcutil.Amount(amt), swapType, totalSuccessMax,
|
||||
amt, swapType, totalSuccessMax,
|
||||
)
|
||||
|
||||
fmt.Printf("CONTINUE SWAP? (y/n), expand fee detail (x): ")
|
||||
|
|
|
|||
|
|
@ -28,8 +28,7 @@ func quote(ctx *cli.Context) error {
|
|||
// Show command help if the incorrect number arguments and/or flags were
|
||||
// provided.
|
||||
if ctx.NArg() != 1 || ctx.NumFlags() > 1 {
|
||||
cli.ShowCommandHelp(ctx, "quote")
|
||||
return nil
|
||||
return cli.ShowCommandHelp(ctx, "quote")
|
||||
}
|
||||
|
||||
args := ctx.Args()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue