From 31e82eb982f437181c6c455e59c120b6e78c7601 Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Wed, 2 Oct 2024 08:52:13 -0700 Subject: [PATCH] chore(types): LOA implements LocalAccountMethods --- packages/orchestration/src/examples/stake-bld.contract.js | 2 ++ .../orchestration/src/exos/local-orchestration-account.js | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/orchestration/src/examples/stake-bld.contract.js b/packages/orchestration/src/examples/stake-bld.contract.js index f51136e2629..db657e1235c 100644 --- a/packages/orchestration/src/examples/stake-bld.contract.js +++ b/packages/orchestration/src/examples/stake-bld.contract.js @@ -111,6 +111,8 @@ export const start = async (zcf, privateArgs, baggage) => { const { give } = seat.getProposal(); trace('makeStakeBldInvitation', give); const { holder } = await makeLocalAccountKit(); + /** @type {Record>} */ + // @ts-expect-error XXX PaymentPKeywordRecord throught deeplyFulfilled will be a PaymnentKeywordRecord const { In } = await deeplyFulfilled( withdrawFromSeat(zcf, seat, give), ); diff --git a/packages/orchestration/src/exos/local-orchestration-account.js b/packages/orchestration/src/exos/local-orchestration-account.js index cb75695dc35..bc5e1f2a48a 100644 --- a/packages/orchestration/src/exos/local-orchestration-account.js +++ b/packages/orchestration/src/exos/local-orchestration-account.js @@ -28,7 +28,7 @@ import { coerceCoin, coerceDenomAmount } from '../utils/amounts.js'; /** * @import {HostOf} from '@agoric/async-flow'; * @import {LocalChain, LocalChainAccount} from '@agoric/vats/src/localchain.js'; - * @import {AmountArg, ChainAddress, DenomAmount, IBCMsgTransferOptions, IBCConnectionInfo, OrchestrationAccountI} from '@agoric/orchestration'; + * @import {AmountArg, ChainAddress, DenomAmount, IBCMsgTransferOptions, IBCConnectionInfo, OrchestrationAccountI, LocalAccountMethods} from '@agoric/orchestration'; * @import {RecorderKit, MakeRecorderKit} from '@agoric/zoe/src/contractSupport/recorder.js'. * @import {Zone} from '@agoric/zone'; * @import {Remote} from '@agoric/internal'; @@ -613,14 +613,14 @@ export const prepareLocalOrchestrationAccountKit = ( * updater will get a special notification that the account is being * transferred. */ - /** @type {HostOf} */ + /** @type {HostOf} */ deposit(payment) { return watch( E(this.state.account).deposit(payment), this.facets.returnVoidWatcher, ); }, - /** @type {HostOf} */ + /** @type {HostOf} */ withdraw(amount) { return watch(E(this.state.account).withdraw(amount)); }, @@ -733,7 +733,7 @@ export const prepareLocalOrchestrationAccountKit = ( matchFirstPacket(patternV) { return watch(E(this.state.packetTools).matchFirstPacket(patternV)); }, - /** @type {HostOf} */ + /** @type {HostOf} */ monitorTransfers(tap) { return watch(E(this.state.packetTools).monitorTransfers(tap)); },