Automatic account detection
Overview
When a user connects a wallet we want to automatically detect and populate those accounts with a balance.
References and additional details
We want to be efficient with the way we check for accounts.
Options might include always checking the first 3 accounts for a balance in batch, and then only checking for additional accounts if account 3 has a balance.
Another option might be to sequentially check one by one until we hit an account with no balance, though I suspect it'll be more efficient to check in batches initially, and then sequentially check the long-tail, or something.
We'll likely also use a heuristic that says if an account is empty the next account likely is two.
Acceptance Criteria
All accounts with a balance get populated.
Need By Date
No response
Screenshots/Mockups
No response
Estimated effort
No response
{
"balance": "0",
"unconfirmedBalance": "0",
"nonce": 0,
"pubkey": "0x41b4D81dD40c6c91d21f686Bb0596E37e4C8cb90",
"tokens": []
}
if (balance === '0' && nonce === '0' && tokens.length === 0) we have an unused account - no need to call unchained for tx history
0x41b4D81dD40c6c91d21f686Bb0596E37e4C8cb90 empty address at https://api.ethereum.shapeshift.com/docs/#/v1/GetAccount
blocked by https://github.com/shapeshift/web/issues/2882 - granular tx loading status will help with this immensely