Currently, exceptions thrown during transactions or gas estimation that were spawned in another thread are not being propagated, due to a limitation in nim (see https://nim-lang.org/docs/manual_experimental.html#parallel-amp-spawn).
This means any exceptions from status-go were not propagated correctly and would cause the app to crash. This includes entering the wrong password when trying to send a transaction.
The issue was addressed by passing a `success` variable by reference, which is set to false if an exception was thrown by status-go.
This commit address two bugs:
1. When importing a mnemonic, the resulting "master" account and its address
was used as account to be stored as opposed to its derived default account
2. The account was stored in the wrong path, resulting in status not being able
to locate accounts when sending transactions.
Fixes#787
Disable the selection of "contact" in the send transaction modal, because right now, this is not possible, but it will be in the future. Once we get this working, we can uncomment it.
Fixes: #815
Previously, only stickers purchased from the main status account were shown. Now, stickers purchased from any of the accounts are shown.
Accounts include any accounts returned by `accounts_getAccounts` and are non-chat accounts.
Fixes#788.
Fixes#853.
Fixes#856.
refactor: gas estimation and transaction sends have been abstracted to allow calling `estimateGas`, `send`, and `call` on the contract method (similar to the web3 API).
Moved sticker pack gas estimation and purchase tx over to the new API
*Sticker purchase:*
- gas estimate is done using new API and debounced using a timer
*Wallet send transaction:*
- tokens can now be sent
- gas is estimated correctly for a token tx, and debounced using a timer
***NOTE***
1. If attempting to send tokens on testnet, you must use a custom token as the token addresses in the pre-built list are for mainnet and will not work on testnet.
2. The new API should support all existing gas estimates, send txs, and calls. The loading of sticker pack data, balance, count, purchased sticker packs, etc, can be moved over to the new API. Almost all of the `eth_sendTransaction`, `eth_gasEstimate`, and `eth_call` could be move over as well (that's the idea at least).