1
0
mirror of https://github.com/oceanprotocol/market.git synced 2024-12-02 05:57:29 +01:00

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", "@coingecko/cryptoformat": "^0.5.4",
"@loadable/component": "^5.15.2", "@loadable/component": "^5.15.2",
"@oceanprotocol/art": "^3.2.0", "@oceanprotocol/art": "^3.2.0",
"@oceanprotocol/lib": "^1.1.2", "@oceanprotocol/lib": "^1.1.3",
"@oceanprotocol/typographies": "^0.1.0", "@oceanprotocol/typographies": "^0.1.0",
"@tippyjs/react": "^4.2.6", "@tippyjs/react": "^4.2.6",
"@urql/exchange-refocus": "^0.2.5", "@urql/exchange-refocus": "^0.2.5",

View File

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