itest: scope down asset in decode-payreq itest

Changes the itest asset used in the decode payreq itest to instead be a
new variable declared within the scope of the itest. This prevents
mutating the global asset that is re-used by other test cases and would
lead to failures otherwise.

Thanks @jtobin for spotting.

Co-authored-by: Jared Tobin <jared@jtobin.io>
This commit is contained in:
George Tsagkarelis 2025-10-14 15:59:01 +02:00
parent 5406373adf
commit d2ff63cc81
No known key found for this signature in database
GPG key ID: E08DEA9B12B66AF6

View file

@ -3766,7 +3766,7 @@ func testCustomChannelsOraclePricing(ctx context.Context, net *NetworkHarness,
}
const decimalDisplay = 6
itestAsset = &mintrpc.MintAsset{
tcAsset := &mintrpc.MintAsset{
AssetType: taprpc.AssetType_NORMAL,
Name: "USD",
AssetMeta: usdMetaData,
@ -3862,7 +3862,7 @@ func testCustomChannelsOraclePricing(ctx context.Context, net *NetworkHarness,
t.t, t.lndHarness.Miner.Client, charlieTap,
[]*mintrpc.MintAssetRequest{
{
Asset: itestAsset,
Asset: tcAsset,
},
},
)
@ -4648,7 +4648,7 @@ func testCustomChannelsDecodeAssetInvoice(ctx context.Context,
}
const decimalDisplay = 6
itestAsset = &mintrpc.MintAsset{
tcAsset := &mintrpc.MintAsset{
AssetType: taprpc.AssetType_NORMAL,
Name: "USD",
AssetMeta: usdMetaData,
@ -4664,7 +4664,7 @@ func testCustomChannelsDecodeAssetInvoice(ctx context.Context,
t.t, t.lndHarness.Miner.Client, aliceTap,
[]*mintrpc.MintAssetRequest{
{
Asset: itestAsset,
Asset: tcAsset,
},
},
)