Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
brtkx committed Jul 17, 2024
1 parent 31c5355 commit bde2893
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/unit/nativeToken.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,25 +86,25 @@ describe('Native token', () => {
it('scales native token decimals to 18 decimals', () => {
expect(
nativeTokenDecimalsTo18Decimals({
amount: BigNumber.from('1.2345'),
amount: AMOUNT_TO_SCALE,
decimals: 16,
}).eq(BigNumber.from('123.45')),
}).eq(BigNumber.from('123456789000000000000')),
decimalsToError(16)
).to.be.true

expect(
nativeTokenDecimalsTo18Decimals({
amount: BigNumber.from('1.2345'),
amount: AMOUNT_TO_SCALE,
decimals: 18,
}).eq(BigNumber.from('1.2345')),
}).eq(BigNumber.from('1234567890000000000')),
decimalsToError(18)
).to.be.true

expect(
nativeTokenDecimalsTo18Decimals({
amount: BigNumber.from('1.2345'),
amount: AMOUNT_TO_SCALE,
decimals: 20,
}).eq(BigNumber.from('0.012345')),
}).eq(BigNumber.from('12345678900000000')),
decimalsToError(20)
).to.be.true
})
Expand Down

0 comments on commit bde2893

Please sign in to comment.