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:
parent
f1934fec3e
commit
6549f6ee9f
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user