-
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
fix: swap estimate fee error on hw #6382
Conversation
Review or Edit in CodeSandboxOpen the branch in Web Editor • VS Code • Insiders |
概述代码变更步骤本次代码变更涉及三个不同的文件,主要包括事务处理、交易费用容器和浮动图标设置。这些变更旨在优化代码逻辑和用户交互体验。 变更
事务处理变更详细说明代码变更在 async function createTokenTransaction({
...,
maxSendNativeToken = false
}) {
// 根据 maxSendNativeToken 调整交易逻辑
} 变更序列图sequenceDiagram
participant User
participant Transaction
participant Coins
User->>Transaction: 创建代币交易
Transaction->>Coins: 检查 maxSendNativeToken
alt maxSendNativeToken 为 true
Coins-->>Transaction: 使用过滤后的币种
Transaction->>Transaction: 设置 Gas 支付
else maxSendNativeToken 为 false
Transaction->>Transaction: 使用默认交易逻辑
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: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (3)
packages/kit-bg/src/vaults/impls/bfc/sdkBfc/transactions.ts
(1 hunks)packages/kit/src/views/Send/pages/SendConfirm/TxFeeContainer.tsx
(1 hunks)packages/kit/src/views/Setting/pages/FloatingIcon/index.tsx
(1 hunks)
🔇 Additional comments (2)
packages/kit/src/views/Setting/pages/FloatingIcon/index.tsx (1)
35-37
: 仅是格式上的微调,逻辑并未改变,当前实现清晰可读。
packages/kit-bg/src/vaults/impls/bfc/sdkBfc/transactions.ts (1)
107-107
: 新增的“maxSendNativeToken”逻辑可读性不错,帮助区分最大原生币发送场景。整体实现看上去符合预期。
Summary by CodeRabbit
新功能
maxSendNativeToken
,以增强代币交易逻辑。错误修复
样式
FloatingIconModal
组件的代码进行了格式化,以提高可读性。