diff --git a/package-lock.json b/package-lock.json index da527ce..1f4e9fe 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1521,9 +1521,9 @@ "integrity": "sha512-p0oOHXr60hXZuLNsQ/PsOQtCfia79thm7MjPxTrnnBvD+csJoHzARYMB0IFj/KTw6U5vLXODgjJAn8x6QksLwg==" }, "@oceanprotocol/lib": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/@oceanprotocol/lib/-/lib-0.9.0.tgz", - "integrity": "sha512-BI00ZXTdGXJZNTJhwtqsnXjKtlcl1PXB18e26aCo5g1VT9S19urPLT04k9Zkz4k+3HepSc5QdOu+yo47MS1I7g==", + "version": "0.9.3", + "resolved": "https://registry.npmjs.org/@oceanprotocol/lib/-/lib-0.9.3.tgz", + "integrity": "sha512-eUTM5D5AZ1eDfzAYSqML1fELXOTXy0Zj7y8NuSlyN9Ersg7e9G8lIWCAA49pcBNCJ41niG/lpAuIpiUPd2eFpA==", "requires": { "@ethereum-navigator/navigator": "^0.5.0", "@oceanprotocol/contracts": "^0.5.7", diff --git a/package.json b/package.json index c226c38..4c4326d 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "dist/" ], "dependencies": { - "@oceanprotocol/lib": "^0.9.0", + "@oceanprotocol/lib": "^0.9.3", "axios": "^0.21.0", "decimal.js": "^10.2.1", "web3": "^1.3.0", diff --git a/src/hooks/usePricing/usePricing.ts b/src/hooks/usePricing/usePricing.ts index 4509330..ff22dde 100644 --- a/src/hooks/usePricing/usePricing.ts +++ b/src/hooks/usePricing/usePricing.ts @@ -224,6 +224,7 @@ function usePricing(ddo: DDO): UsePricing { try { await mint(`${dtAmount}`) + // dtAmount for fixed price is set to max const tx = isPool ? await ocean.pool .create( @@ -236,7 +237,7 @@ function usePricing(ddo: DDO): UsePricing { ) .next((step: number) => setStep(step, 'pool')) : await ocean.fixedRateExchange - .create(dataToken, `${price}`, accountId, `${dtAmount}`) + .create(dataToken, `${price}`, accountId, `1000`) .next((step: number) => setStep(step, 'exchange')) await sleep(20000) return tx