Repository navigation
update gas estimation and tx fee - #1717
Conversation
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0d3fc4ee01
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
🔵 Needs a closer look
Cross-chain signing and sponsorship accounting require human validation, alongside resolution of the retained findings.
2 open issues
What changed in this PR
Refactors transaction estimation across Ethereum and Conflux, separating fee suggestions from gas limits and sender costs.
Changes:
- Unifies estimation across send, confirmation, resend, and gas-editing flows.
- Updates sponsorship accounting and signing-time fee validation.
- Adds localized low-fee warnings and marks gas buffers deprecated.
| File | Description |
|---|---|
| packages/rpcs/wallet_sendTransaction/index.js | Normalizes supplied fees before confirmation. |
| packages/rpcs/eth_signTransaction/index.js | Validates fee caps and avoids unnecessary quotes. |
| packages/rpcs/cfx_signTransaction/index.js | Adds equivalent Core fee validation. |
| packages/popup/src/utils/index.js | Uses the selected price for balance checks. |
| packages/popup/src/utils/gas.js | Combines user limits with estimates. |
| packages/popup/src/pages/SendTransaction/index.js | Adopts unified estimation. |
| packages/popup/src/pages/ResendTransaction/index.js | Fetches replacement fee suggestions separately. |
| packages/popup/src/pages/EditGasFee/index.js | Uses unified estimates and limit validation. |
| packages/popup/src/pages/ConfirmTransaction/index.js | Updates fee accounting and low-fee warnings. |
| packages/popup/src/pages/ConfirmCallBundle/useCallBundleEstimate.js | Delegates bundle estimation to the shared hook. |
| packages/popup/src/pages/ConfirmCallBundle/index.js | Updates limit validation and preserves edits. |
| packages/popup/src/pages/ConfirmCallBundle/components/CallBundleGasEditor.js | Adapts editor initialization. |
| packages/popup/src/locales/zh.js | Adds Chinese low-fee warning. |
| packages/popup/src/locales/uk.js | Adds Ukrainian low-fee warning. |
| packages/popup/src/locales/ru.js | Adds Russian low-fee warning. |
| packages/popup/src/locales/fr.js | Adds French low-fee warning. |
| packages/popup/src/locales/en.js | Adds English low-fee warning. |
| packages/popup/src/hooks/useTransactionEstimate.js | Coordinates limits, costs, balances, and sponsorship. |
| packages/popup/src/hooks/useGasFeeSuggestions.js | Adds independent fee-suggestion fetching. |
| packages/popup/src/hooks/useApi.js | Documents gas-buffer deprecation only. |
| packages/popup/src/hooks/useAdvancedGasEditor.js | Separates displayed limits from explicit choices. |
| packages/popup/src/hooks/index.js | Removes the old estimator wrapper and preserves limits. |
| packages/popup/src/components/AdvancedGasEditor.js | Validates against estimated limits. |
| packages/estimate-tx/index.js | Exports separated estimation helpers. |
| packages/estimate-tx/eth.test.js | Adapts EIP-7702 tests to the new interface. |
| packages/estimate-tx/eth.js | Separates gas estimation from fee calculation. |
| packages/estimate-tx/cfx.js | Separates estimation and sponsorship-aware costs. |
| packages/background/src/init-db.js | Adds gas-buffer deprecation comments only. |
| .yarn/versions/fca8b46c.yml | Records package patch releases. |
Review effort: Balanced
|
@codex review |
|
Codex Review: Didn't find any major issues. Nice work! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Merge Queue Status
This pull request spent 9 seconds in the queue, with no time running CI. Required conditions to merge
|

This change is