@@ -4324,12 +4324,10 @@ func testCustomChannelsDecodeAssetInvoice(ctx context.Context,
4324
4324
4325
4325
// Now that we have our payment request, we'll call into the new decode
4326
4326
// asset pay req call.
4327
- decodeResp , err := aliceTap .DecodeAssetPayReq (
4328
- ctx , & tchrpc.AssetPayReq {
4329
- AssetId : assetID ,
4330
- PayReqString : payReq ,
4331
- },
4332
- )
4327
+ decodeResp , err := aliceTap .DecodeAssetPayReq (ctx , & tchrpc.AssetPayReq {
4328
+ AssetId : assetID ,
4329
+ PayReqString : payReq ,
4330
+ })
4333
4331
require .NoError (t .t , err )
4334
4332
4335
4333
// The decimal display information, genesis, and asset group information
@@ -4344,6 +4342,20 @@ func testCustomChannelsDecodeAssetInvoice(ctx context.Context,
4344
4342
// display 6 that's 100 billion asset units.
4345
4343
const expectedUnits = 100_000_000_000
4346
4344
require .Equal (t .t , int64 (expectedUnits ), int64 (decodeResp .AssetAmount ))
4345
+
4346
+ // We do the same call again, but this time using the group key for the
4347
+ // decoding query.
4348
+ decodeResp2 , err := aliceTap .DecodeAssetPayReq (ctx , & tchrpc.AssetPayReq {
4349
+ GroupKey : usdAsset .AssetGroup .TweakedGroupKey ,
4350
+ PayReqString : payReq ,
4351
+ })
4352
+ require .NoError (t .t , err )
4353
+
4354
+ require .Equal (t .t , decodeResp .AssetAmount , decodeResp2 .AssetAmount )
4355
+ require .Equal (t .t , decodeResp .AssetGroup , decodeResp2 .AssetGroup )
4356
+ require .Equal (
4357
+ t .t , decodeResp .DecimalDisplay , decodeResp2 .DecimalDisplay ,
4358
+ )
4347
4359
}
4348
4360
4349
4361
// testCustomChannelsSelfPayment tests that circular self-payments can be made
0 commit comments