Skip to content

Conversation

@WRRicht3r
Copy link
Contributor

Summary

Describe the change and why it’s needed.

Related Issue

Closes # (or) Relates to #

Type of Change

  • feat (new feature)
  • fix (bug fix)
  • refactor (no functional change)
  • chore/build (tooling, CI, deps)
  • docs (README/AGENTS, comments)

Screenshots / Videos

If UI changes, include before/after.

Test Plan

Commands run locally:

./gradlew detektAll
./gradlew runTest
./gradlew :app:lint

Additional checks and scenarios covered:

Risks & Rollout

Potential impact, migrations, or config/secrets required.

Checklist

  • Linked an issue and added a clear description
  • Added/updated tests for changed code (where applicable)
  • Updated docs (README/AGENTS) when behavior or commands changed
  • Ran detektAll, runTest, and :app:lint locally (or via CI)
  • No secrets or local.properties committed

@WRRicht3r
Copy link
Contributor Author

Solana account scaffolding is now wired through every layer:

  • Added Solana constants, a slip‑0010 ed25519 derivation helper, and a
    secret store/test harness (common/src/main/java/jp/co/soramitsu/common/
    domain/SolanaConstants.kt:1, common/src/main/java/jp/co/soramitsu/common/
    utils/solana/SolanaKeyFactory.kt:1, common/src/main/java/jp/co/soramitsu/
    common/data/secrets/v3/SolanaSecretStore.kt:1, common/src/test/java/jp/co/
    soramitsu/common/utils/solana/SolanaKeyFactoryTest.kt:5). The DI module now
    exposes the new store and we pull in the solanaj dependency so ed25519 keys
    can be derived consistently (common/build.gradle:58, common/src/main/java/
    jp/co/soramitsu/common/di/modules/CommonModule.kt:235).
  • MetaAccountLocal/Room gained a solanaPublicKey column (migration 74→75)
    and every mapper/model/import path now carries it, so Solana data
    survives migrations and feeds the UI (core-db/src/main/java/jp/co/
    soramitsu/coredb/model/MetaAccountLocal.kt:16, core-db/src/main/java/jp/
    co/soramitsu/coredb/migrations/Migrations.kt:8, feature-account-api/src/
    main/java/jp/co/soramitsu/account/api/domain/model/MetaAccount.kt:25).
    Account creation/import/export/backup flows derive Solana keypairs
    alongside Substrate/EVM, store them via the new secret store, expose
    them for backup/Google sync, and teach the wallet UI when to show Solana-
    specific options (feature-account-impl/src/main/java/jp/co/soramitsu/
    account/impl/data/repository/AccountRepositoryDelegate.kt:96, feature-
    account-impl/src/main/java/jp/co/soramitsu/account/impl/data/repository/
    AccountRepositoryImpl.kt:92, feature-account-impl/src/main/java/jp/co/
    soramitsu/account/impl/domain/AccountInteractorImpl.kt:368, feature-wallet-
    impl/src/main/java/jp/co/soramitsu/wallet/impl/presentation/balance/list/
    BalanceListViewModel.kt:645).
  • Compose/strings now include Solana labels so connected-account dialogs
    and warnings mention the new ecosystem (common/src/main/res/values/
    strings.xml:358, feature-account-impl/src/main/java/jp/co/soramitsu/account/
    impl/presentation/account/details/AccountDetailsViewModel.kt:121), and the
    mnemonic/backup/create flows include Solana in their payloads (feature-
    account-impl/src/main/java/jp/co/soramitsu/account/impl/presentation/
    account/create/CreateAccountViewModel.kt:74, feature-account-impl/src/
    main/java/jp/co/soramitsu/account/impl/presentation/mnemonic/confirm/
    ConfirmMnemonicPayload.kt:12).

@WRRicht3r
Copy link
Contributor Author

Implemented full Solana plumbing end-to-end.

  • Added shared Solana constants plus a Kotlin slip‑0010 ed25519 derivation
    utility and deterministic test so we can derive SPL keys straight from
    the wallet mnemonic (common/src/main/java/jp/co/soramitsu/common/domain/
    SolanaConstants.kt:1, common/src/main/java/jp/co/soramitsu/common/utils/
    solana/SolanaKeyFactory.kt:1, common/src/test/java/jp/co/soramitsu/
    common/utils/solana/SolanaKeyFactoryTest.kt:5). Introduced a dedicated
    SolanaSecretStore and wired the module’s DI to expose it (common/src/main/
    java/jp/co/soramitsu/common/data/secrets/v3/SolanaSecretStore.kt:1, common/
    src/main/java/jp/co/soramitsu/common/di/modules/CommonModule.kt:25), plus
    surfaced new UI string resources.
  • Extended storage/domain layers to remember Solana keys: MetaAccountLocal now
    persists solanaPublicKey with a 74→75 migration, and the MetaAccount model/
    has‑flags handle 🐸 assets and addresses consistently (core-db/src/main/
    java/jp/co/soramitsu/coredb/model/MetaAccountLocal.kt:16, core-db/src/main/
    java/jp/co/soramitsu/coredb/migrations/Migrations.kt:1, feature-account-api/
    src/main/java/jp/co/soramitsu/account/api/domain/model/MetaAccount.kt:25).
    The repository derives/stores Solana secrets when a Substrate/EVM wallet is
    created, exposes them for backup/export, and the key-provider can now hand
    a Solana keypair to signing code (feature-account-impl/src/main/java/jp/
    co/soramitsu/account/impl/data/repository/AccountRepositoryDelegate.kt:96,
    feature-account-impl/src/main/java/jp/co/soramitsu/account/impl/data/
    repository/AccountRepositoryImpl.kt:92, feature-account-impl/src/main/java/
    jp/co/soramitsu/account/impl/data/repository/KeyPairRepository.kt:11).
  • Updated UI/backups/workflows so Solana behaves like the other ecosystems:
    creation flows now include Solana in the mnemonic payload, backup
    screens/gateway logic show the correct title, wallet state uses the
    new chain set when deciding whether to show the “join Substrate/
    EVM” banner, and the ecosystem options dialog understands Solana chain
    IDs (feature-account-impl/src/main/java/jp/co/soramitsu/account/impl/
    presentation/account/create/CreateAccountViewModel.kt:66, feature-
    account-impl/src/main/java/jp/co/soramitsu/account/impl/presentation/
    mnemonic/confirm/ConfirmMnemonicViewModel.kt:130, feature-account-
    impl/src/main/java/jp/co/soramitsu/account/impl/presentation/account/
    details/AccountDetailsViewModel.kt:121, feature-wallet-impl/src/
    main/java/jp/co/soramitsu/wallet/impl/presentation/balance/list/
    BalanceListViewModel.kt:645).

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.

2 participants