diff --git a/packages/boot/test/fast-usdc/fast-usdc.test.ts b/packages/boot/test/fast-usdc/fast-usdc.test.ts index 14f04876108..3c17e8b6f55 100644 --- a/packages/boot/test/fast-usdc/fast-usdc.test.ts +++ b/packages/boot/test/fast-usdc/fast-usdc.test.ts @@ -271,6 +271,7 @@ test.serial('makes usdc advance', async t => { const doc = { node: `fastUsdc.txns`, owner: `the Ethereum transactions upon which Fast USDC is acting`, + showValue: defaultSerializer.parse, }; await documentStorageSchema(t, storage, doc); }); diff --git a/packages/boot/test/fast-usdc/snapshots/fast-usdc.test.ts.md b/packages/boot/test/fast-usdc/snapshots/fast-usdc.test.ts.md index a755652de7a..eae055ef42a 100644 --- a/packages/boot/test/fast-usdc/snapshots/fast-usdc.test.ts.md +++ b/packages/boot/test/fast-usdc/snapshots/fast-usdc.test.ts.md @@ -169,6 +169,8 @@ Generated by [AVA](https://avajs.dev). [ [ 'published.fastUsdc.txns.0xc81bc6105b60a234c7c50ac17816ebcd5561d366df8bf3be59ff387552761702', - '{"body":"#{\\"status\\":\\"ADVANCING\\"}","slots":[]}', + { + status: 'ADVANCING', + }, ], ] diff --git a/packages/boot/test/fast-usdc/snapshots/fast-usdc.test.ts.snap b/packages/boot/test/fast-usdc/snapshots/fast-usdc.test.ts.snap index ce45d025417..c837074b0fa 100644 Binary files a/packages/boot/test/fast-usdc/snapshots/fast-usdc.test.ts.snap and b/packages/boot/test/fast-usdc/snapshots/fast-usdc.test.ts.snap differ diff --git a/packages/fast-usdc/src/exos/status-manager.js b/packages/fast-usdc/src/exos/status-manager.js index 0fb63eed628..588126a3b73 100644 --- a/packages/fast-usdc/src/exos/status-manager.js +++ b/packages/fast-usdc/src/exos/status-manager.js @@ -13,8 +13,7 @@ import { PendingTxStatus, TerminalTxStatus, TxStatus } from '../constants.js'; /** * @import {MapStore, SetStore} from '@agoric/store'; * @import {Zone} from '@agoric/zone'; - * @import {CctpTxEvidence, NobleAddress, PendingTx, EvmHash, LogFn} from '../types.js'; - * @import {CopyRecord} from '@endo/pass-style'; + * @import {CctpTxEvidence, NobleAddress, PendingTx, EvmHash, LogFn, TransactionRecord} from '../types.js'; */ /** @@ -102,7 +101,7 @@ export const prepareStatusManager = ( /** * @param {EvmHash} txId - * @param {CopyRecord} record + * @param {TransactionRecord} record */ const publishTxnRecord = (txId, record) => { const txNode = E(txnsNode).makeChildNode(txId, { diff --git a/packages/fast-usdc/src/types.ts b/packages/fast-usdc/src/types.ts index 35bbf84da1f..0d3701e9d82 100644 --- a/packages/fast-usdc/src/types.ts +++ b/packages/fast-usdc/src/types.ts @@ -7,7 +7,7 @@ import type { import type { IBCChannelID } from '@agoric/vats'; import type { Amount } from '@agoric/ertp'; import type { CopyRecord, Passable } from '@endo/pass-style'; -import type { PendingTxStatus } from './constants.js'; +import type { PendingTxStatus, TxStatus } from './constants.js'; import type { FastUsdcTerms } from './fast-usdc.contract.js'; export type EvmHash = `0x${string}`; @@ -34,6 +34,15 @@ export interface CctpTxEvidence { txHash: EvmHash; } +/** + * 'evidence' only available when it's first observed and not in subsequent + * updates. + */ +export interface TransactionRecord extends CopyRecord { + evidence?: CctpTxEvidence; + status: TxStatus; +} + export type LogFn = (...args: unknown[]) => void; export interface PendingTx extends CctpTxEvidence {