We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d48feca commit 668c697Copy full SHA for 668c697
cmd/litcli/ln.go
@@ -216,6 +216,13 @@ func (w *resultStreamWrapper) Recv() (*lnrpc.Payment, error) {
216
amountMsat := lnwire.MilliSatoshi(w.amountMsat)
217
milliSatsFP := rfqmath.MilliSatoshiToUnits(amountMsat, *rate)
218
numUnits := milliSatsFP.ScaleTo(0).ToUint64()
219
+ if numUnits == 0 {
220
+ return nil, fmt.Errorf("asset rate %v not sufficient "+
221
+ "to represent value of %v",
222
+ rate.ToUint64(), amountMsat,
223
+ )
224
+ }
225
+
226
msatPerUnit := uint64(w.amountMsat) / numUnits
227
228
fmt.Printf("Got quote for %v asset units at %v msat/unit from "+
0 commit comments