1
0
mirror of https://github.com/oceanprotocol/react.git synced 2024-11-25 11:28:46 +01:00

fix Decimal compare

This commit is contained in:
alexcos20 2020-10-27 09:23:52 -07:00
parent f1934fec3e
commit 6549f6ee9f

View File

@ -91,7 +91,7 @@ function usePricing(ddo: DDO): UsePricing {
await ocean.datatokens.balance(dataToken, accountId)
)
const tokens = new Decimal(tokensToMint)
if (tokens > balance) {
if (tokens.greaterThan(balance)) {
const mintAmount = tokens.minus(balance)
const tx = await ocean.datatokens.mint(
dataToken,