Skip to content

Commit

Permalink
chore: cosmos-orch-account does not require staking denom
Browse files Browse the repository at this point in the history
  • Loading branch information
0xpatrickdev committed Dec 5, 2024
1 parent fe4e78e commit 8694aed
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 14 deletions.
2 changes: 0 additions & 2 deletions packages/orchestration/src/exos/remote-chain-facade.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,6 @@ const prepareRemoteChainFacadeKit = (
makeAccount() {
return asVow(() => {
const { remoteChainInfo, connectionInfo } = this.state;
const stakingDenom = remoteChainInfo.stakingTokens?.[0]?.denom;
if (!stakingDenom) throw Fail`chain info lacks staking denom`;

// icqConnection is ultimately retrieved from state, but let's
// create a connection if it doesn't exist
Expand Down
15 changes: 3 additions & 12 deletions packages/orchestration/test/facade-durability.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ test('chain info', async t => {
t.deepEqual(await vt.when(result.getChainInfo()), mockChainInfo);
});

test('faulty chain info', async t => {
test('missing chain info', async t => {
const { facadeServices, commonPrivateArgs } = await commonSetup(t);

const zone = provideFreshRootZone();
Expand All @@ -99,16 +99,7 @@ test('faulty chain info', async t => {
commonPrivateArgs.marshaller,
);

const { chainHub, orchestrate } = orchKit;

const { stakingTokens, ...sansStakingTokens } = mockChainInfo;

chainHub.registerChain('mock', sansStakingTokens);
chainHub.registerConnection(
'agoric-3',
mockChainInfo.chainId,
mockChainConnection,
);
const { orchestrate } = orchKit;

const handle = orchestrate('mock', {}, async orc => {
const chain = await orc.getChain('mock');
Expand All @@ -117,7 +108,7 @@ test('faulty chain info', async t => {
});

await t.throwsAsync(vt.when(handle()), {
message: 'chain info lacks staking denom',
message: 'chain not found:mock',
});
});

Expand Down

0 comments on commit 8694aed

Please sign in to comment.