310/897 ios upgrade register endpoint from v3 to v4#2264
Conversation
PR SummaryUpgraded the iOS app's authentication endpoints from v3 to v4 API, introducing support for EVM account information alongside Flow account data. The changes include restructuring request models to use 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.
🚨 Pull request needs attention.
Review Summary
Commits Considered (4)
Files Processed (8)
- FRW.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved (2 hunks)
- FRW/Foundation/Bridge/RCTNativeFRWBridge.mm (1 hunk)
- FRW/Foundation/Bridge/TurboModule+Onboard.swift (1 hunk)
- FRW/Modules/Login/SyncAddDeviceView.swift (1 hunk)
- FRW/Modules/Login/ViewModel/LoginViewModelProtocol.swift (1 hunk)
- FRW/Services/Manager/UserManager.swift (7 hunks)
- FRW/Services/Network/FRW/FRWAPI+User.swift (2 hunks)
- FRW/Services/Network/FRW/Model/Request/UserRequests.swift (2 hunks)
Actionable Comments (1)
-
FRW/Foundation/Bridge/RCTNativeFRWBridge.mm [330-330]
typo: "Typo in error message string."
Skipped Comments (2)
-
FRW/Services/Manager/UserManager.swift [618-625]
possible bug: "Dead code block that never assigns
evmAccountInfo." -
FRW/Foundation/Bridge/TurboModule+Onboard.swift [171-172]
maintainability: "Unreachable code after return statement."
| - (void)getV4RegistrationSignatures:(NSString *)mnemonic resolve:(RCTPromiseResolveBlock)resolve reject:(RCTPromiseRejectBlock)reject { | ||
| [TurboModuleSwift getV4RegisteredSignatureWithMnemonic:mnemonic completionHandler:^(NSDictionary<NSString *,id> * _Nullable result, NSError * _Nullable error) { | ||
| if (error) { | ||
| reject(@"fet signature fail for regist v4 ", error.localizedDescription, error); |
There was a problem hiding this comment.
There's a typo in the error code string: "fet signature fail for regist v4" should be "get signature fail for register v4".
There was a problem hiding this comment.
🚨 Pull request needs attention.
Review Summary
Commits Considered (1)
- fb6d723: Merge branch 'dev' into 310/897-ios-upgrade-register-endpoint-from-v3-to-v4
Files Processed (7)
- FRW.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved (2 hunks)
- FRW/Foundation/Bridge/RCTNativeFRWBridge.mm (1 hunk)
- FRW/Foundation/Bridge/TurboModule+Onboard.swift (1 hunk)
- FRW/Modules/Login/ViewModel/LoginViewModelProtocol.swift (1 hunk)
- FRW/Services/Manager/UserManager.swift (7 hunks)
- FRW/Services/Network/FRW/FRWAPI+User.swift (2 hunks)
- FRW/Services/Network/FRW/Model/Request/UserRequests.swift (2 hunks)
Actionable Comments (1)
-
FRW/Services/Manager/UserManager.swift [618-625]
possible bug: "EVM account info is never populated in this code path."
Skipped Comments (2)
-
FRW/Foundation/Bridge/TurboModule+Onboard.swift [171-172]
enhancement: "Consider error handling for ethAddress call."
-
FRW/Services/Manager/UserManager.swift [214-214]
possible issue: "Empty data fallback may cause silent authentication failures."
| let flowAccountInfo = FlowAccountInfo(accountKey: key, signature: signature.hexValue) | ||
| var evmAccountInfo: EVMAccountInfo? | ||
| if let ethProvider = secureKey as? EthereumKeyProtocol, | ||
| let evmSignature = try? ethProvider.ethSign(digest: signData) { | ||
| // SecureEnclaveKey might not have a direct ethAddress in this context, | ||
| // but if it supports ethSign, we might need more info. | ||
| // For now, following the pattern. | ||
| } |
There was a problem hiding this comment.
The evmAccountInfo variable is declared and conditionally populated, but the if block only checks if ethSign is available without actually setting evmAccountInfo. The comment suggests uncertainty about how to get the EVM address. This results in evmAccountInfo always being nil in this code path, which may not be the intended behavior.
Related Issue
Summary of Changes
Need Regression Testing
Risk Assessment
Additional Notes
Screenshots (if applicable)