diff --git a/packages/orchestration/src/utils/zoe-tools.js b/packages/orchestration/src/utils/zoe-tools.js index 3942e2de51c8..520b970279ac 100644 --- a/packages/orchestration/src/utils/zoe-tools.js +++ b/packages/orchestration/src/utils/zoe-tools.js @@ -28,7 +28,7 @@ const { assign, keys, values } = Object; * @typedef {( * srcSeat: ZCFSeat, * localAccount: LocalAccountMethods, - * give: AmountKeywordRecord, + * amounts: AmountKeywordRecord, * ) => Promise} LocalTransfer */ @@ -49,9 +49,9 @@ export const makeZoeTools = ( { zcf, vowTools: { retriable, when, allVows, allSettled } }, ) => { /** - * Transfer the `give` of a seat to a local account. If any of the deposits - * fail, everything will be rolled back to the `srcSeat`. Supports multiple - * items in the `give` {@link PaymentKeywordRecord}. + * Transfer the `amounts` from `srcSeat` to `localAccount`. If any of the + * deposits fail, everything will be rolled back to the `srcSeat`. Supports + * multiple items in the `amounts` {@link AmountKeywordRecord}. */ const localTransfer = retriable( zone, @@ -73,20 +73,20 @@ export const makeZoeTools = ( // zcf.makeEmptySeatKit(); // const uSeat = await userSeatP; // // TODO how do I store in the place for this retriable? - // atomicTransfer(zcf, srcSeat, tempSeat, give); + // atomicTransfer(zcf, srcSeat, tempSeat, amounts); // tempSeat.exit(); // return uSeat; // }, // ); - // Now all the `give` are accessible, so we can move them to the localAccount` + // Now all the `amounts` are accessible, so we can move them to the localAccount const payments = await Promise.all( keys(amounts).map(kw => E(userSeat).getPayout(kw)), ); const settleDeposits = await when( allSettled(payments.map(pmt => localAccount.deposit(pmt))), ); - // if any of the deposits to LCA failed, unwind all the allocations + // if any of the deposits to localAccount failed, unwind all of the allocations if (settleDeposits.find(x => x.status === 'rejected')) { const amts = values(amounts); const errors = []; @@ -118,12 +118,12 @@ export const makeZoeTools = ( errors, }); } - // TODO remove userSeat from baggage + // TODO #9541 remove userSeat from baggage }, ); /** - * Transfer the `amounts` from a local account to the `recipientSeat`. If any + * Transfer the `amounts` from a `localAccount` to the `recipientSeat`. If any * of the withdrawals fail, everything will be rolled back to the * `srcLocalAccount`. Supports multiple items in the `amounts` * {@link PaymentKeywordRecord}.