OutlierVentures / BuyCoPoc

BuyCo.io Proof of Concept on an Ethereum blockchain
Apache License 2.0
0 stars 1 forks source link

ensureMinBalance: called twice, so new address gets 2x min balance #87

Open AronVanAmmers opened 8 years ago

AronVanAmmers commented 8 years ago

The function to ensure users have a minimum balance of "ether" is called twice. Once on loading accounts, once on saving them.

Cause: Because the load function also calls the save function and this happens before any transactions are completed, the second time that ensureMinBalance is called it still sees a low balance, and sends another transaction.