ens-registrar-dapp
ens-registrar-dapp copied to clipboard
DApp should offer bid backup/download without waiting for confirmation
...and without going via browser storage first; this way there's no chance that the browser can clear storage between a bid and the user being able to back it up.
This is especially needed when using the cheaper/slower gas price option, which can lead to a few minutes of waiting to see the "Download Bids" popup. During that time it is tempting to continue to work within the dapp and then perhaps quit, possibly forgetting to export the bids.
Even safer: the DApp could wait for the user to confirm that they've saved the bid info before sending the transaction (like myetherwallet.com)
I now realize the situation is even worse than I thought. The bid secret isn't even saved to LocalStorage until after the transaction confirms. So if the user exits the browser or reloads the page after bidding but before confirmation, not only do they miss the chance to make a backup, but the primary data isn't even saved in the browser.
This is based on my reading of:
https://github.com/ethereum/ens-registrar-dapp/blob/6de8e271f3aa15c3b1024176a624a4318b49f232/app/imports/templates/components/newBid.js#L172-L186
where updatePendingBids(name)
is not called until after the TxHandler
reports success, which happens only after confirmation in a block:
https://github.com/ethereum/ens-registrar-dapp/blob/c3c75bd8e8cdc613b4eca7c6e864072483733d85/app/imports/lib/helpers/helperFunctions.js#L126-L141
Am I interpreting that correctly?
This is incorrect. PendingBids is saved on localstorage as much as MyBids is and is constantly checked to see if it should be added to the MyBids collection
Good to hear! Sorry for the false alarm. I am glad I misinterpreted the code.