-
Notifications
You must be signed in to change notification settings - Fork 3
Refactor Ethereum txId logic and update tests #80
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
base: main
Are you sure you want to change the base?
Conversation
Standardizes Ethereum transaction hash calculation to use keccak256 of the signed/encoded transaction, removing previous logic that returned preHash. Updates related Android and iOS tests and wallet code to match this behavior, clarifies distinction between signing hash and transaction hash, and improves cache deserialization robustness.
PR SummaryStandardized Ethereum transaction hash calculation to use keccak256 of the signed/encoded transaction instead of returning Changes
autogenerated by presubmit.ai |
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.
🚨 Pull request needs attention.
Review Summary
Commits Considered (1)
- 59b4bcd: Refactor Ethereum txId logic and update tests
Standardizes Ethereum transaction hash calculation to use keccak256 of the signed/encoded transaction, removing previous logic that returned preHash. Updates related Android and iOS tests and wallet code to match this behavior, clarifies distinction between signing hash and transaction hash, and improves cache deserialization robustness.
Files Processed (11)
- Android/wallet/src/androidTest/java/com/flow/wallet/keys/EthereumKeyTests.kt (1 hunk)
- Android/wallet/src/androidTest/java/com/flow/wallet/keys/SeedPhraseKeyProviderTest.kt (1 hunk)
- Android/wallet/src/androidTest/java/com/flow/wallet/wallet/EthereumWalletTests.kt (4 hunks)
- Android/wallet/src/androidTest/java/com/flow/wallet/wallet/WalletInstrumentedTest.kt (2 hunks)
- Android/wallet/src/main/java/com/flow/wallet/keys/SeedPhraseKey.kt (6 hunks)
- Android/wallet/src/main/java/com/flow/wallet/storage/Cacheable.kt (4 hunks)
- Android/wallet/src/main/java/com/flow/wallet/wallet/EthereumSigningOutputExtensions.kt (1 hunk)
- Android/wallet/src/test/java/com/flow/wallet/keys/SeedPhraseKeyProviderTest.kt (1 hunk)
- iOS/FlowWalletKit/Sources/Wallet/EthereumSigningOutput+TxID.swift (2 hunks)
- iOS/FlowWalletKit/Sources/Wallet/Wallet+EOA.swift (1 hunk)
- iOS/FlowWalletKit/Tests/FlowWalletKitTests/EOATests.swift (2 hunks)
Actionable Comments (1)
-
Android/wallet/src/androidTest/java/com/flow/wallet/wallet/WalletInstrumentedTest.kt [54-55]
possible bug: "TODO implementation returns invalid data"
Skipped Comments (3)
-
Android/wallet/src/androidTest/java/com/flow/wallet/wallet/WalletInstrumentedTest.kt [56-57]
possible issue: "Unreachable code after TODO exception"
-
Android/wallet/src/main/java/com/flow/wallet/keys/SeedPhraseKey.kt [270-278]
maintainability: "Unused method with hardcoded values"
-
iOS/FlowWalletKit/Tests/FlowWalletKitTests/EOATests.swift [165-165]
maintainability: "Hardcoded private key lacks documentation"
| return ByteArray(1) | ||
| } |
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.
The TODO implementation should not return a hardcoded ByteArray(1). This could cause runtime issues if this method is actually called during testing.
Standardizes Ethereum transaction hash calculation to use keccak256 of the signed/encoded transaction, removing previous logic that returned preHash. Updates related Android and iOS tests and wallet code to match this behavior, clarifies distinction between signing hash and transaction hash, and improves cache deserialization robustness.