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:
parent
585316e34e
commit
7dbc336122
@ -71,6 +71,7 @@ export async function approve<G extends boolean = false>(
|
|||||||
*/
|
*/
|
||||||
export async function approveWei<G extends boolean = false>(
|
export async function approveWei<G extends boolean = false>(
|
||||||
web3: Web3,
|
web3: Web3,
|
||||||
|
config: Config,
|
||||||
account: string,
|
account: string,
|
||||||
tokenAddress: string,
|
tokenAddress: string,
|
||||||
spender: string,
|
spender: string,
|
||||||
@ -99,8 +100,8 @@ export async function approveWei<G extends boolean = false>(
|
|||||||
result = await sendTx(
|
result = await sendTx(
|
||||||
account,
|
account,
|
||||||
estGas + 1,
|
estGas + 1,
|
||||||
this.web3,
|
web3,
|
||||||
this.config,
|
config,
|
||||||
tokenContract.methods.approve,
|
tokenContract.methods.approve,
|
||||||
spender,
|
spender,
|
||||||
amount
|
amount
|
||||||
|
@ -318,6 +318,7 @@ async function handleOrder(
|
|||||||
if (order.providerFee && order.providerFee.providerFeeAmount) {
|
if (order.providerFee && order.providerFee.providerFeeAmount) {
|
||||||
await approveWei(
|
await approveWei(
|
||||||
web3,
|
web3,
|
||||||
|
config,
|
||||||
payerAccount,
|
payerAccount,
|
||||||
order.providerFee.providerFeeToken,
|
order.providerFee.providerFeeToken,
|
||||||
datatokenAddress,
|
datatokenAddress,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user