-
Notifications
You must be signed in to change notification settings - Fork 395
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OK-34490: Fix EIP-1559 support detection for custom networks #6390
Conversation
Review or Edit in CodeSandboxOpen the branch in Web Editor • VS Code • Insiders |
概述演练在 变更
序列图sequenceDiagram
participant Client as ClientEvm
participant RPC as Ethereum RPC
Client->>RPC: 检查 baseFeePerGas
alt baseFeePerGas 无效
Client-->>Client: 返回 isEIP1559FeeEnabled: false
else baseFeePerGas 有效
Client->>RPC: 调用 eth_maxPriorityFeePerGas
alt 调用成功
Client-->>Client: 返回 isEIP1559FeeEnabled: true
else 调用失败
Client-->>Client: 返回 isEIP1559FeeEnabled: false
end
end
Tip CodeRabbit's docstrings feature is now available as part of our Early Access Program! Simply use the command 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (1)
packages/kit-bg/src/vaults/impls/evm/sdkEvm/ClientEvm.ts
(1 hunks)
🔇 Additional comments (2)
packages/kit-bg/src/vaults/impls/evm/sdkEvm/ClientEvm.ts (2)
31-35
: 基础费用验证逻辑正确
代码正确处理了 baseFeePerGas 为 NaN 或 0 的情况,这符合 EIP-1559 的规范。
44-44
: 返回值逻辑清晰
返回值直接使用 maxPriorityFeeSupported 作为判断依据,逻辑简洁明了。
Summary by CodeRabbit