Adds error component on buy_sell component, if an error occurs it will catch it and show an error card based on the error message with two timeouts, one for deleting the btnError text and the other for deleting the error card
Creates new exceptions:
-- InsufficientTokenBalanceException: throwed if the user wants to sell more tokens than the amount he has
-- InsufficientOrdersAmountException: throwed if the user wants to fill an not-enough number of orders (replaces old window.alert message)
-- InsufficientFeeBalanceException: throwed if the user does not have enough 0x to pay fees
-- InsufficientEthDepositBalanceException: throwed if the user want's to wrap an unavailable amount of ETH
Now the startBuySellMarketSteps action, before starting the buySellMarketSteps, will check if the amount of quoteToken is enough to pay the orders, otherwise it will throw an InsufficientTokenBalanceException
Also adds the getTotalEthBalance, will return the amount of weth+Eth of the user account
Connects #443 . It should look like this:
https://www.loom.com/share/c97d40f220004057a21b9cda80d86dff
Description
Adds error component on buy_sell component, if an error occurs it will catch it and show an error card based on the error message with two timeouts, one for deleting the btnError text and the other for deleting the error card
Creates new exceptions: --
InsufficientTokenBalanceException
: throwed if the user wants to sell more tokens than the amount he has --InsufficientOrdersAmountException
: throwed if the user wants to fill an not-enough number of orders (replaces oldwindow.alert
message) --InsufficientFeeBalanceException
: throwed if the user does not have enough 0x to pay fees --InsufficientEthDepositBalanceException
: throwed if the user want's to wrap an unavailable amount of ETHNow the startBuySellMarketSteps action, before starting the buySellMarketSteps, will check if the amount of quoteToken is enough to pay the orders, otherwise it will throw an
InsufficientTokenBalanceException
Also adds the getTotalEthBalance, will return the amount of weth+Eth of the user account
What is not included