diff --git a/packages/fast-usdc/src/exos/operator-kit.js b/packages/fast-usdc/src/exos/operator-kit.js index b5e847f30d5..310b10ad0a9 100644 --- a/packages/fast-usdc/src/exos/operator-kit.js +++ b/packages/fast-usdc/src/exos/operator-kit.js @@ -35,7 +35,7 @@ const OperatorKitI = { }), operator: M.interface('Operator', { - submitEvidence: M.call(CctpTxEvidenceShape).returns(M.promise()), + submitEvidence: M.call(CctpTxEvidenceShape).returns(), getStatus: M.call().returns(M.record()), }), }; @@ -87,7 +87,7 @@ export const prepareOperatorKit = (zone, staticPowers) => const { operator } = this.facets; // TODO(bootstrap integration): cause this call to throw and confirm that it // shows up in the the smart-wallet UpdateRecord `error` property - await operator.submitEvidence(evidence); + operator.submitEvidence(evidence); return staticPowers.makeInertInvitation( 'evidence was pushed in the invitation maker call', ); @@ -98,12 +98,12 @@ export const prepareOperatorKit = (zone, staticPowers) => * submit evidence from this operator * * @param {CctpTxEvidence} evidence + * @returns {void} */ - async submitEvidence(evidence) { + submitEvidence(evidence) { const { state } = this; !state.disabled || Fail`submitEvidence for disabled operator`; - const result = state.powers.attest(evidence, this.facets); - return result; + state.powers.attest(evidence, this.facets); }, /** @returns {OperatorStatus} */ getStatus() { diff --git a/packages/fast-usdc/test/exos/transaction-feed.test.ts b/packages/fast-usdc/test/exos/transaction-feed.test.ts index 64c6f8c34a1..9f1c902aaae 100644 --- a/packages/fast-usdc/test/exos/transaction-feed.test.ts +++ b/packages/fast-usdc/test/exos/transaction-feed.test.ts @@ -48,12 +48,9 @@ test('happy aggregation', async t => { const { op1, op2, op3 } = await makeOperators(feedKit); const evidence = MockCctpTxEvidences.AGORIC_PLUS_OSMO(); - const results = await Promise.all([ - op1.operator.submitEvidence(evidence), - op2.operator.submitEvidence(evidence), - op3.operator.submitEvidence(evidence), - ]); - t.deepEqual(results, [undefined, undefined, undefined]); + op1.operator.submitEvidence(evidence); + op2.operator.submitEvidence(evidence); + op3.operator.submitEvidence(evidence); const accepted = await evidenceSubscriber.getUpdateSince(0); t.deepEqual(accepted, { @@ -62,18 +59,17 @@ test('happy aggregation', async t => { }); // verify that it doesn't publish until three match - await Promise.all([ - // once it publishes, it doesn't remember that it already saw these - op1.operator.submitEvidence(evidence), - op2.operator.submitEvidence(evidence), - // but this time the third is different - op3.operator.submitEvidence(MockCctpTxEvidences.AGORIC_PLUS_DYDX()), - ]); + // once it publishes, it doesn't remember that it already saw these + op1.operator.submitEvidence(evidence); + op2.operator.submitEvidence(evidence); + // but this time the third is different + op3.operator.submitEvidence(MockCctpTxEvidences.AGORIC_PLUS_DYDX()); + t.like(await evidenceSubscriber.getUpdateSince(0), { // Update count is still 1 updateCount: 1n, }); - await op3.operator.submitEvidence(evidence); + op3.operator.submitEvidence(evidence); t.like(await evidenceSubscriber.getUpdateSince(0), { updateCount: 2n, }); @@ -85,11 +81,11 @@ test('disabled operator', async t => { const evidence = MockCctpTxEvidences.AGORIC_PLUS_OSMO(); // works before disabling - await op1.operator.submitEvidence(evidence); + op1.operator.submitEvidence(evidence); op1.admin.disable(); - await t.throwsAsync(() => op1.operator.submitEvidence(evidence), { + t.throws(() => op1.operator.submitEvidence(evidence), { message: 'submitEvidence for disabled operator', }); });