Retry a fee refusal at the fee the network charges now (0.5.10) #68

Merged
backmeupplz merged 1 commit from feat/current-fees into main 2026-11-02 13:57:05 +00:00
Owner

Follow-up to #67. A refused transaction came back at only 25% over its last fee. If network fees had risen past that, the retry was still too cheap.

Now, on a fee refusal Plain Wallet asks the RPC for current fees (estimateFeesPerGas). The new fee is shown and approved before anything is signed:

  • replace (replacement transaction underpriced / replacement fee too low): every fee field becomes the higher of current fees and the last try +25%.
  • fees (max fee per gas less than block base fee, transaction underpriced, fee too low): current fees, never lower than the last try. The note reads "Network fees went up, and the network refused the old fee. This is what it charges now."
  • Same in dapp approvals (up to 3 retries) and on the Send screen.

lib/chain.ts: feeRefusal() (which kind), raise() (pure, unit-tested) and refee() (fetches current fees, then raise). bump/underpriced are gone.

Release 0.5.10. Adds fastlane/metadata/android/*/changelogs/510.txt in all 24 store languages (≤406 chars) covering 0.5.7–0.5.10. Those three releases shipped without notes, which I missed.

Tested

  • npm test (new raise/feeRefusal asserts), tsc, npm run build, node scripts/store-copy.mjs, scripts/release unittests (82 OK).
  • anvil, mining off, behind a proxy that hides pool transactions from the pending nonce (like mainnet.base.org):
    • Base fee raised to 10 gwei after preparing at 2.4: refused max fee per gas less than block base fee → fees, re-offered 13 gwei, accepted.
    • Transaction waiting at the market fee: refused → replace, re-offered 3 / 1.25 gwei, accepted, replaced in the pool.
    • Transaction waiting at a 2 gwei tip, twice the market: three replace rounds (one approval each), then accepted. A waiting transaction's fee can't be seen, so one priced far above the market can take more rounds than the 3 allowed. A stuck transaction is usually at or under the market, though.
  • Not done: clicking through the real extension UI.

🤖 Generated with Claude Code

Follow-up to #67. A refused transaction came back at only 25% over its last fee. If network fees had risen past that, the retry was still too cheap. **Now**, on a fee refusal Plain Wallet asks the RPC for current fees (`estimateFeesPerGas`). The new fee is shown and approved before anything is signed: - **`replace`** (`replacement transaction underpriced` / `replacement fee too low`): every fee field becomes the higher of current fees and the last try +25%. - **`fees`** (`max fee per gas less than block base fee`, `transaction underpriced`, `fee too low`): current fees, never lower than the last try. The note reads *"Network fees went up, and the network refused the old fee. This is what it charges now."* - Same in dapp approvals (up to 3 retries) and on the Send screen. `lib/chain.ts`: `feeRefusal()` (which kind), `raise()` (pure, unit-tested) and `refee()` (fetches current fees, then `raise`). `bump`/`underpriced` are gone. **Release 0.5.10.** Adds `fastlane/metadata/android/*/changelogs/510.txt` in all 24 store languages (≤406 chars) covering 0.5.7–0.5.10. Those three releases shipped without notes, which I missed. **Tested** - `npm test` (new `raise`/`feeRefusal` asserts), `tsc`, `npm run build`, `node scripts/store-copy.mjs`, `scripts/release` unittests (82 OK). - anvil, mining off, behind a proxy that hides pool transactions from the pending nonce (like mainnet.base.org): - Base fee raised to 10 gwei after preparing at 2.4: refused `max fee per gas less than block base fee` → `fees`, re-offered 13 gwei, accepted. - Transaction waiting at the market fee: refused → `replace`, re-offered 3 / 1.25 gwei, accepted, replaced in the pool. - Transaction waiting at a 2 gwei tip, twice the market: three replace rounds (one approval each), then accepted. A waiting transaction's fee can't be seen, so one priced far above the market can take more rounds than the 3 allowed. A stuck transaction is usually at or under the market, though. - Not done: clicking through the real extension UI. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Retry a fee refusal at the fee the network charges now
All checks were successful
Store release / select-stores (pull_request) Has been skipped
Store texts / check (pull_request) Successful in 33s
Store release / build-apple (pull_request) Successful in 1m14s
Store release / build (pull_request) Successful in 1m39s
Store release / github-release (pull_request) Has been skipped
Store release / submit-apple (pull_request) Has been skipped
Store release / report (pull_request) Has been skipped
a2872a5740
A refused fee used to come back at only 25% over the last try, which can still
be below the network after fees rose. Now the wallet asks the RPC for current
fees: a replacement offers the higher of those and the last try +25% on every
field, and a "max fee per gas less than block base fee" / "transaction
underpriced" refusal offers the current fees. Either way you approve the new
fee first. Release 0.5.10, with store notes in every language covering
0.5.7-0.5.10 (those releases had none).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
backmeupplz deleted branch feat/current-fees 2026-11-02 13:57:05 +00:00
Sign in to join this conversation.
No description provided.