From 7dbc336122501238bdd4fb6e8b66321974bdd8b0 Mon Sep 17 00:00:00 2001 From: Bogdan Fazakas Date: Wed, 17 Aug 2022 13:25:49 +0300 Subject: [PATCH] update approveWei signature and compute test --- src/utils/TokenUtils.ts | 5 +++-- test/integration/ComputeFlow.test.ts | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/utils/TokenUtils.ts b/src/utils/TokenUtils.ts index 0b14b5c7..38748d55 100644 --- a/src/utils/TokenUtils.ts +++ b/src/utils/TokenUtils.ts @@ -71,6 +71,7 @@ export async function approve( */ export async function approveWei( web3: Web3, + config: Config, account: string, tokenAddress: string, spender: string, @@ -99,8 +100,8 @@ export async function approveWei( result = await sendTx( account, estGas + 1, - this.web3, - this.config, + web3, + config, tokenContract.methods.approve, spender, amount diff --git a/test/integration/ComputeFlow.test.ts b/test/integration/ComputeFlow.test.ts index 41d81ebf..f2f8cf4d 100644 --- a/test/integration/ComputeFlow.test.ts +++ b/test/integration/ComputeFlow.test.ts @@ -318,6 +318,7 @@ async function handleOrder( if (order.providerFee && order.providerFee.providerFeeAmount) { await approveWei( web3, + config, payerAccount, order.providerFee.providerFeeToken, datatokenAddress,