@@ -1423,13 +1423,15 @@ func sendAssetKeySendPayment(t *testing.T, src, dst *HarnessNode, amt uint64,
14231423 return
14241424 }
14251425
1426- result , _ , err := getAssetPaymentResult (t , stream , false )
1426+ tapPayment , err := getAssetPaymentResult (t , stream , false )
14271427 require .NoError (t , err )
1428- if result .Status == lnrpc .Payment_FAILED {
1429- t .Logf ("Failure reason: %v" , result .FailureReason )
1428+
1429+ payment := tapPayment .lndPayment
1430+ if payment .Status == lnrpc .Payment_FAILED {
1431+ t .Logf ("Failure reason: %v" , payment .FailureReason )
14301432 }
1431- require .Equal (t , cfg .payStatus , result .Status )
1432- require .Equal (t , cfg .failureReason , result .FailureReason )
1433+ require .Equal (t , cfg .payStatus , payment .Status )
1434+ require .Equal (t , cfg .failureReason , payment .FailureReason )
14331435}
14341436
14351437func sendKeySendPayment (t * testing.T , src , dst * HarnessNode ,
@@ -1755,12 +1757,13 @@ func payInvoiceWithAssets(t *testing.T, payer, rfqPeer *HarnessNode,
17551757 sendReq .MaxShardSizeMsat = 80_000_000
17561758 }
17571759
1758- var rfqBytes , peerPubKey []byte
1760+ var rfqBytes []byte
17591761 cfg .rfq .WhenSome (func (i rfqmsg.ID ) {
17601762 rfqBytes = make ([]byte , len (i [:]))
17611763 copy (rfqBytes , i [:])
17621764 })
17631765
1766+ var peerPubKey []byte
17641767 if rfqPeer != nil {
17651768 peerPubKey = rfqPeer .PubKey [:]
17661769 }
@@ -1785,7 +1788,7 @@ func payInvoiceWithAssets(t *testing.T, payer, rfqPeer *HarnessNode,
17851788
17861789 // If an error is returned by the RPC method (meaning the stream itself
17871790 // was established, no network or auth error), we expect the error to be
1788- // returned on the first read on the stream.
1791+ // returned on the stream.
17891792 if cfg .errSubStr != "" {
17901793 msg , err := stream .Recv ()
17911794
@@ -1804,14 +1807,18 @@ func payInvoiceWithAssets(t *testing.T, payer, rfqPeer *HarnessNode,
18041807 rateVal rfqmath.FixedPoint [rfqmath.BigInt ]
18051808 )
18061809
1807- result , rateVal , err := getAssetPaymentResult (
1810+ tapPayment , err := getAssetPaymentResult (
18081811 t , stream , cfg .payStatus == lnrpc .Payment_IN_FLIGHT ,
18091812 )
18101813 require .NoError (t , err )
1811- require .Equal (t , cfg .payStatus , result .Status )
1812- require .Equal (t , cfg .failureReason , result .FailureReason )
1814+
1815+ payment := tapPayment .lndPayment
1816+ require .Equal (t , cfg .payStatus , payment .Status )
1817+ require .Equal (t , cfg .failureReason , payment .FailureReason )
18131818
18141819 amountMsat := lnwire .MilliSatoshi (decodedInvoice .NumMsat )
1820+
1821+ rateVal = tapPayment .assetRate
18151822 milliSatsFP := rfqmath .MilliSatoshiToUnits (amountMsat , rateVal )
18161823 numUnits = milliSatsFP .ScaleTo (0 ).ToUint64 ()
18171824
0 commit comments