Add transaction preview v2#50
Conversation
There was a problem hiding this comment.
Pull request overview
This PR upgrades the transaction signing popup to “Transaction Preview v2” by adding localized UI sections for decoded asset changes, fee details, and a risk review (including unknown asset movement / contract risk / execution warnings / GAS fee notices).
Changes:
- Added new localized strings for asset changes and risk review messaging (EN + zh-Hans) and updated the generated
Strings.Designer.cs. - Introduced lightweight view-model types for asset change rows and risk warnings.
- Updated
SendTransactionPopupUI + code-behind to compute and display asset-change rows, fee info, and risk warnings, while conditionally hiding request/execution details.
Reviewed changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| OneGateApp/Properties/Strings.zh-Hans.resx | Adds zh-Hans strings for the new preview sections. |
| OneGateApp/Properties/Strings.resx | Adds English strings for the new preview sections. |
| OneGateApp/Properties/Strings.Designer.cs | Exposes the new resource keys via strongly-typed properties. |
| OneGateApp/Models/TransactionPreviewWarning.cs | New model for risk warning rows in the preview UI. |
| OneGateApp/Models/TransactionPreviewAssetChange.cs | New model for decoded asset-change rows in the preview UI. |
| OneGateApp/Controls/Popups/SendTransactionPopup.xaml.cs | Builds asset-change and warning lists; updates DI constructor and derived visibility properties. |
| OneGateApp/Controls/Popups/SendTransactionPopup.xaml | Adds new sections (asset changes, risk review) and conditional visibility of detail sections. |
Files not reviewed (1)
- OneGateApp/Properties/Strings.Designer.cs: Generated file
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
erikzhang
left a comment
There was a problem hiding this comment.
There's too much repetitive information, such as transfer amounts and fees. The fee notifications also take up too much space, causing the most important transaction details to be pushed to the bottom, requiring scrolling to see them.
erikzhang
left a comment
There was a problem hiding this comment.
Some key information is missing:
- Asset hash, which users need to distinguish between genuine and fake tokens.
- Payment address and receiving address, which are crucial information users need to verify.
|
Latest review follow-up after merging current master (bb40f15): Erik requested fields are present in Transaction Preview v2. Each decoded asset-change row includes Asset hash, Payment address, and Receiving address; fees are kept as a compact total row with sys/net details, avoiding the earlier repetitive fee/risk layout. Copilot stale duplicate-pattern-variable and unused-XAML-resource threads are resolved. Validation on the current branch: conflict-marker scan passed; |


Summary
Scope
Verification
git diff --checkDEVELOPER_DIR=/Applications/Xcode-26.5.0.app/Contents/Developer dotnet build OneGateApp/OneGateApp.csproj -f net10.0-ios -p:RuntimeIdentifier=iossimulator-arm64 -p:BuildIpa=false -p:EnableCodeSigning=falseJAVA_HOME=/opt/homebrew/Cellar/openjdk@17/17.0.19/libexec/openjdk.jdk/Contents/Home dotnet build OneGateApp/OneGateApp.csproj -f net10.0-android -p:RuntimeIdentifier=android-arm64 -p:AndroidSdkDirectory=/opt/homebrew/share/android-commandlinetools -p:JavaSdkDirectory=/opt/homebrew/Cellar/openjdk@17/17.0.19/libexec/openjdk.jdk/Contents/Home -p:EmbedAssembliesIntoApk=trueprovider.sign(context), and stopped at the preview without pressing Continue/signing/broadcasting.emulator-5554. Loadedhttps://example.comin the dApp WebView, triggeredprovider.sign(context)through WebView CDP, and stopped at the preview without pressing Continue/signing/broadcasting. Crash buffer was empty.Screenshots
Known Limitations
TransferIntentandNep11TransferIntentdata; generic contract calls remain flagged as unknown/contract risk.