Skip to content

Pre-release 2.8.4#1045

Merged
lmcmz merged 51 commits intomasterfrom
develop
May 13, 2025
Merged

Pre-release 2.8.4#1045
lmcmz merged 51 commits intomasterfrom
develop

Conversation

@lmcmz
Copy link
Copy Markdown
Contributor

@lmcmz lmcmz commented May 13, 2025

Related Issue

Closes #1044

Summary of Changes

Need Regression Testing

  • Yes
  • No

Risk Assessment

  • Low
  • Medium
  • High

Additional Notes

Screenshots (if applicable)

jaymengxy and others added 30 commits April 28, 2025 09:51
fix: instabug #190 coroutine resume issue
fix: restore the constructor of the account proof encode method
fix: walletconnect pair
fix: child account class cast exception
* WIP - integration

* WC redirect fallback

* WC redirect fallback

* WC redirect fallback

* WC redirect fallback

* Clean up

* Hide toast when on inapp browser auth
lealobanov and others added 21 commits May 2, 2025 12:22
* WIP - integration

* WC redirect fallback

* WC redirect fallback

* WC redirect fallback

* WC redirect fallback

* Clean up

* Hide toast when on inapp browser auth

* Debug build.gradle

* Debug build.gradle

* Debug build.gradle

* Debug build.gradle

* Debug build.gradle

* Debug build.gradle

* Debug build.gradle
* Improve error handling

* Improve error handling

* Session cleanup

* Session cleanup

* Run build

* Improve session cleanup

* Improve session cleanup

* Improve session cleanup

* Improve session cleanup

* Improve session cleanup

* Disable dev build on branch
@lmcmz lmcmz requested a review from a team as a code owner May 13, 2025 00:55
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 13, 2025

PR Summary

Refactored token management system with new FungibleToken model and improved WalletConnect implementation. Added robust error handling, session management, and redirect functionality for WalletConnect. Introduced new token list providers and API endpoints for both EVM and Flow tokens.

Changes

File Summary
.github/workflows/release.yml Added support for FIREBASE_TESTERS environment variable to manage testers across environments. Updated workflow to use environment variables for both dev and release builds.
app/build.gradle Updated build configuration to handle testers from multiple sources, upgraded Reown Android BOM to 1.3.3, and improved manifest placeholders handling. Added support for merging testers from local and environment variables.
app/src/main/AndroidManifest.xml Added new ManageTokenActivity to the manifest with portrait orientation configuration.
app/src/main/java/com/flowfoundation/wallet/cache/CacheConst.kt Removed tokenStateCache() function and related imports as part of token management refactoring.
app/src/main/java/com/flowfoundation/wallet/cache/DisplayTokenCacheManager.kt Created new cache manager for handling display token list persistence with read/write operations and JSON serialization support.
app/src/main/java/com/flowfoundation/wallet/manager/token/FungibleTokenListManager.kt Created comprehensive token list manager with support for EVM and Flow tokens, display preferences, caching, and token state management.
app/src/main/java/com/flowfoundation/wallet/manager/token/model/FungibleToken.kt Implemented new FungibleToken data model with support for both EVM and Flow token types, including comprehensive token information and utility methods.
app/src/main/java/com/flowfoundation/wallet/manager/walletconnect/WalletConnect.kt Improved WalletConnect with better session management, connection handling, and error recovery. Added toast notifications and cleanup of stale sessions.
app/src/main/java/com/flowfoundation/wallet/manager/walletconnect/WalletConnectDelegate.kt Added robust error handling, session management, and redirect functionality. Improved connection state management and session proposal handling.
app/src/main/java/com/flowfoundation/wallet/manager/walletconnect/WalletConnectRequestDispatcher.kt Enhanced authentication response handling with retry logic, better error handling, and improved session management for WalletConnect requests.
app/src/main/java/com/flowfoundation/wallet/network/ApiService.kt Added new API endpoints for retrieving EVM and Flow token lists with currency and network parameters.
app/src/main/java/com/flowfoundation/wallet/page/component/deeplinking/DeepLinkingActivity.kt Enhanced deep linking with better error handling and asynchronous processing using coroutines.

autogenerated by presubmit.ai

Copy link
Copy Markdown

@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)
  • WIP - integration

  • WC redirect fallback

  • WC redirect fallback

  • WC redirect fallback

  • WC redirect fallback

  • Clean up

  • Hide toast when on inapp browser auth

  • 4e7a1da: Merge pull request #915 from onflow/nialexsan/firebase-testers-env-var

Pick up testers form env vars

  • 010aa2d: Hide toast when on inapp browser auth
  • 9ec01b4: Clean up
  • a179ec4: WC redirect fallback
  • 5dcc910: WC redirect fallback
  • 3b0743c: WC redirect fallback
  • 9e26de8: WC redirect fallback
  • 79de9db: WIP - integration
  • 5dd63e2: Merge branch 'develop' into nialexsan/firebase-testers-env-var
  • 7deecf7: Merge pull request #910 from onflow/fix_child_account

fix: child account class cast exception

fix: walletconnect pair

  • 24d4065: fix: walletconnect pair
  • 16d017a: Merge pull request #900 from onflow/fix_child_account

Fix child account

  • d2f8d79: Merge pull request #887 from onflow/fix_account_proof

fix: restore the constructor of the account proof encode method

  • e99f842: Merge pull request #884 from onflow/fix_coroutine_resume

fix: instabug #190 coroutine resume issue

  • 8911334: fix: arithmetic exception
  • 374c4d0: fix: child accout cache issue
  • 76856ac: fix: memory leaks
  • 76edcc3: fix: restore the constructor of the account proof encode method
  • 0ccd310: fix: atomic operation
  • 1305be7: fix: instabug #190 coroutine resume issue
Files Processed (30)
  • .github/workflows/release.yml (3 hunks)
  • app/build.gradle (5 hunks)
  • app/src/main/AndroidManifest.xml (1 hunk)
  • app/src/main/java/com/flowfoundation/wallet/cache/CacheConst.kt (2 hunks)
  • app/src/main/java/com/flowfoundation/wallet/cache/DisplayTokenCacheManager.kt (1 hunk)
  • app/src/main/java/com/flowfoundation/wallet/firebase/config/FirebaseConfig.kt (2 hunks)
  • app/src/main/java/com/flowfoundation/wallet/manager/LaunchManager.kt (2 hunks)
  • app/src/main/java/com/flowfoundation/wallet/manager/account/BalanceManager.kt (1 hunk)
  • app/src/main/java/com/flowfoundation/wallet/manager/childaccount/ChildAccountList.kt (5 hunks)
  • app/src/main/java/com/flowfoundation/wallet/manager/coin/CoinRateManager.kt (1 hunk)
  • app/src/main/java/com/flowfoundation/wallet/manager/coin/CustomTokenManager.kt (2 hunks)
  • app/src/main/java/com/flowfoundation/wallet/manager/coin/FlowCoinListManager.kt (1 hunk)
  • app/src/main/java/com/flowfoundation/wallet/manager/coin/TokenStateManager.kt (1 hunk)
  • app/src/main/java/com/flowfoundation/wallet/manager/evm/EVMWalletManager.kt (5 hunks)
  • app/src/main/java/com/flowfoundation/wallet/manager/evm/Utils.kt (2 hunks)
  • app/src/main/java/com/flowfoundation/wallet/manager/flowjvm/CadenceExecutor.kt (5 hunks)
  • app/src/main/java/com/flowfoundation/wallet/manager/token/FungibleTokenListManager.kt (1 hunk)
  • app/src/main/java/com/flowfoundation/wallet/manager/token/model/FungibleToken.kt (1 hunk)
  • app/src/main/java/com/flowfoundation/wallet/manager/transaction/TransactionStateManager.kt (3 hunks)
  • app/src/main/java/com/flowfoundation/wallet/manager/walletconnect/WalletConnect.kt (3 hunks)
  • app/src/main/java/com/flowfoundation/wallet/manager/walletconnect/WalletConnectDelegate.kt (5 hunks)
  • app/src/main/java/com/flowfoundation/wallet/manager/walletconnect/WalletConnectRequestDispatcher.kt (1 hunk)
  • app/src/main/java/com/flowfoundation/wallet/manager/walletconnect/WalletConnectResponse.kt (1 hunk)
  • app/src/main/java/com/flowfoundation/wallet/network/ApiService.kt (2 hunks)
  • app/src/main/java/com/flowfoundation/wallet/network/UserRegisterUtils.kt (2 hunks)
  • app/src/main/java/com/flowfoundation/wallet/network/model/AddTokenListResponse.kt (1 hunk)
  • app/src/main/java/com/flowfoundation/wallet/network/model/EVMTokenListResponse.kt (1 hunk)
  • app/src/main/java/com/flowfoundation/wallet/network/model/FlowTokenListResponse.kt (1 hunk)
  • app/src/main/java/com/flowfoundation/wallet/page/component/deeplinking/DeepLinkingActivity.kt (2 hunks)
  • app/src/main/java/com/flowfoundation/wallet/page/component/deeplinking/PendingActionHelper.kt (2 hunks)
Actionable Comments (1)
  • app/src/main/java/com/flowfoundation/wallet/manager/token/FungibleTokenListManager.kt [264-266]

    possible issue: "Potential race condition in token list filtering"

Skipped Comments (3)
  • app/src/main/java/com/flowfoundation/wallet/manager/walletconnect/WalletConnectDelegate.kt [38-42]

    best practice: "Potential memory leak in session tracking variables"

  • app/src/main/java/com/flowfoundation/wallet/manager/token/FungibleTokenListManager.kt [318-320]

    performance: "Potential performance issue in token list operations"

  • app/src/main/java/com/flowfoundation/wallet/manager/walletconnect/WalletConnectRequestDispatcher.kt [318-321]

    enhancement: "Retry mechanism could cause excessive delays"

Comment on lines +264 to +266
if (isHideDustTokens()) {
val displayListSnapshot = currentDisplayTokenList.toList()
val filteredList = tokenList.filter { it.tokenBalanceInUSD() > BigDecimal(0.01) }.filter { verified -> displayListSnapshot.any{ it.isSameToken(verified.contractId()) } }
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The filtering operation on tokenList is not thread-safe. Since displayListSnapshot is captured before filtering, there could be a race condition if the list is modified between capturing the snapshot and filtering. Consider using atomic operations or proper synchronization.

@lmcmz lmcmz merged commit 74de7a2 into master May 13, 2025
5 checks passed
@github-actions github-actions Bot mentioned this pull request May 28, 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.

4 participants