From 93f404e4e0954c4b7329f478414d211744e3d959 Mon Sep 17 00:00:00 2001 From: 0xPatrick Date: Tue, 10 Dec 2024 16:18:11 -0500 Subject: [PATCH] chore: ensure latest view on vbank entries - in the testing environment, we might see multiple USDC entries in `vbankAsset`. This change ensures the `byName` record contains the values needed for the test, reliant on the consistent ordering currently present in `vbankAsset` entries --- multichain-testing/tools/e2e-tools.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/multichain-testing/tools/e2e-tools.js b/multichain-testing/tools/e2e-tools.js index b2a77f1a4fb..6ad5575acb7 100644 --- a/multichain-testing/tools/e2e-tools.js +++ b/multichain-testing/tools/e2e-tools.js @@ -144,9 +144,9 @@ export const provisionSmartWallet = async ( // TODO: skip this query if balances is {} const vbankEntries = await q.queryData('published.agoricNames.vbankAsset'); const byName = Object.fromEntries( - vbankEntries.map(([denom, info]) => { - /// XXX better way to filter out old ATOM denom? - if (denom === 'ibc/toyatom') return [undefined, undefined]; + // reverse entries, so we get the latest view on the denom since there are + // multiple entries in the testing environment + [...vbankEntries].reverse().map(([_, info]) => { return [info.issuerName, info]; }), );