Closed huumn closed 3 years ago
Did you pass 0 or '0'?
// create the payment, subscribing to its status
const sub = subscribeToPayViaRequest({
lnd,
request: invoice,
// can't use max_fee_mtokens https://github.com/alexbosworth/ln-service/issues/141
// max_fee: Number(maxFee),
max_fee_mtokens: 0,
pathfinding_timeout: 30000
})
Ok yes that's because max fee mtokens must be a string and not a Number. All mtoken
values must be strings because JS cannot represent them in the Number, they are too large
I've added a check on this to error earlier
Ah! Good to know. I've probably made that same mistake elsewhere. Thank you!
package.json
I was testing route finding failures in my LAPP with max_fee_mtokens=0 but the payment kept succeeding with fees. Setting max_fee=0 gave the expected behavior (routing failed).