@@ -3,6 +3,8 @@ package itest
33import (
44 "context"
55
6+ "github.com/lightninglabs/taproot-assets/internal/test"
7+ "github.com/lightninglabs/taproot-assets/rfqmath"
68 "github.com/lightninglabs/taproot-assets/rfqmsg"
79 tchrpc "github.com/lightninglabs/taproot-assets/taprpc/tapchannelrpc"
810 "github.com/lightningnetwork/lnd/lnrpc"
@@ -66,6 +68,26 @@ func testChannelRPCs(t *harnessTest) {
6668 "payment" ,
6769 )
6870
71+ // Make sure that the minimum satoshi amount for a keysend payment is
72+ // enforced.
73+ stream , err = t .tapd .SendPayment (ctx , & tchrpc.SendPaymentRequest {
74+ AssetAmount : 123 ,
75+ AssetId : dummyByteArr [:],
76+ PaymentRequest : & routerrpc.SendPaymentRequest {
77+ Dest : test .RandPubKey (t .t ).SerializeCompressed (),
78+ DestCustomRecords : map [uint64 ][]byte {
79+ record .KeySendType : dummyByteArr [:],
80+ },
81+ Amt : int64 (rfqmath .DefaultOnChainHtlcSat - 1 ),
82+ },
83+ })
84+ require .NoError (t .t , err )
85+
86+ _ , err = stream .Recv ()
87+ require .ErrorContains (
88+ t .t , err , "keysend payment satoshi amount must be greater" ,
89+ )
90+
6991 // Now let's also try the invoice path, which should fail because we
7092 // don't have any asset channels with peers that we could ask for a
7193 // quote.
0 commit comments