Add onchain (self-custody) wallet support (ETH/BTC)

Closed
BA
3mo ago
+4477-3

Summary

This PR adds support for self-custody crypto wallets.

It also introduces support for multiple assets on the Ethereum network, allowing users to import and manage supported ETH-based tokens in addition to ETH itself.

It uses the free mempool.space API for bitcoin, etherscan API for ETH, and blockscout API for other currencies. mempool.space/blockscout does not require an API key, however etherscan does.

Most of this work was done with coding agents as I don't know ruby.

I have a docker image deployed here, if it makes it any easier to test.

What’s included

  • Self-custody wallet support for:
    • BTC
    • ETH
      • Other currencies supported by blockscout/etherscan
  • Token selection during import, so users can choose which ETH-based assets to bring in

Screenshots

Wallet support 1Wallet support 2
Wallet support 3Wallet support 4
Wallet support 5

Token import selection

Users can choose which ETH-based tokens to import:

ETH token import selection

Summary by CodeRabbit

  • New Features

    • On-chain wallet support for Bitcoin & Ethereum: link addresses, preview/import balances & tokens, create linked accounts, per-wallet sync, Etherscan & mempool integration, token-review flow, sync-status indicators.
    • Wallet management UI: add/edit wallets, token-review and edit modals, manage/disconnect addresses from accounts and settings.
    • Mobile: locale-aware amount parsing/canonicalization.
  • Documentation

    • Added English UI/localization strings for on-chain wallet flows and settings.
  • Tests

    • Extensive controller/model/provider/mobile tests added.
  • Chores

    • .tmp/ added to .gitignore.