-
-
Notifications
You must be signed in to change notification settings - Fork 262
test: highlight external usage for assets-controllers #7556
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
| | **`transaction-pay-controller`** | `TokenBalancesController`, `AccountTrackerController`, `TokensController`, `TokenRatesController`, `CurrencyRateController` | Pay gas fees with alternative tokens - needs balances, metadata, and rates | | ||
| | **`bridge-controller`** | `CurrencyRateController`, `TokenRatesController`, `MultichainAssetsRatesController` | Cross-chain bridging - needs exchange rates for EVM + non-EVM assets for quote calculations | | ||
| | **`subscription-controller`** | `MultichainBalancesController` | Crypto subscription payments - needs multi-chain balances to offer payment options | | ||
| | **`core-backend`** | `TokenBalancesController` | Real-time balance coordination - adjusts polling based on WebSocket connection state | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
core-backend will be part of the new unified logic; just here to highlight that this is something outside of our assets-controllers package using the tokenBalancesController
| | Current Controller | Current State Property | Target Property | | ||
| |-------------------|----------------------|-----------------| | ||
| | `TokenBalancesController` | `tokenBalances[account][chainId][token]` | `assetsBalance[accountId][assetId]` | | ||
| | `AccountTrackerController` | `accountsByChainId[chainId][account].balance` | `assetsBalance[accountId][assetId]` (native) | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this an example or an exhaustive list?
If it's meant to be exhaustive, it is missing MultichainBalancesController.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unless we want to do it separately for evm and non-evm.
| ``` | ||
|
|
||
| **Checklist before removal:** | ||
| - [ ] 100% reads from new state for 4+ weeks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does the ETA here include both UI as well ( Mobile and extension ) ?
| │ | ||
| └─► parseRequiredTokens() // in required-tokens.ts | ||
| │ | ||
| └─► getTokenBalance() // in token.ts |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TransactionPayController currently expects balances and addresses in hex format, whereas we plan to provide them in CAIP-19 and numeric formats. Do you think it would be better to expose a helper function that converts to the expected format, or should we ask the Confirmations team to migrate to the new CAIP-19 standard ?
Explanation
PR to highlight external usage of assets-controllers state
References
Checklist