@@ -4208,12 +4208,10 @@ func testCustomChannelsDecodeAssetInvoice(ctx context.Context,
4208
4208
4209
4209
// Now that we have our payment request, we'll call into the new decode
4210
4210
// asset pay req call.
4211
- decodeResp , err := aliceTap .DecodeAssetPayReq (
4212
- ctx , & tchrpc.AssetPayReq {
4213
- AssetId : assetID ,
4214
- PayReqString : payReq ,
4215
- },
4216
- )
4211
+ decodeResp , err := aliceTap .DecodeAssetPayReq (ctx , & tchrpc.AssetPayReq {
4212
+ AssetId : assetID ,
4213
+ PayReqString : payReq ,
4214
+ })
4217
4215
require .NoError (t .t , err )
4218
4216
4219
4217
// The decimal display information, genesis, and asset group information
@@ -4228,4 +4226,18 @@ func testCustomChannelsDecodeAssetInvoice(ctx context.Context,
4228
4226
// display 6 that's 100 billion asset units.
4229
4227
const expectedUnits = 100_000_000_000
4230
4228
require .Equal (t .t , int64 (expectedUnits ), int64 (decodeResp .AssetAmount ))
4229
+
4230
+ // We do the same call again, but this time using the group key for the
4231
+ // decoding query.
4232
+ decodeResp2 , err := aliceTap .DecodeAssetPayReq (ctx , & tchrpc.AssetPayReq {
4233
+ GroupKey : usdAsset .AssetGroup .TweakedGroupKey ,
4234
+ PayReqString : payReq ,
4235
+ })
4236
+ require .NoError (t .t , err )
4237
+
4238
+ require .Equal (t .t , decodeResp .AssetAmount , decodeResp2 .AssetAmount )
4239
+ require .Equal (t .t , decodeResp .AssetGroup , decodeResp2 .AssetGroup )
4240
+ require .Equal (
4241
+ t .t , decodeResp .DecimalDisplay , decodeResp2 .DecimalDisplay ,
4242
+ )
4231
4243
}
0 commit comments