Skip to content
This repository has been archived by the owner on Aug 3, 2021. It is now read-only.

Commit

Permalink
getCheapestPool return proper value
Browse files Browse the repository at this point in the history
  • Loading branch information
mihaisc committed Aug 5, 2020
1 parent e87faa9 commit 9066704
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/utils/dtUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ export async function getCheapestPool(
dataTokenAddress
)
Logger.log('DT Pool found', tokenPools)
if(tokenPools===undefined || tokenPools.length===0){
return {
poolAddress: '',
poolPrice: '0'
}
}
let cheapestPoolAddress
let cheapestPoolPrice = new Decimal(999999999999)

Expand Down

0 comments on commit 9066704

Please sign in to comment.