Skip to content

Commit

Permalink
chore(types): concessions to prepack
Browse files Browse the repository at this point in the history
  • Loading branch information
turadg committed Jun 22, 2024
1 parent 9b84bfa commit 6623af5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
11 changes: 8 additions & 3 deletions packages/orchestration/src/examples/sendAnywhere.contract.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ const { Fail } = assert;
* @import {LocalChain} from '@agoric/vats/src/localchain.js';
* @import {OrchestrationService} from '../service.js';
* @import {NameHub} from '@agoric/vats';
* @import {VBankAssetDetail} from '@agoric/vats/tools/board-utils.js';
* @import {Remote} from '@agoric/vow';
*/

Expand Down Expand Up @@ -56,11 +57,15 @@ export const start = async (zcf, privateArgs, baggage) => {

const findBrandInVBank = async brand => {
const assets = await E(
E(privateArgs.agoricNames).lookup('vbankAsset'),
// @ts-expect-error XXX heapVowE
// XXX heapVowE
/** @type {Promise<Promise<NameHub<VBankAssetDetail>>>} */ (
E(privateArgs.agoricNames).lookup('vbankAsset')
),
).values();
const it = assets.find(a => a.brand === brand);
it || Fail`brand ${brand} not in agoricNames.vbankAsset`;
if (!it) {
throw Fail`brand ${brand} not in agoricNames.vbankAsset`;
}
return it;
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -337,14 +337,14 @@ export const prepareLocalOrchestrationAccountKit = (
denom: 'ubld',
};
const { account: lca } = this.state;
/** @type {any} XXX heapVowE */
const results = E(lca).executeTx([
typedJson('/cosmos.staking.v1beta1.MsgUndelegate', {
amount,
validatorAddress,
delegatorAddress: this.state.address.address,
}),
]);
// @ts-expect-error Type 'JsonSafe<MsgUndelegateResponse & { '@type': "/cosmos.staking.v1beta1.MsgUndelegateResponse"; }>' is not assignable to type 'MsgUndelegateResponse'.
return when(watch(results, this.facets.undelegateWatcher));
},
/**
Expand Down

0 comments on commit 6623af5

Please sign in to comment.