From 9a8962a34689b0bf22a92d4b7c08388c5e3cdbba Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Fri, 21 Jun 2024 11:43:53 -0700 Subject: [PATCH] chore(types): concessions to prepack --- .../src/examples/sendAnywhere.contract.js | 11 ++++++++--- .../src/exos/local-orchestration-account.js | 2 +- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/packages/orchestration/src/examples/sendAnywhere.contract.js b/packages/orchestration/src/examples/sendAnywhere.contract.js index 45e8e0d37b0f..5fefa84713cf 100644 --- a/packages/orchestration/src/examples/sendAnywhere.contract.js +++ b/packages/orchestration/src/examples/sendAnywhere.contract.js @@ -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'; */ @@ -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>>} */ ( + 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; }; diff --git a/packages/orchestration/src/exos/local-orchestration-account.js b/packages/orchestration/src/exos/local-orchestration-account.js index a82b4cfe11ce..c183bbd06d86 100644 --- a/packages/orchestration/src/exos/local-orchestration-account.js +++ b/packages/orchestration/src/exos/local-orchestration-account.js @@ -337,6 +337,7 @@ 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, @@ -344,7 +345,6 @@ export const prepareLocalOrchestrationAccountKit = ( delegatorAddress: this.state.address.address, }), ]); - // @ts-expect-error Type 'JsonSafe' is not assignable to type 'MsgUndelegateResponse'. return when(watch(results, this.facets.undelegateWatcher)); }, /**