From 258ff5bc568dbea101a2725407ae9c1f44fd5a7b Mon Sep 17 00:00:00 2001 From: Dan Connolly Date: Sat, 23 Dec 2023 08:20:30 -0600 Subject: [PATCH] fix(postalSvc): exit seat so getPayouts() resolves --- contract/src/postalSvc.js | 1 + contract/test/test-postalSvc.js | 1 + 2 files changed, 2 insertions(+) diff --git a/contract/src/postalSvc.js b/contract/src/postalSvc.js index b793058..d784cde 100644 --- a/contract/src/postalSvc.js +++ b/contract/src/postalSvc.js @@ -45,6 +45,7 @@ export const start = zcf => { Promise.resolve(pmtP).then(pmt => E(depositFacet).receive(pmt)), ), ); + seat.exit(); return `sent ${keys(payouts).join(', ')}`; }; diff --git a/contract/test/test-postalSvc.js b/contract/test/test-postalSvc.js index 1230aab..2840174 100644 --- a/contract/test/test-postalSvc.js +++ b/contract/test/test-postalSvc.js @@ -118,6 +118,7 @@ test('deliver payment using address', async t => { const result = await E(seat).getOfferResult(); t.is(result, 'sent Invitation, Payment'); t.deepEqual(rxd, [pmt1, pmt2, pmt3]); + const done = await E(seat).getPayouts(); } }); test.todo('partial failure: send N+1 payments where >= 1 delivery fails');