Skip to content

Commit

Permalink
fix more instances of using !==
Browse files Browse the repository at this point in the history
  • Loading branch information
ssallam committed Jan 19, 2021
1 parent 6e02738 commit d097ddf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/mappings/datatoken.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,15 @@ export function handleTransfer(event: Transfer): void {
}

if (
tokenBalanceTo !== null &&
tokenBalanceTo != null &&
tokenBalanceTo.balance.notEqual(ZERO_BD) &&
oldBalanceTo.equals(ZERO_BD)
) {
datatoken.holderCount += BigInt.fromI32(1)
}

if (
tokenBalanceFrom !== null &&
tokenBalanceFrom != null &&
tokenBalanceFrom.balance.equals(ZERO_BD) &&
oldBalanceFrom.notEqual(ZERO_BD)
) {
Expand Down Expand Up @@ -115,7 +115,7 @@ export function handleOrderStarted(event: OrderStarted): void {
order.timestamp = event.params.timestamp.toI32()
if (
event.params.mrktFeeCollector != null &&
event.params.mrktFeeCollector.toHex() !== ZERO_ADDRESS
event.params.mrktFeeCollector.toHex() != ZERO_ADDRESS
) {
order.marketFeeCollector = event.params.mrktFeeCollector.toHexString()
}
Expand Down
6 changes: 3 additions & 3 deletions src/mappings/pool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export function _handleRebind(
const pool = Pool.load(poolId)
const decimals = BigInt.fromI32(18).toI32()

if (tokenAddress !== OCEAN) {
if (tokenAddress != OCEAN) {
pool.datatokenAddress = tokenAddress
}
pool.tokenCount += BigInt.fromI32(1)
Expand Down Expand Up @@ -470,15 +470,15 @@ export function handleTransfer(event: Transfer): void {
}

if (
poolShareTo !== null &&
poolShareTo != null &&
poolShareTo.balance.notEqual(ZERO_BD) &&
poolShareToBalance.equals(ZERO_BD)
) {
pool.holderCount += BigInt.fromI32(1)
}

if (
poolShareFrom !== null &&
poolShareFrom != null &&
poolShareFrom.balance.equals(ZERO_BD) &&
poolShareFromBalance.notEqual(ZERO_BD)
) {
Expand Down

0 comments on commit d097ddf

Please sign in to comment.