Skip to content

feat(spl): auto-discover Solana tokens held by wallet - #1370

Draft
sneurlax wants to merge 1 commit into
stagingfrom
feat/spl-discovery
Draft

sneurlax wants to merge 1 commit into
stagingfrom
feat/spl-discovery

Conversation

@sneurlax

Copy link
Copy Markdown
Member

No description provided.

@codecov

codecov Bot commented May 28, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 44.66019% with 114 lines in your changes missing coverage. Please review.
✅ Project coverage is 9.71%. Comparing base (1e2e4d9) to head (18383c0).
⚠️ Report is 26 commits behind head on staging.

Files with missing lines Patch % Lines
lib/services/solana/solana_token_api.dart 56.63% 49 Missing ⚠️
..._views/add_token_view/edit_wallet_tokens_view.dart 0.00% 42 Missing ⚠️
...oviders/solana/discovered_sol_tokens_provider.dart 56.00% 22 Missing ⚠️
...s/wallet/impl/sub_wallets/solana_token_wallet.dart 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           staging    #1370      +/-   ##
===========================================
+ Coverage     7.85%    9.71%   +1.85%     
===========================================
  Files         1125     1130       +5     
  Lines       112820   113701     +881     
===========================================
+ Hits          8866    11045    +2179     
+ Misses      103954   102656    -1298     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@sneurlax

Copy link
Copy Markdown
Member Author

Converting to draft because I have too many open PRs ready--will take another review pass over this before re-readying it

@sneurlax
sneurlax marked this pull request as draft August 20, 2026 18:58
@sneurlax
sneurlax force-pushed the feat/spl-discovery branch from c6b8cb2 to 61ad7b5 Compare August 24, 2026 21:31
Query both the SPL Token and Token-2022 programs for the wallet's token
accounts when the token management screen opens, aggregate the accounts
per mint, and offer any mint the catalog does not know yet, pre-selected.

Decimals are read from the token account and re-read from the mint account
when the accounts disagree or the value is out of u8 range; a mint whose
decimals cannot be established is skipped rather than shown at the wrong
scale.

SolanaTokenAPI is now built per call rather than being a mutable singleton,
so each wallet discovers over its own RPC client and discovery is testable
without a network.
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.

1 participant