Skip to content

Commit

Permalink
chore: contractState.account type alignment
Browse files Browse the repository at this point in the history
  • Loading branch information
dckc committed Jul 3, 2024
1 parent 940d3f0 commit 5c0ea36
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/orchestration/src/examples/sendAnywhere.contract.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const { entries } = Object;
* @param {object} ctx
* @param {ZCF} ctx.zcf
* @param {any} ctx.agoricNamesTools TODO Give this a better type
* @param {{ account: OrchestrationAccount<any> }} ctx.contractState
* @param {{ account: OrchestrationAccount<any> | undefined }} ctx.contractState
* @param {ZCFSeat} seat
* @param {object} offerArgs
* @param {string} offerArgs.chainName
Expand Down Expand Up @@ -68,8 +68,8 @@ const sendItFn = async (
const { chainId } = info;
assert(typeof chainId === 'string', 'bad chainId');
const { [kw]: pmtP } = await withdrawFromSeat(zcf, seat, give);
await E.when(pmtP, pmt => contractState.account.deposit(pmt));
await contractState.account.transfer(
await E.when(pmtP, pmt => contractState.account?.deposit(pmt));
await contractState.account?.transfer(
{ denom, value: amt.value },
{
address: destAddr,
Expand Down

0 comments on commit 5c0ea36

Please sign in to comment.