Skip to content

Commit

Permalink
cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
bogdanfazakas committed Jul 5, 2023
1 parent 5bab5e5 commit 0c40745
Showing 1 changed file with 1 addition and 31 deletions.
32 changes: 1 addition & 31 deletions src/@utils/order.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,45 +111,22 @@ export async function order(
orderPriceAndFees.price,
false
)
console.log('typeof(tx) ', typeof tx)
const txApprove = typeof tx !== 'number' ? await tx.wait() : tx
console.log('txApprove', txApprove)
if (!txApprove) {
return
}
const fre = new FixedRateExchange(
config.fixedRateExchangeAddress,
signer
)
console.log(
' await fixedRate.getDatatokenSupply(exchangeId)',
await fre.getDatatokenSupply(asset.accessDetails?.addressOrId)
)

console.log(
' await fixedRate.getBasetokenSupply(exchangeId)',
await fre.getBasetokenSupply(asset.accessDetails?.addressOrId)
)
console.log(
'await signer.getAddress(), ==',
await signer.getAddress()
)
console.log('account id ==', accountId)
console.log('orderPriceAndFees.price, ==', orderPriceAndFees.price)
console.log(
' asset.accessDetails?.addressOrId ==',
asset.accessDetails?.addressOrId
)
const freTx = await fre.buyDatatokens(
asset.accessDetails?.addressOrId,
'1',
orderPriceAndFees.price,
marketFeeAddress,
consumeMarketFixedSwapFee
)
console.log('freTx ==', freTx)
const buyDtTx = await freTx.wait()
console.log('buyDtTx ==', buyDtTx)
}
return await datatoken.startOrder(
asset.accessDetails.datatoken.address,
Expand All @@ -167,17 +144,10 @@ export async function order(
asset.accessDetails.baseToken.address,
asset.accessDetails.datatoken.address,
orderPriceAndFees.price,
// await amountToUnits(
// signer,
// asset?.accessDetails?.baseToken?.address,

// ),
false
)
console.log('tx 2', tx)
// const txApprove = await tx.wait()

const txApprove = typeof tx !== 'number' ? await tx.wait() : tx
console.log('txApprove 2', txApprove)
if (!txApprove) {
return
}
Expand Down

0 comments on commit 0c40745

Please sign in to comment.