protofire / omen-exchange

Omen exchange
https://omen.eth.link/
GNU Affero General Public License v3.0
67 stars 78 forks source link

Not able to purchase outcome with `0.001 Collatearal` #2189

Open pimato opened 3 years ago

pimato commented 3 years ago

Describe the bug It seems like the UI is throwing an error when I am trying to buy an outcome with 0.001 DAI

To Reproduce Steps to reproduce the behavior:

  1. Connect to xDai tight integration
  2. Go to http://localhost:3000/#/0x617df4629b2b11ab775562b69ff20e148fe77fb8
  3. Click on 'Buy - Button'
  4. Set 0.001 as purchase amount
  5. Click on Buy - Button
  6. See error: gnosis-conditional-exchange::Market::Buy - invalid input argument (arg="investmentAmount", reason="invalid number value", value={"_hex":"-0x093cafac6a8000"}, version=4.0.46)

Expected behavior User should be able to purchase 0.001 value worth of outcome tokens.

Screenshots

https://user-images.githubusercontent.com/5337809/129172754-8f3e2161-770f-470f-a47f-94f2cc4b6ec0.mov

Bildschirmfoto 2021-08-12 um 11 21 37 Bildschirmfoto 2021-08-12 um 11 21 33
Mi-Lan commented 3 years ago

@pimato Hey men I looked at it seems that the issue is that when we subtract the relay fee from that amount it ends up being negative value...