fix fre order and bump ocean lib (#1553)

This commit is contained in:
Bogdan Fazakas 2022-06-28 16:09:30 +03:00 committed by GitHub
parent d5e5019cc8
commit d500c65d5d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 696 additions and 671 deletions

1356
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -25,7 +25,7 @@
"@coingecko/cryptoformat": "^0.5.4",
"@loadable/component": "^5.15.2",
"@oceanprotocol/art": "^3.2.0",
"@oceanprotocol/lib": "^1.1.2",
"@oceanprotocol/lib": "^1.1.3",
"@oceanprotocol/typographies": "^0.1.0",
"@tippyjs/react": "^4.2.6",
"@urql/exchange-refocus": "^0.2.5",

View File

@ -1,4 +1,5 @@
import {
amountToUnits,
approve,
approveWei,
Datatoken,
@ -72,7 +73,11 @@ export async function order(
accountId,
asset.accessDetails.baseToken.address,
asset.accessDetails.datatoken.address,
orderPriceAndFees.price,
await amountToUnits(
web3,
asset?.accessDetails?.baseToken?.address,
orderPriceAndFees.price
),
false
)
if (!txApprove) {
@ -83,6 +88,8 @@ export async function order(
exchangeContract: config.fixedRateExchangeAddress,
exchangeId: asset.accessDetails.addressOrId,
maxBaseTokenAmount: orderPriceAndFees.price,
baseTokenAddress: asset?.accessDetails?.baseToken?.address,
baseTokenDecimals: asset?.accessDetails?.baseToken?.decimals || 18,
swapMarketFee: consumeMarketFixedSwapFee,
marketFeeAddress
} as FreOrderParams