Skip to content

Commit

Permalink
fixup! test: multichain test of auto-stake-it
Browse files Browse the repository at this point in the history
  • Loading branch information
0xpatrickdev committed Jul 12, 2024
1 parent 3d80104 commit 85c83dc
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions multichain-testing/test/auto-stake-it.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ test('auto-stake-it: creates accts, register tap, transfer to auto-delegate', as
amount = 100n,
) => {
const { staking } = useChain(chainName).chainInfo.chain;
const denom = staking?.staking_tokens[0].denom;
const denom = staking?.staking_tokens?.[0].denom;
if (!denom) throw Error(`no denom for ${chainName}`);

const { client, address, wallet } = await createFundedWalletAndClient(
Expand Down Expand Up @@ -197,12 +197,13 @@ test('auto-stake-it: creates accts, register tap, transfer to auto-delegate', as
const agoricQueryClient = makeQueryClient(
useChain('agoric').getRestEndpoint(),
);
const { hash } = await agoricQueryClient.queryDenom(
const denomTrace = await agoricQueryClient.queryDenom(
`/${portId}/${channelId}`,
chainConfig['osmosis'].denom,
);
t.truthy(hash.length, 'ibc denom hash found');
t.log('ibc denom hash found', hash);

t.truthy(denomTrace.hash, 'ibc denom hash found');
t.log('ibc denom hash found', denomTrace.hash);

// 3. Find a osmosis validator to delegate to
const osmosisQueryClient = makeQueryClient(
Expand Down Expand Up @@ -237,7 +238,7 @@ test('auto-stake-it: creates accts, register tap, transfer to auto-delegate', as
encoding: 'bech32',
chainId: osmosisChainInfo.chain.chain_id,
},
localDenom: `ibc/${hash}`,
localDenom: `ibc/${denomTrace.hash}`,
},
proposal: {},
});
Expand Down

0 comments on commit 85c83dc

Please sign in to comment.