mirror of
https://github.com/oceanprotocol/market.git
synced 2024-12-02 05:57:29 +01:00
removed some logs and added few comments
This commit is contained in:
parent
4d09240923
commit
88fbab5602
@ -64,7 +64,7 @@ export async function order(
|
|||||||
}
|
}
|
||||||
} as OrderParams
|
} as OrderParams
|
||||||
|
|
||||||
// TODO: we need to approve provider fee
|
// TODO: we need to approve provider fee separately using aproveWei
|
||||||
switch (asset.accessDetails?.type) {
|
switch (asset.accessDetails?.type) {
|
||||||
case 'fixed': {
|
case 'fixed': {
|
||||||
// this assumes all fees are in ocean
|
// this assumes all fees are in ocean
|
||||||
@ -87,8 +87,6 @@ export async function order(
|
|||||||
swapMarketFee: consumeMarketFixedSwapFee,
|
swapMarketFee: consumeMarketFixedSwapFee,
|
||||||
marketFeeAddress
|
marketFeeAddress
|
||||||
} as FreOrderParams
|
} as FreOrderParams
|
||||||
console.log('freParams', freParams)
|
|
||||||
console.log('orderParams', orderParams)
|
|
||||||
const tx = await datatoken.buyFromFreAndOrder(
|
const tx = await datatoken.buyFromFreAndOrder(
|
||||||
asset.accessDetails.datatoken.address,
|
asset.accessDetails.datatoken.address,
|
||||||
accountId,
|
accountId,
|
||||||
@ -152,6 +150,7 @@ export async function reuseOrder(
|
|||||||
providerFees?.providerFeeAmount ||
|
providerFees?.providerFeeAmount ||
|
||||||
initializeData?.providerFee?.providerFeeAmount
|
initializeData?.providerFee?.providerFeeAmount
|
||||||
) {
|
) {
|
||||||
|
// need to use approveWei here
|
||||||
const txApprove = await approve(
|
const txApprove = await approve(
|
||||||
web3,
|
web3,
|
||||||
accountId,
|
accountId,
|
||||||
|
Loading…
Reference in New Issue
Block a user