Skip to content

Commit

Permalink
fix: tests
Browse files Browse the repository at this point in the history
  • Loading branch information
matstyler committed Apr 12, 2024
1 parent 88a9a44 commit d938362
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/tests/amm.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ describe("handleAddLiquidity()", () => {
let addLiquidityEvent = changetype<AddLiquidity>(newMockEvent())
addLiquidityEvent.address = FIRST_POOL_ADDRESS_MOCK
addLiquidityEvent.transaction.hash = POOL_ADD_LIQUIDITY_TRANSACTION_HASH
addLiquidityEvent.transaction.from = FIRST_USER_MOCK
addLiquidityEvent.logIndex = ADD_LIQUIDITY_LOG_INDEX

let providerParam = new ethereum.EventParam(
Expand Down Expand Up @@ -407,6 +408,7 @@ describe("handleRemoveLiquidity()", () => {
removeLiquidityEvent.address = FIRST_POOL_ADDRESS_MOCK
removeLiquidityEvent.transaction.hash =
POOL_REMOVE_LIQUIDITY_TRANSACTION_HASH
removeLiquidityEvent.transaction.from = FIRST_USER_MOCK
removeLiquidityEvent.logIndex = REMOVE_LIQUIDITY_LOG_INDEX

let providerParam = new ethereum.EventParam(
Expand Down Expand Up @@ -543,7 +545,7 @@ describe("handleRemoveLiquidity()", () => {
),
"amount",
toPrecision(
BigInt.fromI32(300).neg(),
BigInt.fromI32(300),
1,
STANDARD_DECIMALS_MOCK
).toString()
Expand Down Expand Up @@ -1029,9 +1031,11 @@ describe("handleRemoveLiquidityOne()", () => {
AssetType.PT
),
"amount",
toPrecision(BigInt.fromI32(35), 0, STANDARD_DECIMALS_MOCK)
.neg()
.toString()
toPrecision(
BigInt.fromI32(35).neg(),
0,
STANDARD_DECIMALS_MOCK
).toString()
)
})

Expand Down Expand Up @@ -1081,11 +1085,7 @@ describe("handleRemoveLiquidityOne()", () => {
AssetType.LP
),
"amount",
toPrecision(
BigInt.fromI32(5).neg(),
0,
STANDARD_DECIMALS_MOCK
).toString()
toPrecision(BigInt.fromI32(5), 0, STANDARD_DECIMALS_MOCK).toString()
)
})

Expand Down

0 comments on commit d938362

Please sign in to comment.