0xProject / 0x-launch-kit-frontend

Apache License 2.0
114 stars 208 forks source link

(Hotfix) Unlock only needed tokens #254

Closed Agupane closed 5 years ago

Agupane commented 5 years ago

Closes #230

Only forces the unlock of the token needed for executing each operation:

According to what we discussed here and originally posted by @fvictorio:

I think these are the possible scenarios, and the expected results:

  • If you are creating a buy on limit order for a X/Y market, your Y has to be unlocked.
  • If you are creating a sell on limit order for a X/Y market, your X has to be unlocked.
  • If you are creating an order, and there is a positive maker fee, your ZRX has to be unlocked.
  • If you are filling an order, the taker asset has to be unlocked.

    • Also, if the taker fee is positive, your ZRX has to be unlocked.
Agupane commented 5 years ago

Yes I thought the same, I'll add that note on the project, good idea thanks! @unjapones