Skip to content

Commit

Permalink
fixup! WIP(game contract): atomicRearrange -> zcf.reallocate() for co…
Browse files Browse the repository at this point in the history
…mpat
  • Loading branch information
dckc committed Aug 16, 2023
1 parent 8eeb8d8 commit d29bc7c
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions packages/smart-wallet/test/gameAssetContract.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@
/* eslint @typescript-eslint/no-floating-promises: "warn" */

// deep import to avoid dependency on all of ERTP, vat-data
import { AmountShape } from '@agoric/ertp';
import { AmountShape } from '@agoric/ertp/src/typeGuards.js';
import { AmountMath, AssetKind } from '@agoric/ertp/src/amountMath.js';
import { makeTracer } from '@agoric/internal';
import { M, getCopyBagEntries } from '@agoric/store';
import { atomicRearrange } from '@agoric/zoe/src/contractSupport/index.js';
import { E, Far } from '@endo/far';

const { Fail, quote: q } = assert;
Expand Down Expand Up @@ -48,17 +47,12 @@ export const start = async zcf => {

totalPlaces(want.Places) <= 3n || Fail`only 3 places allowed when joining`;

// We use the deprecated stage/reallocate API
// so that we can test this with the version of zoe on mainnet1B.
playerSeat.decrementBy(gameSeat.incrementBy(give));
const tmp = mint.mintGains(want);
playerSeat.incrementBy(tmp.decrementBy(want));
zcf.reallocate(playerSeat, tmp, gameSeat);
// atomicRearrange(
// zcf,
// harden([
// [playerSeat, gameSeat, give],
// [mint.mintGains(want), playerSeat, want],
// ]),
// );
playerSeat.exit(true);
return 'welcome to the game';
};
Expand Down

0 comments on commit d29bc7c

Please sign in to comment.