1
0
mirror of https://github.com/oceanprotocol/ocean.js.git synced 2024-11-26 20:39:05 +01:00

update approveWei signature and compute test

This commit is contained in:
Bogdan Fazakas 2022-08-17 13:25:49 +03:00
parent 585316e34e
commit 7dbc336122
2 changed files with 4 additions and 2 deletions

View File

@ -71,6 +71,7 @@ export async function approve<G extends boolean = false>(
*/
export async function approveWei<G extends boolean = false>(
web3: Web3,
config: Config,
account: string,
tokenAddress: string,
spender: string,
@ -99,8 +100,8 @@ export async function approveWei<G extends boolean = false>(
result = await sendTx(
account,
estGas + 1,
this.web3,
this.config,
web3,
config,
tokenContract.methods.approve,
spender,
amount

View File

@ -318,6 +318,7 @@ async function handleOrder(
if (order.providerFee && order.providerFee.providerFeeAmount) {
await approveWei(
web3,
config,
payerAccount,
order.providerFee.providerFeeToken,
datatokenAddress,