swarmcity / SwarmCityDapp

Swarm City dApp FrontEnd
MIT License
28 stars 10 forks source link

error message on reply with insufficient funds #809

Closed kikipluche closed 6 years ago

kikipluche commented 6 years ago

Location

detail

Expected behavior

when i have unsufficient funds to reply to a certain deal (amount + fee) i get an error message "insufficient funds"

Actual behavior

provider with unsufficient funds can proceed, reply to a deal, the seeker can accept , provider can fund the deal, deal seems successful for provider, but seeker is stuck on "you selected..." what provider sees: (incorrect, because the deal cannot be funded with insufficient funds"

screen shot 2018-09-11 at 14 55 09

what seeker sees: still on selected (correct, since the deal cannot be funded by the provider)

screen shot 2018-09-11 at 14 51 15

Steps to reproduce the problem

reply to a deal that has more SWT on it than i have

Operating system / hardware

all

xardass commented 6 years ago

Nice find! I will add a check on both instances: reply & fund. @kingflurkel check the reply function in contract

kikipluche commented 6 years ago

@xardass i saw you already implemented the check on the front end, can you change the copy to thus: "You have insufficient funds to participate in this deal."

screen shot 2018-09-12 at 16 29 33
kikipluche commented 6 years ago

@xardass also, the check is done when replying as provider, but not yet when i fund after being selected. So can we have a second check there? Thanks

xardass commented 6 years ago

@kikipluche Check added to funding (accepting being selected) & reply, and I changed the sentence. Check & close

kikipluche commented 6 years ago

@kingflurkel do you still want to add something on contract level?