From 6549f6ee9f2ee4e254e1b499103634eb71887bda Mon Sep 17 00:00:00 2001 From: alexcos20 Date: Tue, 27 Oct 2020 09:23:52 -0700 Subject: [PATCH] fix Decimal compare --- src/hooks/usePricing/usePricing.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hooks/usePricing/usePricing.ts b/src/hooks/usePricing/usePricing.ts index 6a50848..457b128 100644 --- a/src/hooks/usePricing/usePricing.ts +++ b/src/hooks/usePricing/usePricing.ts @@ -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,