Skip to content
This repository has been archived by the owner on Jul 9, 2021. It is now read-only.

INSUFFICIENT_TAKER_ALLOWANCE when taker is open order book #191

Closed
coopermaruyama opened this issue Oct 12, 2017 · 1 comment
Closed

INSUFFICIENT_TAKER_ALLOWANCE when taker is open order book #191

coopermaruyama opened this issue Oct 12, 2017 · 1 comment

Comments

@coopermaruyama
Copy link

This test was done on Kovan.

When using the open order book, filling an order causes an INSUFFICIENT_TAKER_ALLOWANCE error to be thrown by the exchange simulator. It's thrown on this line: https://github.com/0xProject/0x.js/blob/development/src/utils/exchange_transfer_simulator.ts#L100

I think this is because getAllowanceAsync using the address of the open order book's allowance returns 0 for any spender.

@coopermaruyama coopermaruyama changed the title INSUFFICIENT_TAKER_ALLOWANCE when taker is open order book (0x0000000000000000000000000000000000000000) INSUFFICIENT_TAKER_ALLOWANCE when taker is open order book Oct 12, 2017
@coopermaruyama
Copy link
Author

coopermaruyama commented Oct 12, 2017

I've solved this by doing the following when creating the initial order:

await zeroEx.token.setUnlimitedAllowanceAsync(
  takerTokenAddress, 
  makerAddress,
 '0x0000000000000000000000000000000000000000'
);

If I'm doing this wrong let me know please!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant