Skip to content

[wallet/symbol/mobile] feat: add Bridge, Assets and Token Details screens#1988

Open
OlegMakarenko wants to merge 62 commits intodevfrom
wallet-symbol-mobile/bridge
Open

[wallet/symbol/mobile] feat: add Bridge, Assets and Token Details screens#1988
OlegMakarenko wants to merge 62 commits intodevfrom
wallet-symbol-mobile/bridge

Conversation

@OlegMakarenko
Copy link
Copy Markdown
Contributor

@OlegMakarenko OlegMakarenko commented Mar 4, 2026

Problem

  1. The wallet lacks an Assets screen to view tokens owned by the account, including balances.
  2. The wallet lacks bridge functionality for token swaps.

Solution

  1. Added an Assets screen that lists tokens for the current account, plus tokens owned by external-chain (bridge) accounts. Includes filters to show expired tokens and to show only tokens created by the current account.
  2. Added a Token Details screen with token main data - name, balance, mosaic id / contract address. If the current account is the token creator, it also shows total supply and divisibility. For expirable tokens, the screen shows a warning alert explaining transfer limitations after the expiration height (or that the token is already expired), and a progress bar showing registration height, current chain height, and expiration height.
  3. Added a Bridge Accounts list screen that shows external accounts that can be created/derived by the wallet. Each account card includes an Activate button that generates the account using the main (Symbol) wallet controller mnemonic. Currently, only Ethereum is supported.
  4. Added a Bridge Account Details screen (shown when the user open activated bridge account). It shows the account address, balance, owned tokens, and actions to reveal the private key, open the block explorer, and remove/deactivate the account.
  5. Added a Bridge Swap screen that lets users select a source token and target token, enter the amount, view bridge estimates (fees and final amount), and review recent swap history. The token selector includes a reverse button. The screen is split into multiple components, and the logic is organized into feature-based hooks for maintainability.
  6. Added a Swap Details screen that shows the current swap status, a status tracker, and request/payout transaction details (with explorer buttons).
  7. Fixed issues in the Bridge module in wallet-common-core: empty config during data reload, and inconsistent address/transaction-hash formats returned by the API.
  8. Tests added.
image

…log to visually separate multiple transactions
…template allowing pass additional custom modals
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 8, 2026

Codecov Report

❌ Patch coverage is 98.36066% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 96.85%. Comparing base (c07f693) to head (71b22e5).
⚠️ Report is 3 commits behind head on dev.

Files with missing lines Patch % Lines
...common/core/src/lib/controller/WalletController.js 83.33% 2 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##              dev    #1988      +/-   ##
==========================================
- Coverage   96.87%   96.85%   -0.02%     
==========================================
  Files         261      257       -4     
  Lines       19119    19031      -88     
  Branches      215      215              
==========================================
- Hits        18522    18433      -89     
- Misses        591      592       +1     
  Partials        6        6              
Flag Coverage Δ
tools-vanity ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
wallet/common/core/src/lib/bridge/BridgeManager.js 98.84% <100.00%> (+0.06%) ⬆️
...common/core/src/lib/controller/WalletController.js 94.97% <83.33%> (-0.14%) ⬇️

... and 4 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@OlegMakarenko OlegMakarenko force-pushed the wallet-symbol-mobile/bridge branch from b0f3e4a to 5ec37aa Compare March 12, 2026 10:53
@OlegMakarenko OlegMakarenko marked this pull request as ready for review March 12, 2026 11:36
@OlegMakarenko OlegMakarenko requested a review from Wayonb March 12, 2026 11:36
@OlegMakarenko OlegMakarenko changed the title [WIP] [wallet/symbol/mobile] feat: add Bridge, Assets and Token Details screens [wallet/symbol/mobile] feat: add Bridge, Assets and Token Details screens Mar 16, 2026
/** @typedef {import('@/app/screens/bridge/types/Bridge').BridgeManager} BridgeManager */
/** @typedef {import('@/app/screens/bridge/types/Bridge').BridgeRequest} BridgeRequest */

const FETCH_INTERVAL = 10000;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is this used for both the native and swap bridge addresses?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes, they are combined into a single history.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ok, was only concerned about Symbol/NEM where the status does not change every 10 seconds.

iconName = iconNameMap.completed;
text = $t('s_bridge_history_status_completed');
break;
case BridgePayoutStatus.FAILED:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is a failed status retriable vs an error that is not?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Just checked with CB - the status will not change for the current request. If payout is failed it will remain failed. Instead, at the same time a new request will be created and visible in the list.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Yes, so are we showing the status of all the payout transactions? I am not sure how this looks in the UI.
My assumption is that the user only cares about the status of the last payout transaction.

@OlegMakarenko OlegMakarenko requested a review from Wayonb March 24, 2026 11:51
Copy link
Copy Markdown
Contributor

@Wayonb Wayonb left a comment

Choose a reason for hiding this comment

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

Only a few comments but looks good👍🏾

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