diff --git a/packages/orchestration/src/exos/agoric-names-tools.js b/packages/orchestration/src/exos/agoric-names-tools.js index cc36ee065f5..b6280b77180 100644 --- a/packages/orchestration/src/exos/agoric-names-tools.js +++ b/packages/orchestration/src/exos/agoric-names-tools.js @@ -41,7 +41,7 @@ export const makeResumableAgoricNamesHack = ( }), vbankAssetEntriesWatcher: M.interface('vbankAssetEntriesWatcher', { onFulfilled: M.call(M.arrayOf(M.record())) - .optional({ brand: BrandShape }) + .optional(BrandShape) .returns(VowShape), }), }, @@ -55,9 +55,9 @@ export const makeResumableAgoricNamesHack = ( vbankAssetEntriesWatcher: { /** * @param {AssetInfo[]} assets - * @param {{ brand: Brand<'nat'> }} ctx + * @param {Brand<'nat'>} brand */ - onFulfilled(assets, { brand }) { + onFulfilled(assets, brand) { return asVow(() => { const { vbankAssetsByBrand } = this.state; vbankAssetsByBrand.addAll( @@ -96,7 +96,7 @@ export const makeResumableAgoricNamesHack = ( return watch( vbankAssetEntriesP, this.facets.vbankAssetEntriesWatcher, - { brand }, + brand, ); }); }, diff --git a/packages/orchestration/src/exos/local-orchestration-account.js b/packages/orchestration/src/exos/local-orchestration-account.js index a99ef53164e..be4edc4efaf 100644 --- a/packages/orchestration/src/exos/local-orchestration-account.js +++ b/packages/orchestration/src/exos/local-orchestration-account.js @@ -92,7 +92,7 @@ export const prepareLocalOrchestrationAccountKit = ( }), getChainInfoWatcher: M.interface('getChainInfoWatcher', { onFulfilled: M.call(M.record()) // agoric chain info - .optional({ destination: ChainAddressShape }) + .optional(ChainAddressShape) .returns(Vow$(M.record())), // connection info }), transferWatcher: M.interface('transferWatcher', { @@ -116,9 +116,7 @@ export const prepareLocalOrchestrationAccountKit = ( }), getBalanceWatcher: M.interface('getBalanceWatcher', { onFulfilled: M.call(AmountShape) - .optional({ - denom: DenomShape, - }) + .optional(DenomShape) .returns(DenomAmountShape), }), invitationMakers: M.interface('invitationMakers', { @@ -196,9 +194,9 @@ export const prepareLocalOrchestrationAccountKit = ( getChainInfoWatcher: { /** * @param {ChainInfo} agoricChainInfo - * @param {{ destination: ChainAddress }} ctx + * @param {ChainAddress} destination */ - onFulfilled(agoricChainInfo, { destination }) { + onFulfilled(agoricChainInfo, destination) { return chainHub.getConnectionInfo( agoricChainInfo.chainId, destination.chainId, @@ -263,7 +261,7 @@ export const prepareLocalOrchestrationAccountKit = ( */ returnVoidWatcher: { /** - * @param {any} _result + * @param {unknown} _result */ onFulfilled(_result) { return undefined; @@ -276,10 +274,10 @@ export const prepareLocalOrchestrationAccountKit = ( getBalanceWatcher: { /** * @param {Amount<'nat'>} natAmount - * @param {{ denom: DenomAmount['denom'] }} ctx + * @param {DenomAmount['denom']} denom * @returns {DenomAmount} */ - onFulfilled(natAmount, { denom }) { + onFulfilled(natAmount, denom) { return harden({ denom, value: natAmount.value }); }, }, @@ -300,7 +298,7 @@ export const prepareLocalOrchestrationAccountKit = ( return watch( E(this.state.account).getBalance(brand), this.facets.getBalanceWatcher, - { denom }, + denom, ); }, getBalances() { @@ -413,7 +411,7 @@ export const prepareLocalOrchestrationAccountKit = ( const connectionInfoV = watch( chainHub.getChainInfo('agoric'), this.facets.getChainInfoWatcher, - { destination }, + destination, ); // set a `timeoutTimestamp` if caller does not supply either `timeoutHeight` or `timeoutTimestamp` diff --git a/packages/orchestration/src/exos/remote-chain-facade.js b/packages/orchestration/src/exos/remote-chain-facade.js index 0b6c4efa833..a88d903d60c 100644 --- a/packages/orchestration/src/exos/remote-chain-facade.js +++ b/packages/orchestration/src/exos/remote-chain-facade.js @@ -54,7 +54,7 @@ const prepareRemoteChainFacadeKit = ( public: ChainFacadeI, makeAccountWatcher: M.interface('makeAccountWatcher', { onFulfilled: M.call(M.remotable()) - .optional({ stakingDenom: M.string() }) + .optional(M.string()) .returns(VowShape), }), getAddressWatcher: M.interface('makeAccountWatcher', { @@ -95,9 +95,7 @@ const prepareRemoteChainFacadeKit = ( connectionInfo.counterparty.connection_id, ), this.facets.makeAccountWatcher, - { - stakingDenom, - }, + stakingDenom, ); }); }, @@ -105,9 +103,9 @@ const prepareRemoteChainFacadeKit = ( makeAccountWatcher: { /** * @param {IcaAccount} account - * @param {{ stakingDenom: Denom }} ctx + * @param {Denom} stakingDenom */ - onFulfilled(account, { stakingDenom }) { + onFulfilled(account, stakingDenom) { return watch(E(account).getAddress(), this.facets.getAddressWatcher, { stakingDenom, account,