diff --git a/packages/orchestration/test/supports.ts b/packages/orchestration/test/supports.ts index 303df00c883f..d90c32d8fcbe 100644 --- a/packages/orchestration/test/supports.ts +++ b/packages/orchestration/test/supports.ts @@ -2,6 +2,7 @@ import { makeIssuerKit } from '@agoric/ertp'; import { VTRANSFER_IBC_EVENT } from '@agoric/internal'; import { makeFakeStorageKit } from '@agoric/internal/src/storage-test-utils.js'; import { prepareLocalChainTools } from '@agoric/vats/src/localchain.js'; +import { prepareBridgeTargetModule } from '@agoric/vats/src/bridge-target.js'; import { prepareTransferTools } from '@agoric/vats/src/transfer.js'; import { makeFakeBankManagerKit } from '@agoric/vats/tools/bank-utils.js'; import { makeFakeBoard } from '@agoric/vats/tools/board-utils.js'; @@ -51,7 +52,10 @@ export const commonSetup = async t => { ); const transferBridge = makeFakeTransferBridge(rootZone); - const { makeTransferMiddleware, makeBridgeTargetKit } = prepareTransferTools( + const { makeBridgeTargetKit } = prepareBridgeTargetModule( + rootZone.subZone('bridge'), + ); + const { makeTransferMiddleware } = prepareTransferTools( rootZone.subZone('transfer'), prepareVowTools(rootZone.subZone('vows')), ); diff --git a/packages/vats/src/transfer.js b/packages/vats/src/transfer.js index 72afce611aa0..936b098d2a3f 100644 --- a/packages/vats/src/transfer.js +++ b/packages/vats/src/transfer.js @@ -3,7 +3,7 @@ import { E } from '@endo/far'; import { M } from '@endo/patterns'; import { VTRANSFER_IBC_EVENT } from '@agoric/internal'; import { coerceToByteSource, byteSourceToBase64 } from '@agoric/network'; -import { prepareBridgeTargetModule, TargetAppI } from './bridge-target.js'; +import { TargetAppI } from './bridge-target.js'; /** * @import {TargetApp, TargetHost} from './bridge-target.js' @@ -228,15 +228,10 @@ const prepareTransferMiddleware = (zone, makeTransferInterceptor) => */ export const prepareTransferTools = (zone, vowTools) => { const makeTransferInterceptor = prepareTransferInterceptor(zone, vowTools); - const { makeBridgeTargetKit } = prepareBridgeTargetModule( - zone.subZone('bridge-target'), - ); - const makeTransferMiddleware = prepareTransferMiddleware( zone, makeTransferInterceptor, ); - - return harden({ makeTransferMiddleware, makeBridgeTargetKit }); + return harden({ makeTransferMiddleware }); }; harden(prepareTransferTools); diff --git a/packages/vats/test/localchain.test.js b/packages/vats/test/localchain.test.js index 418160bcd078..d6eb8169bf0c 100644 --- a/packages/vats/test/localchain.test.js +++ b/packages/vats/test/localchain.test.js @@ -11,6 +11,7 @@ import { getInterfaceOf } from '@endo/marshal'; import { VTRANSFER_IBC_EVENT } from '@agoric/internal'; import { prepareVowTools } from '@agoric/vow/vat.js'; import { prepareLocalChainTools } from '../src/localchain.js'; +import { prepareBridgeTargetModule } from '../src/bridge-target.js'; import { prepareTransferTools } from '../src/transfer.js'; import { makeFakeBankManagerKit } from '../tools/bank-utils.js'; import { @@ -45,13 +46,15 @@ const makeTestContext = async _t => { ); const transferZone = makeDurableZone(provideBaggage('transfer')); - const transferBridge = makeFakeTransferBridge(transferZone.subZone('bridge')); - const transferTools = prepareTransferTools( + const bridgeZone = transferZone.subZone('bridge'); + const transferBridge = makeFakeTransferBridge(bridgeZone); + const { makeBridgeTargetKit } = prepareBridgeTargetModule(bridgeZone); + const { makeTransferMiddleware } = prepareTransferTools( transferZone, prepareVowTools(transferZone.subZone('vows')), ); - const transferMiddleware = transferTools.makeTransferMiddleware( - transferTools.makeBridgeTargetKit(transferBridge, VTRANSFER_IBC_EVENT), + const transferMiddleware = makeTransferMiddleware( + makeBridgeTargetKit(transferBridge, VTRANSFER_IBC_EVENT), ); const { bankManager, pourPayment } = await makeFakeBankManagerKit({