Equibit / wallet-ui

0 stars 1 forks source link

Offer exceeding ask quantity results in error #1108

Closed elliot-tio closed 6 years ago

elliot-tio commented 6 years ago

When sending a payment offer for a sell/buy order, if the offer exceeds the ask quantity/price, a system error is thrown (as well as an unhandled promise rejection) which prevents an offer creation, but the funds are still deducted from the account.

remaining eqb too low 2.png

remaining eqb too low 3.png

remaining eqb too low.png As you can see, the funds are still spent. marked as used.

EDIT: Solution would be to cap offer amount to not be greater than the order amount.

Note: make sure to cover the modal with tests.

kvagajack commented 6 years ago

^ The funds are not spend, instead the change address that was generated for the transaction got marked as isUsed.

@elliot-tio It also looks like the form allows to put the offer amount that is greater from the order amount.