Skip to content

Commit

Permalink
docs: document problem continuation
Browse files Browse the repository at this point in the history
  • Loading branch information
ffmcgee725 committed Jan 25, 2025
1 parent 6e57d3c commit 1de4c5e
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions ui/pages/permissions-connect/permissions-connect.container.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,24 @@ const mapStateToProps = (state, ownProps) => {
// Some stuff is rendered on `main` that is NOT rendered on this branch. Also, on main, `isRequestingAccounts` evaluates to false,
// so on `ui/pages/permissions-connect/permissions-connect.component.js`, l151 we go to `history.replace(confirmPermissionPath)`;
// we should find a solution for specifically triggering `wallet_switchEthereumChain` to also go in here (check `state` here perhaps ?)
// Problem 1: We need to differentiate in this component, a legacy `wallet_switchEthereumChain` from any other regular caip25 request
// Problem 2: `permission.js` file, `PERMISSION_DESCRIPTIONS` object, needs to differentiate legacey wallet_switchEthereumChain from a regular caip25 request
// [Caip25EndowmentPermissionName]: ({ t }) => ({
// label: t('permission_ethereumAccounts'), <----
// leftIcon: IconName.Eye,
// weight: PermissionWeight.eth_accounts,
// }),
// // "eth_accounts" entry is needed for the Snaps Permissions Grant UI
// [RestrictedMethods.eth_accounts]: ({ t }) => ({
// label: t('permission_ethereumAccounts'), <-----
// leftIcon: IconName.Eye,
// weight: PermissionWeight.eth_accounts,
// }),
// [PermissionNames.permittedChains]: ({ t }) => ({
// label: t('permission_walletSwitchEthereumChain'), <-----
// leftIcon: IconName.Wifi,
// weight: PermissionWeight.permittedChains,
// }),
// await window.ethereum.request({
// jsonrpc: '2.0',
// method: 'wallet_switchEthereumChain',
Expand Down

0 comments on commit 1de4c5e

Please sign in to comment.