diff --git a/packages/fast-usdc/test/fast-usdc.contract.test.ts b/packages/fast-usdc/test/fast-usdc.contract.test.ts index 38e80e76e71..4648332272f 100644 --- a/packages/fast-usdc/test/fast-usdc.contract.test.ts +++ b/packages/fast-usdc/test/fast-usdc.contract.test.ts @@ -633,10 +633,14 @@ const makeCustomer = ( const myMsg = local.find(lm => { if (lm.type !== 'VLOCALCHAIN_EXECUTE_TX') return false; const [ibcTransferMsg] = lm.messages; + // support advances to noble + other chains + const receiver = + ibcTransferMsg.receiver === 'pfm' + ? JSON.parse(ibcTransferMsg.memo).forward.receiver + : ibcTransferMsg.receiver; return ( ibcTransferMsg['@type'] === - '/ibc.applications.transfer.v1.MsgTransfer' && - ibcTransferMsg.receiver === EUD + '/ibc.applications.transfer.v1.MsgTransfer' && receiver === EUD ); }); if (!myMsg) { @@ -652,17 +656,24 @@ const makeCustomer = ( { amount: String(toReceive.value), denom: uusdcOnAgoric }, 'C4', ); - - t.log(who, 'sees', ibcTransferMsg.token, 'sent to', EUD); - // TODO #10445 expect PFM memo - t.is(ibcTransferMsg.memo, '', 'TODO expecting PFM memo'); - - // TODO #10445 expect routing through noble, not osmosis + if (!EUD.startsWith('noble')) { + t.like( + JSON.parse(ibcTransferMsg.memo), + { + forward: { + receiver: EUD, + }, + }, + 'PFM receiver is EUD', + ); + } else { + t.like(ibcTransferMsg, { receiver: EUD }); + } t.is( ibcTransferMsg.sourceChannel, - fetchedChainInfo.agoric.connections['osmosis-1'].transferChannel + fetchedChainInfo.agoric.connections['noble-1'].transferChannel .channelId, - 'TODO expecting routing through Noble', + 'expect routing through Noble', ); }, }); diff --git a/packages/fast-usdc/test/snapshots/fast-usdc.contract.test.ts.md b/packages/fast-usdc/test/snapshots/fast-usdc.contract.test.ts.md index ece2a6e83cd..72890a09ece 100644 --- a/packages/fast-usdc/test/snapshots/fast-usdc.contract.test.ts.md +++ b/packages/fast-usdc/test/snapshots/fast-usdc.contract.test.ts.md @@ -43,6 +43,7 @@ Generated by [AVA](https://avajs.dev). bech32Prefix: 'agoric', chainId: 'agoric-3', icqEnabled: false, + pfmEnabled: true, stakingTokens: [ { denom: 'ubld', @@ -53,11 +54,13 @@ Generated by [AVA](https://avajs.dev). bech32Prefix: 'noble', chainId: 'noble-1', icqEnabled: false, + pfmEnabled: true, }, osmosis: { bech32Prefix: 'osmo', chainId: 'osmosis-1', icqEnabled: true, + pfmEnabled: true, stakingTokens: [ { denom: 'uosmo', diff --git a/packages/fast-usdc/test/snapshots/fast-usdc.contract.test.ts.snap b/packages/fast-usdc/test/snapshots/fast-usdc.contract.test.ts.snap index b4f6db225e5..c289cbdd0bb 100644 Binary files a/packages/fast-usdc/test/snapshots/fast-usdc.contract.test.ts.snap and b/packages/fast-usdc/test/snapshots/fast-usdc.contract.test.ts.snap differ diff --git a/packages/fast-usdc/test/supports.ts b/packages/fast-usdc/test/supports.ts index 2c9154ab227..7a64bcf2ff2 100644 --- a/packages/fast-usdc/test/supports.ts +++ b/packages/fast-usdc/test/supports.ts @@ -4,6 +4,7 @@ import { makeFakeStorageKit } from '@agoric/internal/src/storage-test-utils.js'; import { eventLoopIteration } from '@agoric/internal/src/testing-utils.js'; import { denomHash, + withChainCapabilities, type CosmosChainInfo, type Denom, } from '@agoric/orchestration'; @@ -196,7 +197,7 @@ export const commonSetup = async (t: ExecutionContext) => { ); const chainInfo = harden(() => { - const { agoric, osmosis, noble } = fetchedChainInfo; + const { agoric, osmosis, noble } = withChainCapabilities(fetchedChainInfo); return { agoric, osmosis, noble }; })();