Skip to content

Commit

Permalink
chore: revert ERTP types, change from numbers to bigints where lintin…
Browse files Browse the repository at this point in the history
…g fails (#3031)
  • Loading branch information
katelynsills authored and michaelfig committed May 4, 2021
1 parent d210bcf commit 97ce4dd
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions packages/treasury/test/swingsetTests/vat-alice.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ const build = async (log, zoe, brands, payments, timer) => {
const loanSeat = await E(zoe).offer(
E(treasury).makeLoanInvitation(),
harden({
give: { Collateral: amountMath.make(moolaBrand, 100) },
want: { RUN: amountMath.make(runBrand, 500000) },
give: { Collateral: amountMath.make(moolaBrand, 100n) },
want: { RUN: amountMath.make(runBrand, 500000n) },
}),
harden({
Collateral: moolaPayment,
Expand Down
2 changes: 1 addition & 1 deletion packages/treasury/test/swingsetTests/vat-owner.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ const build = async (
);
const proposal = harden({
give: {
Collateral: amountMath.make(moolaBrand, 1000),
Collateral: amountMath.make(moolaBrand, 1000n),
},
want: { Governance: amountMath.makeEmpty(govBrand) },
});
Expand Down
4 changes: 2 additions & 2 deletions packages/treasury/test/test-interest.js
Original file line number Diff line number Diff line change
Expand Up @@ -252,8 +252,8 @@ test('reportingPeriod shorter than charging', async t => {
};
const afterTwoMonths = {
latestInterestUpdate: ONE_MONTH,
interest: amountMath.make(203, brand),
newDebt: amountMath.make(100203n, brand),
interest: amountMath.make(brand, 203n),
newDebt: amountMath.make(brand, 100203n),
};
// charging period is 30 days. 2nd interest isn't charged until 60 days.
t.deepEqual(calculator.calculate(debtStatus, 32n * ONE_DAY), afterTwoMonths);
Expand Down
4 changes: 2 additions & 2 deletions packages/treasury/test/test-stablecoin.js
Original file line number Diff line number Diff line change
Expand Up @@ -1376,7 +1376,7 @@ test('overdeposit', async t => {
assertAmountsEqual(
t,
await E.get(E(collectFeesSeat).getCurrentAllocation()).RUN,
amountMath.make(runBrand, 300),
amountMath.make(runBrand, 300n),
);
});

Expand Down Expand Up @@ -1764,7 +1764,7 @@ test('coll fees from loan and AMM', async t => {
});

const amm = E(zoe).getPublicFacet(await E(stablecoinMachine).getAMM());
const swapAmount = amountMath.make(aethBrand, 60000);
const swapAmount = amountMath.make(aethBrand, 60000n);
const swapSeat = await E(zoe).offer(
E(amm).makeSwapInInvitation(),
harden({
Expand Down
6 changes: 3 additions & 3 deletions packages/vats/test/test-distributeFees.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ test('fee distribution', async t => {
};
buildDistributor(treasury, bank, epochTimer, wallTimer, distributorParams);

treasury.pushFees(runMint.mintPayment(amountMath.make(brand, 500)));
treasury.pushFees(runMint.mintPayment(amountMath.make(brand, 500n)));
bankUpdater.updateState(['a37', 'a2389', 'a274', 'a16', 'a1772']);

t.deepEqual(bank.getAccounts(), []);
Expand Down Expand Up @@ -132,7 +132,7 @@ test('fee distribution, leftovers', async t => {
};
buildDistributor(treasury, bank, epochTimer, wallTimer, distributorParams);

treasury.pushFees(runMint.mintPayment(amountMath.make(brand, 12)));
treasury.pushFees(runMint.mintPayment(amountMath.make(brand, 12n)));
bankUpdater.updateState(['a37', 'a2389', 'a274', 'a16', 'a1772']);

t.deepEqual(bank.getAccounts(), []);
Expand All @@ -148,7 +148,7 @@ test('fee distribution, leftovers', async t => {
waitForPromisesToSettle();

// Pay them again
treasury.pushFees(runMint.mintPayment(amountMath.make(brand, 13)));
treasury.pushFees(runMint.mintPayment(amountMath.make(brand, 13n)));
await wallTimer.tick();

await epochTimer.tick();
Expand Down

0 comments on commit 97ce4dd

Please sign in to comment.