Closed rhrahul closed 6 years ago
Also getting this error in fillOrderAsync Funciton.
zeroEx.exchange.fillOrderAsync(
signedOrder,
ZeroEx.toBaseUnitAmount(
new BigNumber(Amount),
Decimals
),
true,
TakerAccount
);
output :
Uncaught (in promise) TypeError: takerTokenAmount.eq is not a function
at Function../node_modules/@0xproject/contract-wrappers/lib/src/utils/order_validation_utils.js.OrderValidationUtils._validateRemainingFillAmountNotZeroOrThrow
@rhrahul make sure the amount fields in signedOrder
are BigNumbers. Can you show how signedOrder
is constructed?
Yes, I changed type to BigNumber and it worked. Thanks
One more thing, can you suggest me how can I set manual transaction options, Like set gas fees manually in function calling, for example,
zeroEx.exchange.fillOrderAsync(
signedOrder,
ZeroEx.toBaseUnitAmount(
new BigNumber(Amount),
Decimals
),
true,
TakerAccount,
{GASPRICE, GASLIMIT}
);
Any suggestion on how to do that ?
All of those functions take a OrderTransactionOpts argument.
zeroEx.exchange.fillOrderAsync(
signedOrder,
ZeroEx.toBaseUnitAmount(
new BigNumber(Amount),
Decimals
),
true,
TakerAccount,
{gasPrice: GASPRICE, gasLimit: GASLIMIT}
);
Ok, Thanks 👍
@dekz Any Suggestions on this ? https://github.com/0xProject/0x-monorepo/issues/922
Expected Behavior
I am using,
And I am keep getting this error,
Current Behavior
I am keep getting this error,
Your Environment
0x.js
Exchange Contract