-
Notifications
You must be signed in to change notification settings - Fork 6
Dev copy #2271
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
Conversation
…on (#2265) * feat: add headless rn on app launch * feat: remove event bus pattern * feat: check blocto keys * feat: blocto rotation logic * feat: update Model from RN * feat: check blocto each time when switch profile * feat: update route name * feat: update sign param * fix: UI error on iOS 26 * feat: dump version 3.0.12 * feat: empty setScreenSecurityLevel * feat: first filter valid key --------- Co-authored-by: lmcmz <[email protected]>
# Conflicts: # .gitignore # FRW.xcodeproj/project.pbxproj # FRW/App/AppDelegate.swift # FRW/Foundation/Bridge/BridgeModels.swift # FRW/Foundation/Bridge/RCTNativeFRWBridge.mm # FRW/Foundation/Bridge/TurboModuleSwift.swift # FRW/Modules/Login/ViewModel/KeyStoreLoginViewModel.swift # FRW/Modules/Login/ViewModel/PrivateKeyLoginViewModel.swift # FRW/Modules/Login/ViewModel/SeedPhraseLoginViewModel.swift # FRW/Modules/ReactNative/ReactNativeViewController.swift # FRW/Services/Manager/UserManager.swift # FRW/Services/Manager/Wallet/WalletManager.swift # FRW/Services/Router/RouteMap+React.swift # Podfile.lock # main.jsbundle
PR SummaryImplemented Blocto key detection service and key rotation workflow integration for iOS. Added a new Changes
autogenerated by presubmit.ai |
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
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 (7)
Conflicts:
.gitignore
FRW.xcodeproj/project.pbxproj
FRW/App/AppDelegate.swift
FRW/Foundation/Bridge/BridgeModels.swift
FRW/Foundation/Bridge/RCTNativeFRWBridge.mm
FRW/Foundation/Bridge/TurboModuleSwift.swift
FRW/Modules/Login/ViewModel/KeyStoreLoginViewModel.swift
FRW/Modules/Login/ViewModel/PrivateKeyLoginViewModel.swift
FRW/Modules/Login/ViewModel/SeedPhraseLoginViewModel.swift
FRW/Modules/ReactNative/ReactNativeViewController.swift
FRW/Services/Manager/UserManager.swift
FRW/Services/Manager/Wallet/WalletManager.swift
FRW/Services/Router/RouteMap+React.swift
Podfile.lock
main.jsbundle
-
feat: add headless rn on app launch
-
feat: remove event bus pattern
-
feat: check blocto keys
-
feat: blocto rotation logic
-
feat: update Model from RN
-
feat: check blocto each time when switch profile
-
feat: update route name
-
feat: update sign param
-
fix: UI error on iOS 26
-
feat: dump version 3.0.12
-
feat: empty setScreenSecurityLevel
-
feat: first filter valid key
Co-authored-by: lmcmz [email protected]
Files Processed (16)
- .gitignore (1 hunk)
- FRW.xcodeproj/project.pbxproj (19 hunks)
- FRW/App/AppDelegate.swift (1 hunk)
- FRW/Foundation/Bridge/BridgeModels.swift (4 hunks)
- FRW/Foundation/Bridge/RCTNativeFRWBridge.mm (2 hunks)
- FRW/Foundation/Bridge/TurboModuleSwift.swift (4 hunks)
- FRW/Foundation/Model/Error.swift (1 hunk)
- FRW/Modules/MultiRestore/ViewModel/RestoreMultiConnectViewModel.swift (1 hunk)
- FRW/Modules/PushAlert/PushAlertView.swift (1 hunk)
- FRW/Modules/ReactNative/ReactNativeViewController.swift (5 hunks)
- FRW/Services/Manager/UserManager.swift (1 hunk)
- FRW/Services/Manager/Wallet/BloctoDetectorService.swift (1 hunk)
- FRW/Services/Manager/Wallet/WalletManager.swift (3 hunks)
- FRW/Services/Router/RouteMap+React.swift (2 hunks)
- FRW/Services/Router/RouteableUIHostingController.swift (4 hunks)
- main.jsbundle (0 hunks)
Actionable Comments (2)
-
FRW/Services/Manager/Wallet/BloctoDetectorService.swift [31-31]
possible bug: "Hash algorithm mismatch between detection and key creation."
-
FRW/Services/Manager/Wallet/WalletManager.swift [257-258]
possible bug: "Duplicate assignment overwrites conditional logic."
Skipped Comments (4)
-
FRW/Foundation/Bridge/TurboModuleSwift.swift [152-158]
enhancement: "Missing validation for mnemonic strength parameter."
-
FRW/Foundation/Bridge/TurboModuleSwift.swift [554-565]
maintainability: "Unused private extension method."
-
FRW/Services/Manager/Wallet/BloctoDetectorService.swift [43-43]
possible issue: "Cache persistence may cause stale data issues."
-
FRW/Foundation/Bridge/TurboModuleSwift.swift [155-156]
maintainability: "Incomplete TODO comment left in production code."
| let account = try await FlowNetwork.getAccountAtLatestBlock(address: normalized) | ||
| let keys = account.keys | ||
| let candidateKeys = keys.filter { | ||
| $0.signAlgo == .ECDSA_SECP256k1 && $0.hashAlgo == .SHA3_256 |
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 detection logic checks for SHA3_256 hash algorithm, but the createSeedKey function in TurboModuleSwift.swift creates keys with SHA2_256. This inconsistency might cause issues where newly created keys don't match the detection criteria, or the detection logic may not correctly identify all Blocto keys.
| } | ||
| selectedAccount = .main(account.address) |
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 line selectedAccount = .main(account.address) is duplicated. The first assignment on line 256 (in the else branch) is immediately overwritten by this unconditional assignment, making the conditional logic above ineffective.
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
Files Processed (11)
- .gitignore (1 hunk)
- FRW.xcodeproj/project.pbxproj (19 hunks)
- FRW/App/AppDelegate.swift (1 hunk)
- FRW/Foundation/Bridge/BridgeModels.swift (4 hunks)
- FRW/Foundation/Bridge/RCTNativeFRWBridge.mm (2 hunks)
- FRW/Foundation/Bridge/TurboModuleSwift.swift (4 hunks)
- FRW/Foundation/Model/Error.swift (1 hunk)
- FRW/Modules/Login/ViewModel/LoginViewModelProtocol.swift (2 hunks)
- FRW/Modules/MultiRestore/ViewModel/RestoreMultiConnectViewModel.swift (1 hunk)
- FRW/Modules/PushAlert/PushAlertView.swift (1 hunk)
- FRW/Modules/ReactNative/ReactNativeViewController.swift (5 hunks)
Actionable Comments (1)
-
FRW/Modules/Login/ViewModel/LoginViewModelProtocol.swift [167-168]
possible issue: "Behavioral change in key filtering logic may break existing functionality."
Skipped Comments (5)
-
FRW/Foundation/Bridge/TurboModuleSwift.swift [152-158]
possible issue: "Missing validation for BIP39 strength parameter."
-
FRW/Foundation/Bridge/TurboModuleSwift.swift [155-156]
maintainability: "Incomplete TODO comment left in production code."
-
FRW/Foundation/Bridge/TurboModuleSwift.swift [554-565]
maintainability: "Unused private extension method."
-
FRW/Modules/Login/ViewModel/LoginViewModelProtocol.swift [155-158]
possible bug: "Guard statement checks nil but doesn't bind the value."
-
FRW/Modules/ReactNative/ReactNativeViewController.swift [27-27]
maintainability: "Unused property stored but never referenced."
| let filteredKeys = matchingKeys.filter { $0.weight >= 1000 && !$0.revoked } | ||
| guard let selectedKey = filteredKeys.first else { |
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 logic now filters keys by weight >= 1000 and !revoked, but the original code selected from matchingKeys without these filters. This is a behavioral change that could cause login failures for users with keys that have lower weights or have been revoked but were previously accepted.
Related Issue
Summary of Changes
Need Regression Testing
Risk Assessment
Additional Notes
Screenshots (if applicable)