Skip to content

Commit

Permalink
fix(types): deposit accepts ERef
Browse files Browse the repository at this point in the history
  • Loading branch information
turadg authored and kriskowal committed Aug 2, 2024
1 parent 9dc32dc commit 0242e09
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/vats/src/localchain.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,15 @@ export const prepareLocalChainAccountKit = (zone, { watch }) =>
const purse = E(bank).getPurse(brand);
return E(purse).getCurrentAmount();
},

// TODO The payment parameter type below should be Payment<'nat'>.
// https://github.com/Agoric/agoric-sdk/issues/9828
/**
* Deposit a payment into the bank purse that matches the alleged brand.
* This is safe, since even if the payment lies about its brand, ERTP
* will reject spoofed payment objects when depositing into a purse.
*
* @param {Payment<'nat'>} payment
* @param {ERef<Payment<'nat'>>} payment
* @param {Pattern} [optAmountShape] throws if the Amount of the Payment
* does not match the provided Pattern
* @returns {PromiseVow<Amount<'nat'>>}
Expand Down

0 comments on commit 0242e09

Please sign in to comment.