Skip to content

Commit

Permalink
fix: brandKey not part of DenomDetail
Browse files Browse the repository at this point in the history
- also, dont iterate over connections if there arent any
  • Loading branch information
0xpatrickdev committed Nov 28, 2024
1 parent 314e0bf commit 0efdf3d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -539,14 +539,12 @@ Generated by [AVA](https://avajs.dev).
'ibc/498A0751C798A0D9A389AA3691123DADA57DAA4FE165D5C75894505B876BA6E4': {
baseDenom: 'uusdc',
baseName: 'noble',
brandKey: undefined,
chainName: 'osmosis',
},
'ibc/FE98AAD68F02F03565E9FA39A5E627946699B2B07115889ED812D8BA639576A9': {
baseDenom: 'uusdc',
baseName: 'noble',
brand: Object @Alleged: USDC brand {},
brandKey: 'USDC',
chainName: 'agoric',
},
uusdc: {
Expand Down
Binary file modified packages/fast-usdc/test/snapshots/fast-usdc.contract.test.ts.snap
Binary file not shown.
9 changes: 5 additions & 4 deletions packages/orchestration/src/utils/chain-hub-helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export const registerChainsAndAssets = (
for (const [chainName, allInfo] of Object.entries(chainInfo)) {
const { connections, ...info } = allInfo;
chainHub.registerChain(chainName, info);
conns[info.chainId] = connections;
if (connections) conns[info.chainId] = connections;
}
const registeredPairs = new Set();
for (const [pChainId, connInfos] of Object.entries(conns)) {
Expand All @@ -48,9 +48,10 @@ export const registerChainsAndAssets = (
return;
}
for (const [denom, info] of Object.entries(assetInfo)) {
const infoWithBrand = info.brandKey
? { ...info, brand: brands[info.brandKey] }
: info;
const { brandKey, ...rest } = info;
const infoWithBrand = brandKey
? { ...rest, brand: brands[brandKey] }
: rest;
chainHub.registerAsset(denom, infoWithBrand);
}
};

0 comments on commit 0efdf3d

Please sign in to comment.