0xProject / 0x-launch-kit-frontend

Apache License 2.0
114 stars 208 forks source link

Frontend supports only 18 decimal tokens #534

Closed mariano-aguero closed 5 years ago

mariano-aguero commented 5 years ago

Closes #516

Includes:

unjapones commented 5 years ago

Hey Mariano, I tested this yesterday and found out that there might be a problem withe the units handling. I created a Sell limit order with the following data:

The above generated the following when MetaMask asked me to sign the order (screenshot): wrong_signed_order_data

I believe there is a problem around the amounts and that the expected SignedOrder should end up with the following values:

makerAssetAmount: 2000000000,
takerAssetAmount: 3000000000000000000

makerAssetAmount should be expressed in base units of the maker asset, and the same goes for takerAssetAmount (which has more zeros because WETH has more decimals).

Please confirm that you see the same thing. We'll continue improving this PR's branch.

mariano-aguero commented 5 years ago

LGTM @unjapones , I think is ready to merge!