Skip to content
This repository has been archived by the owner on Jun 24, 2022. It is now read-only.

Commit

Permalink
check that price amount is greater than 0
Browse files Browse the repository at this point in the history
  • Loading branch information
W3stside committed Feb 25, 2022
1 parent 028293a commit 6e8c106
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/custom/state/claim/hooks/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -966,7 +966,7 @@ function _enhanceClaimData(claim: UserClaimData, chainId: SupportedChainId, pric

// Free claims will have tokenAndAmount === undefined
// If it's not a free claim, store the price and calculate cost in investment token
if (tokenAndAmount?.amount) {
if (tokenAndAmount?.amount && Number(tokenAndAmount.amount) > 0) {
data.price = _getPrice(tokenAndAmount)
// get the currency amount using the price base currency (remember price was inverted)
data.currencyAmount = CurrencyAmount.fromRawAmount(data.price.baseCurrency, claim.amount)
Expand Down

0 comments on commit 6e8c106

Please sign in to comment.