Skip to content

Conversation

@lmcmz
Copy link
Contributor

@lmcmz lmcmz commented Jun 16, 2025

Related Issue

Close #1401

Summary of Changes

Need Regression Testing

  • Yes
  • No

Risk Assessment

  • Low
  • Medium
  • High

Additional Notes

Screenshots (if applicable)

lmcmz and others added 30 commits March 29, 2025 02:10
# Conflicts:
#	FRW.xcodeproj/project.pbxproj
#	FRW/Services/Manager/WalletManager.swift
zhouxl and others added 24 commits May 13, 2025 13:14
… to flow (#1283)

* feat: ChildAccountManager.shared.selectedChildAccount -> WalletManager.shared.selectedChildAccount EVMAccountManager.shared.selectedAccount -> WalletManager.shared.selectedEVMAccount

* feat: Syntax error

* fix: NFT Add Collection only show when is mainaccount
#1302)

fix: #1301 After successfully adding the key, the status judgment was incorrect
…#1300)

* feat: Modify one place and all versions of the target will be updated

* feat: update version to 2.4.7
* feat: #1319 update struct for stake delegator info

* feat: udpate version to 2.4.8

* feat: update stake delegateId
* feat: format all balance

* feat: format wallet price
…wallet-for-ai-sports-rebooted-and-still-doesnt-work

Fix optional chains is ignore when check chainID
…n-token-detail-page-when-its-evm-account

Only show storage info under flow account
…nt-not-shown-on-ios

Fix child account no image issue
@lmcmz lmcmz requested a review from a team as a code owner June 16, 2025 06:25
@github-actions
Copy link

github-actions bot commented Jun 16, 2025

PR Summary

Refactored wallet management system with new account handling, updated project dependencies, and removed legacy domain claim functionality. Added dependency injection container and improved error handling.

Changes

File Summary
FRW.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved Updated multiple package dependencies including Alamofire, AppAuth, Atlantis, BigInt, CryptoSwift. Added new Factory package for dependency injection. Changed wallet-core source to trustwallet.
FRW/App/AppDelegate.swift Removed flowConfig() method, updated network checks to use direct comparison, added install info recording and key chain accessibility update on launch.
FRW/App/Container.swift Created new container file with Factory registrations for WalletManager, TokenBalanceHandler, and TransactionManager.
FRW/Foundation/Model/FWAccount.swift Introduced FWAccount enum to handle different account types (main, child, coa) with codable support and helper methods.
FRW/Foundation/Model/WalletModels.swift Updated TokenModel with new fields for price and balance information. Deprecated legacy fields and added new helper methods for balance formatting.
FRW/Foundation/Model/Error.swift Added new error types for wallet operations including account, transaction, and backup related errors.
FRW/Modules/Browser/Handler/JSMessageHandler.swift Modified network comparison logic to use new network type system.
FRW/Modules/Browser/Model/FCLScripts.swift Modified message signing to use async/await pattern and updated network handling.
FRW/Modules/Domain Removed ClaimDomainView and ClaimDomainViewModel files, deprecating domain claim functionality.

autogenerated by presubmit.ai

Copy link

@github-actions github-actions bot left a 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 (30)

Add dev tag for dev app

  • 6273c2b: Add dev tag for dev app
  • 15ad596: Merge pull request #1206 from onflow/fix/xcode-build-error

Fix/xcode build error

  • d3e1bb3: feat: remove localUserDefault key flownetwork
  • 0c3592f: feat: update for new manager
  • 81d0765: Merge pull request #1196 from onflow/merge/from-main

Merge/from main

  • 467040a: Merge branch 'main' into merge/from-main
  • 33c24ed: Merge branch 'main' into merge/from-main

Conflicts:

FRW.xcodeproj/project.pbxproj

FRW/Services/Manager/WalletManager.swift

  • e8a6e86: Merge pull request #1008 from onflow/124-bug-unable-to-interact-with-webpage

WalletManager refactor

  • 34e1cdb: Remove unused func
  • d50dbb2: Use local wallet kit for temp
  • 7523b5d: Merge remote-tracking branch 'origin' into 124-bug-unable-to-interact-with-webpage
  • 9874939: Fix build error
  • 518b737: Remove flow network with flow.chainId
  • 00cd0e3: Update cloudfunctions.json
  • 3cf7394: Fix build error
  • ffad1ee: Merge remote-tracking branch 'origin' into 124-bug-unable-to-interact-with-webpage
  • bb52599: rename currentMainAccount to mainAccount
  • 80fe616: Merge remote-tracking branch 'origin' into 124-bug-unable-to-interact-with-webpage
  • 82fa178: Fix build error
  • 123b3fe: Fix incorrect signer issue
  • 7188410: Add DI
  • 10fd80e: Simplify logic
  • 64b2308: Code cleanup
  • 840b356: Simplify wallet manager logic
  • 1218018: Add selectedAccount and currentAccount
  • 606e7d9: WalletManager refactor
Files Processed (30)
  • FRW.xcodeproj/project.pbxproj (0 hunks)
  • FRW.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved (15 hunks)
  • FRW/App/AppDelegate.swift (6 hunks)
  • FRW/App/Container.swift (1 hunk)
  • FRW/App/Env/Prod/Info.plist (1 hunk)
  • FRW/App/Env/ServiceConfig.swift (1 hunk)
  • FRW/Foundation/Base/FlowLog.swift (1 hunk)
  • FRW/Foundation/BridgeFeePayer.swift (1 hunk)
  • FRW/Foundation/Model/Error.swift (5 hunks)
  • FRW/Foundation/Model/FWAccount.swift (1 hunk)
  • FRW/Foundation/Model/FWAddress.swift (2 hunks)
  • FRW/Foundation/Model/FlowNetworkType.swift (1 hunk)
  • FRW/Foundation/Model/TokenModelResponse.swift (1 hunk)
  • FRW/Foundation/Model/WalletModels.swift (5 hunks)
  • FRW/Modules/Backup/BackupPasswordView.swift (1 hunk)
  • FRW/Modules/Backup/ManualBackupView.swift (1 hunk)
  • FRW/Modules/Backup/RecoveryPhraseView.swift (1 hunk)
  • FRW/Modules/BlockList/BlocklistHandler.swift (1 hunk)
  • FRW/Modules/Browser/Bookmark/BrowserBookmarkView.swift (1 hunk)
  • FRW/Modules/Browser/BrowserViewController+JS.swift (2 hunks)
  • FRW/Modules/Browser/DApps/DAppsListView.swift (2 hunks)
  • FRW/Modules/Browser/Handler/JSMessageHandler.swift (1 hunk)
  • FRW/Modules/Browser/Model/FCLScripts.swift (2 hunks)
  • FRW/Modules/Browser/Model/JSModels.swift (1 hunk)
  • FRW/Modules/Browser/View/BrowserAuthzViewModel.swift (1 hunk)
  • FRW/Modules/Browser/View/NetworkSwitchPopView.swift (3 hunks)
  • FRW/Modules/Buy/BuyProvderView.swift (1 hunk)
  • FRW/Modules/Domain/ClaimDomainView.swift (1 hunk)
  • FRW/Modules/Domain/ClaimDomainViewModel.swift (1 hunk)
  • FRW/Modules/EVM/View/EVMEnableView.swift (1 hunk)
Actionable Comments (1)
  • FRW/Foundation/Model/Error.swift [74-86]

    typo: "Fix typos in error case names"

Skipped Comments (3)
  • FRW/Foundation/Model/FWAccount.swift [67-69]

    best practice: "Improve error handling for address creation failure"

  • FRW/App/Container.swift [13-16]

    best practice: "Avoid singleton in dependency injection container"

  • FRW/Modules/Browser/Handler/JSMessageHandler.swift [217-221]

    enhancement: "Improve log message formatting"

Comment on lines 74 to 86
case securityVerifyFailed
case collectionIsNil
case noPrimaryWalletAddress
case emptyKeyProvider
case emptyAccountKey
case invalidMnemonic
case invaildPublicKey
case invaildAddress
case fetchLinkedAccountsFailed
case emptyAddress
case emptyScript
case emptyMainAccount
case emptyTransaction

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are typos in several error case names: 'invaildMnemonic', 'invaildPublicKey', 'invaildAddress' should be 'invalidMnemonic', 'invalidPublicKey', 'invalidAddress' respectively.

@lmcmz lmcmz merged commit 6a281c6 into main Jun 16, 2025
2 checks passed
@lmcmz lmcmz mentioned this pull request Jun 16, 2025
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants