diff --git a/README.md b/README.md index 709333c..445096e 100644 --- a/README.md +++ b/README.md @@ -1743,37 +1743,46 @@ view would leave a wallet one click from deletion. arrives, as the balance minus the reserve, and the transaction is signed with that estimate's fee fields, so a fee fetched again at signing cannot exceed what the amount leaves behind. The address keeps whatever part of - the reserve the transaction does not use. If the balance no longer covers - the fee, the amount is left as it was and the amount-plus-fee error below - blocks the send - - Your balance: value + symbol (USD in parentheses), or `unknown (SYMBOL)` - for a token whose scale is unknown + the reserve the transaction does not use. If the balance could not be read + or no longer covers the fee, the amount is left as it was and one of the + errors below blocks the send + - Your balance: the From address's balance on the network its transaction + was reviewed on, read from that network's RPC endpoint each time the + screen is shown, so a screen the popup reopens onto states and checks that + network's balance as it is then, whichever network is active. "Loading..." + until the read returns, then value + symbol (USD in parentheses), or + `unknown (SYMBOL)` for a token whose scale is unknown or when the read + failed. The amount check uses the same balances: the ETH balance, and for + a token transfer the token balance as well - Network fee: "Estimating..." then two lines, or "Unable to estimate", - fetched async. The first line is what the transfer is expected to cost, - `gasLimit * gasPrice` (USD in parentheses); the second is the - `gasLimit * maxFeePerGas` reserve the node requires, which is what the - balance check gates on. The second line is omitted on a network with no - type-2 pricing, where the two are the same number, but its space is - reserved either way + fetched async once the balance is read. The first line is what the + transfer is expected to cost, `gasLimit * gasPrice` (USD in parentheses); + the second is the `gasLimit * maxFeePerGas` reserve the node requires, + which is what the balance check gates on. The second line is omitted on a + network with no type-2 pricing, where the two are the same number, but its + space is reserved either way - Warnings: inline warnings from the local checks (scam address, self-send) plus four reserved warning boxes made visible by the async checks — recipient that has never sent a transaction and holds no ETH, recipient is a contract, burn address, and an Etherscan phishing/scam label. An address that has received ETH but never sent a transaction still holds that ETH, so it gets no warning - - Errors (insufficient balance), plus three reserved error boxes — the - amount plus the fee exceeds the balance (ETH transfers), not enough ETH to - pay the fee for the transfer (ERC-20 transfers), and the fee could not be - estimated. The first two are mutually exclusive per transfer type, so only - the applicable one holds space. The last names its cause: for a token - whose scale is unknown the fee can never be estimated, and it says the - wallet does not know how many decimal places the token uses and that the - transaction cannot be sent; for any other failure it asks the user to go - back and try again + - Errors (an invalid amount), plus five reserved error boxes, so the balance + and the fee arriving later move nothing — the amount exceeds the balance + (for a token whose scale is unknown it says the token's balance is + unknown), the balance could not be read (it asks the user to go back and + try again), the amount plus the fee exceeds the balance (ETH transfers), + not enough ETH to pay the fee for the transfer (ERC-20 transfers), and the + fee could not be estimated. The third and fourth are mutually exclusive + per transfer type, so only the applicable one holds space. The last names + its cause: for a token whose scale is unknown the fee can never be + estimated, and it says the wallet does not know how many decimal places + the token uses and that the transaction cannot be sent; for any other + failure it asks the user to go back and try again - Password: an inline field on this screen, not a modal, with its own error line - - "Sign & Send" button (disabled if errors, and while the network fee - estimate is pending or unavailable) + - "Sign & Send" button (disabled if errors, while the balance is being read, + and while the network fee estimate is pending or unavailable) - **Transitions**: - "Sign & Send" (correct password) → broadcast tx → **WaitTx** - "Sign & Send" (correct password) → broadcast fails → **ErrorTx** @@ -1795,9 +1804,9 @@ view would leave a wallet one click from deletion. whichever network is active: its amounts are in that network's native currency, its USD values are that network's, so a testnet transaction shows none, its From, To and token contract links open that network's - explorer, the fee estimate and the contract and never-sent recipient - checks ask that network's RPC endpoint, and the Etherscan label check asks - that network's explorer + explorer, the balance read, the fee estimate and the contract and + never-sent recipient checks ask that network's RPC endpoint, and the + Etherscan label check asks that network's explorer - "Sign & Send" (wrong password) → "Wrong password." on the password error line, no screen change - "Sign & Send" signs as the From address above, not as whichever address is diff --git a/src/popup/index.html b/src/popup/index.html index ba170ca..9d8ba02 100644 --- a/src/popup/index.html +++ b/src/popup/index.html @@ -664,6 +664,20 @@ id="confirm-errors" class="mb-2 border border-border border-dashed p-2 invisible min-h-[1.25rem]" > + + +