protofire / omen-exchange

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

Display error when relay fee is greater than xdai amount #2219

Open hexyls opened 3 years ago

hexyls commented 3 years ago

closes https://github.com/protofire/omen-exchange/issues/2189

Displays an error when relay fee is greater than xdai amount for both buys and deposit for xdai markets when connected to the relay.

Also added a warning for when a user is attempting to transaction through the relay with an xDai balance lower than the relay fee.

Testing (all using the relay/omen account):

pimato commented 3 years ago

Testing (all using the relay/omen account):

pimato commented 3 years ago

I would prefer the usage of our error message below the inputfield like this:

Bildschirmfoto 2021-08-24 um 16 45 43

Figma: Design Specification

hexyls commented 3 years ago

@pimato I moved the relay fee error under inputs but I'm unable to access that design spec atm 🤔

pimato commented 3 years ago

@pimato I moved the relay fee error under inputs but I'm unable to access that design spec atm 🤔

Sorry @hexyls , fixed!

pimato commented 3 years ago

I would add a new error message for xDai tight user who have not deposit Dai into the Omen account. Right now we are just saying Insufficient balance if the user has no balance for the specific asset. I think before that we should show the message Insufficient Dai in your Omen Account for deposit/withdraw/buy/sell if the Omen Account is not funded:

Bildschirmfoto 2021-08-25 um 10 52 10

Priority of error message for xDai tight:

  1. If Omen Account has no DAI show Insufficient Dai in your Omen Account
  2. If Omen Account Dai balance > 0 we do the classic error message path like insufficient balance if the user inputs a higher amount he has available and so on.
Mi-Lan commented 3 years ago

https://user-images.githubusercontent.com/33226956/130975997-a27e389d-8750-49f5-b227-22cdd5da533f.mov

@hexyls Also seems that message gets stuck and I can't even buy with proper amount inputted..After I triggered insufficient dai in your omen account

hexyls commented 3 years ago

@Mi-Lan for that last one where the error stays - do you know how to reproduce it? I managed to get it to show up once but haven't seen it since 🤔