Skip to content

fix: verified token issues#1037

Merged
jaymengxy merged 2 commits intodevelopfrom
verified_token
May 12, 2025
Merged

fix: verified token issues#1037
jaymengxy merged 2 commits intodevelopfrom
verified_token

Conversation

@jaymengxy
Copy link
Copy Markdown
Contributor

Related Issue

Closes #1036

Summary of Changes

Need Regression Testing

  • Yes
  • No

Risk Assessment

  • Low
  • Medium
  • High

Additional Notes

Screenshots (if applicable)

@jaymengxy jaymengxy added this to the Release 2.8.5 milestone May 12, 2025
@jaymengxy jaymengxy self-assigned this May 12, 2025
@jaymengxy jaymengxy requested a review from a team as a code owner May 12, 2025 08:57
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 12, 2025

PR Summary

Refactored the token management system by removing legacy token state management and introducing a new verified token system. Improved token list handling, added verification status indicators, and streamlined token price formatting. Removed currency conversion complexity from price formatting utilities.

Changes

File Summary
app/src/main/java/com/flowfoundation/wallet/cache/CacheConst.kt Removed token state cache related functions and imports as part of the token management system refactoring
app/src/main/java/com/flowfoundation/wallet/firebase/config/FirebaseConfig.kt Removed FlowCoinListManager dependency and its reload call from Firebase config initialization
app/src/main/java/com/flowfoundation/wallet/manager/LaunchManager.kt Removed TokenStateManager.reload() call from launch sequence as part of token management refactoring
app/src/main/java/com/flowfoundation/wallet/manager/coin/CustomTokenManager.kt Removed token state management calls and simplified custom token handling to use only FungibleTokenListManager
app/src/main/java/com/flowfoundation/wallet/manager/flowjvm/CadenceExecutor.kt Removed legacy token-related Cadence functions and updated imports to use new token model classes
app/src/main/java/com/flowfoundation/wallet/network/model/AddTokenListResponse.kt Added new data classes for token list API response including TokenInfo, TokenPath, and TokenExtensions with verification support
app/src/main/java/com/flowfoundation/wallet/page/token/addtoken/AddTokenViewModel.kt Updated token addition logic to use new API, added verified token filtering, and improved token list management
app/src/main/java/com/flowfoundation/wallet/utils/CoinUtils.kt Removed currency conversion logic from price formatting utilities to simplify the implementation
app/src/main/java/com/flowfoundation/wallet/page/token/detail/presenter/TokenDetailPresenter.kt Added verification status indicators and tips in token detail view

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 (1)
  • 78f34f2: fix: verified token issues
Files Processed (30)
  • app/src/main/java/com/flowfoundation/wallet/cache/CacheConst.kt (2 hunks)
  • 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/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/flowjvm/CadenceExecutor.kt (5 hunks)
  • app/src/main/java/com/flowfoundation/wallet/manager/token/FungibleTokenListManager.kt (3 hunks)
  • app/src/main/java/com/flowfoundation/wallet/manager/transaction/TransactionStateManager.kt (3 hunks)
  • app/src/main/java/com/flowfoundation/wallet/network/ApiService.kt (1 hunk)
  • 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/page/main/Utils.kt (3 hunks)
  • app/src/main/java/com/flowfoundation/wallet/page/profile/subpage/wallet/WalletListActivity.kt (2 hunks)
  • app/src/main/java/com/flowfoundation/wallet/page/send/transaction/subpage/amount/presenter/SendAmountPresenter.kt (4 hunks)
  • app/src/main/java/com/flowfoundation/wallet/page/send/transaction/subpage/amount/widget/SendCoinPopupMenu.kt (2 hunks)
  • app/src/main/java/com/flowfoundation/wallet/page/send/transaction/subpage/transaction/presenter/TransactionPresenter.kt (1 hunk)
  • app/src/main/java/com/flowfoundation/wallet/page/token/addtoken/AddTokenActivity.kt (2 hunks)
  • app/src/main/java/com/flowfoundation/wallet/page/token/addtoken/AddTokenConfirmDialog.kt (3 hunks)
  • app/src/main/java/com/flowfoundation/wallet/page/token/addtoken/AddTokenViewModel.kt (5 hunks)
  • app/src/main/java/com/flowfoundation/wallet/page/token/addtoken/adapter/TokenListAdapter.kt (1 hunk)
  • app/src/main/java/com/flowfoundation/wallet/page/token/addtoken/model/TokenItem.kt (1 hunk)
  • app/src/main/java/com/flowfoundation/wallet/page/token/addtoken/presenter/AddTokenPresenter.kt (2 hunks)
  • app/src/main/java/com/flowfoundation/wallet/page/token/addtoken/presenter/TokenItemPresenter.kt (2 hunks)
  • app/src/main/java/com/flowfoundation/wallet/page/token/custom/model/CustomTokenItem.kt (2 hunks)
  • app/src/main/java/com/flowfoundation/wallet/page/token/detail/TokenDetailActivity.kt (1 hunk)
  • app/src/main/java/com/flowfoundation/wallet/page/token/detail/Utils.kt (3 hunks)
  • app/src/main/java/com/flowfoundation/wallet/page/token/detail/presenter/TokenDetailPresenter.kt (1 hunk)
  • app/src/main/java/com/flowfoundation/wallet/page/token/detail/widget/ChartMarker.kt (1 hunk)
  • app/src/main/java/com/flowfoundation/wallet/utils/CoinUtils.kt (3 hunks)
Actionable Comments (1)
  • app/src/main/java/com/flowfoundation/wallet/page/token/addtoken/AddTokenViewModel.kt [44-48]

    possible issue: "Missing error handling for API response"

Skipped Comments (1)
  • app/src/main/java/com/flowfoundation/wallet/manager/token/FungibleTokenListManager.kt [228-231]

    best practice: "Consider using a constant for dust token threshold"

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.

LGTM!

Review Summary

Commits Considered (1)
  • 7addc63: fix: coin utils test failure
Files Processed (1)
  • app/src/main/java/com/flowfoundation/wallet/utils/CoinUtils.kt (4 hunks)
Actionable Comments (0)
Skipped Comments (2)
  • app/src/main/java/com/flowfoundation/wallet/utils/CoinUtils.kt [18-19]

    possible issue: "Consider adding validation for negative values"

  • app/src/main/java/com/flowfoundation/wallet/utils/CoinUtils.kt [16-16]

    enhancement: "Unnecessary variable assignment"

@jaymengxy jaymengxy merged commit 897d994 into develop May 12, 2025
3 checks passed
@jaymengxy jaymengxy deleted the verified_token branch May 12, 2025 11:27
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.

[BUG] Verifiy token feature remain issues

2 participants