0xProject / 0x-launch-kit-frontend

Apache License 2.0
114 stars 208 forks source link

Use AssetBuyer for orders with fees #561

Closed dekz closed 4 years ago

dekz commented 5 years ago

When fees exist on the order we use AssetBuyer to buy via the Forwarder rather than the Forwarder directly.

Fixes #557 0xProject/0x-launch-kit#22

Example Tx

Fees on MKR and fees on ZRX orders used to pay the fees.

Screen Shot 2019-07-25 at 3 10 52 pm

We're using AssetBuyer here for future proofing even though it makes an additional 2 requests for the order books. This will help when fees move from ZRX to another token rather than front end keeping a special cased list of ZRX orders.