1
0
mirror of https://github.com/oceanprotocol/react.git synced 2025-01-05 11:25:18 +01:00

fixed price, ocean lib update

Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro>
This commit is contained in:
mihaisc 2020-10-27 18:04:22 +02:00
parent bd15ab144d
commit 834c9dd142
No known key found for this signature in database
GPG Key ID: 4FB0C2329B4C6E29
3 changed files with 6 additions and 5 deletions

6
package-lock.json generated
View File

@ -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",

View File

@ -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",

View File

@ -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