diff --git a/packages/cosmic-proto/test/helpers.test-d.ts b/packages/cosmic-proto/test/helpers.test-d.ts index 63933043cb8..dbeafd4af4b 100644 --- a/packages/cosmic-proto/test/helpers.test-d.ts +++ b/packages/cosmic-proto/test/helpers.test-d.ts @@ -69,6 +69,5 @@ import type { Timestamp } from '../src/codegen/google/protobuf/timestamp.js'; null as any; expectType(response.completionTime); const responseJson: JsonSafe = null as any; - // FIXME: should be a string. UNTIL: github.com/cosmology-tech/telescope/pull/632 - expectType(responseJson.completionTime.seconds); + expectType(responseJson.completionTime.seconds); } diff --git a/packages/orchestration/src/exos/local-orchestration-account.js b/packages/orchestration/src/exos/local-orchestration-account.js index a17c4d4063c..7fda8a8733b 100644 --- a/packages/orchestration/src/exos/local-orchestration-account.js +++ b/packages/orchestration/src/exos/local-orchestration-account.js @@ -387,8 +387,10 @@ export const prepareLocalOrchestrationAccountKit = ( */ queryBalancesWatcher: { /** - * @param {ResponseTo< - * TypedJson<'/cosmos.bank.v1beta1.QueryAllBalancesRequest'> + * @param {JsonSafe< + * ResponseTo< + * TypedJson<'/cosmos.bank.v1beta1.QueryAllBalancesRequest'> + * > * >} result * @returns {DenomAmount[]} */ diff --git a/packages/orchestration/src/typeGuards.js b/packages/orchestration/src/typeGuards.js index 4c3255dbbdf..deb4ea802c9 100644 --- a/packages/orchestration/src/typeGuards.js +++ b/packages/orchestration/src/typeGuards.js @@ -160,8 +160,11 @@ export const chainFacadeMethods = harden({ /** * for google/protobuf/timestamp.proto, not to be confused with TimestampShape * from `@agoric/time` + * + * `seconds` is a big integer but since it goes through JSON it is encoded as + * string */ -export const TimestampProtoShape = { seconds: M.nat(), nanos: M.number() }; +export const TimestampProtoShape = { seconds: M.string(), nanos: M.number() }; /** * see {@link TxBody} for more details diff --git a/packages/vats/tools/fake-bridge.js b/packages/vats/tools/fake-bridge.js index 32e3ee6575c..36c39af8d37 100644 --- a/packages/vats/tools/fake-bridge.js +++ b/packages/vats/tools/fake-bridge.js @@ -218,7 +218,7 @@ export const fakeLocalChainBridgeTxMsgHandler = (message, sequence) => { case '/cosmos.staking.v1beta1.MsgUndelegate': { return /** @type {JsonSafe} */ ({ // 5 seconds from unix epoch - completionTime: { seconds: 5n, nanos: 0 }, + completionTime: { seconds: '5', nanos: 0 }, }); } // returns one empty object per message unless specified