Skip to content

Commit bb35e03

Browse files
committed
assetclient: fix wrong fee limit
1 parent 684db85 commit bb35e03

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

assets/client.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,12 @@ func (c *TapdClient) GetRfqForAsset(ctx context.Context,
105105
expiry int64, feeLimitMultiplier float64) (
106106
*rfqrpc.PeerAcceptedSellQuote, error) {
107107

108+
// FeeLimit is the maximum amount we are willing to pay for the payment.
109+
// E.g. on a 250k sats payment we'll multiply the sat amount by 1.2.
110+
// The resulting maximum amount we're willing to pay is 300k sats.
111+
// The response asset amount will be for those 300k sats.
108112
feeLimit, err := lnrpc.UnmarshallAmt(
109-
int64(satAmount)+int64(satAmount.MulF64(feeLimitMultiplier)), 0,
113+
int64(satAmount.MulF64(feeLimitMultiplier)), 0,
110114
)
111115
if err != nil {
112116
return nil, err

0 commit comments

Comments
 (0)