@xyo-network/react-connected-accounts 2.81.10 → 2.82.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/browser/classes/index.d.cts +1 -1
- package/dist/browser/classes/index.d.mts +1 -1
- package/dist/browser/classes/index.d.ts +1 -1
- package/dist/browser/components/ConnectedAccountsFlexbox.d.cts +2 -1
- package/dist/browser/components/ConnectedAccountsFlexbox.d.cts.map +1 -1
- package/dist/browser/components/ConnectedAccountsFlexbox.d.mts +2 -1
- package/dist/browser/components/ConnectedAccountsFlexbox.d.mts.map +1 -1
- package/dist/browser/components/ConnectedAccountsFlexbox.d.ts +2 -1
- package/dist/browser/components/ConnectedAccountsFlexbox.d.ts.map +1 -1
- package/dist/browser/components/index.d.cts +2 -2
- package/dist/browser/components/index.d.cts.map +1 -1
- package/dist/browser/components/index.d.mts +2 -2
- package/dist/browser/components/index.d.mts.map +1 -1
- package/dist/browser/components/index.d.ts +2 -2
- package/dist/browser/components/index.d.ts.map +1 -1
- package/dist/browser/components/wallet/dialogs/connect/CheckboxFormControl.d.cts +1 -0
- package/dist/browser/components/wallet/dialogs/connect/CheckboxFormControl.d.cts.map +1 -1
- package/dist/browser/components/wallet/dialogs/connect/CheckboxFormControl.d.mts +1 -0
- package/dist/browser/components/wallet/dialogs/connect/CheckboxFormControl.d.mts.map +1 -1
- package/dist/browser/components/wallet/dialogs/connect/CheckboxFormControl.d.ts +1 -0
- package/dist/browser/components/wallet/dialogs/connect/CheckboxFormControl.d.ts.map +1 -1
- package/dist/browser/components/wallet/dialogs/connect/Dialog.d.cts +2 -1
- package/dist/browser/components/wallet/dialogs/connect/Dialog.d.cts.map +1 -1
- package/dist/browser/components/wallet/dialogs/connect/Dialog.d.mts +2 -1
- package/dist/browser/components/wallet/dialogs/connect/Dialog.d.mts.map +1 -1
- package/dist/browser/components/wallet/dialogs/connect/Dialog.d.ts +2 -1
- package/dist/browser/components/wallet/dialogs/connect/Dialog.d.ts.map +1 -1
- package/dist/browser/components/wallet/dialogs/connect/LinkedProvidersFlexbox.d.cts +1 -0
- package/dist/browser/components/wallet/dialogs/connect/LinkedProvidersFlexbox.d.cts.map +1 -1
- package/dist/browser/components/wallet/dialogs/connect/LinkedProvidersFlexbox.d.mts +1 -0
- package/dist/browser/components/wallet/dialogs/connect/LinkedProvidersFlexbox.d.mts.map +1 -1
- package/dist/browser/components/wallet/dialogs/connect/LinkedProvidersFlexbox.d.ts +1 -0
- package/dist/browser/components/wallet/dialogs/connect/LinkedProvidersFlexbox.d.ts.map +1 -1
- package/dist/browser/components/wallet/dialogs/connect/Permissions.d.cts +1 -0
- package/dist/browser/components/wallet/dialogs/connect/Permissions.d.cts.map +1 -1
- package/dist/browser/components/wallet/dialogs/connect/Permissions.d.mts +1 -0
- package/dist/browser/components/wallet/dialogs/connect/Permissions.d.mts.map +1 -1
- package/dist/browser/components/wallet/dialogs/connect/Permissions.d.ts +1 -0
- package/dist/browser/components/wallet/dialogs/connect/Permissions.d.ts.map +1 -1
- package/dist/browser/components/wallet/dialogs/connect/index.d.cts +2 -2
- package/dist/browser/components/wallet/dialogs/connect/index.d.cts.map +1 -1
- package/dist/browser/components/wallet/dialogs/connect/index.d.mts +2 -2
- package/dist/browser/components/wallet/dialogs/connect/index.d.mts.map +1 -1
- package/dist/browser/components/wallet/dialogs/connect/index.d.ts +2 -2
- package/dist/browser/components/wallet/dialogs/connect/index.d.ts.map +1 -1
- package/dist/browser/components/wallet/dialogs/index.d.cts +2 -2
- package/dist/browser/components/wallet/dialogs/index.d.mts +2 -2
- package/dist/browser/components/wallet/dialogs/index.d.ts +2 -2
- package/dist/browser/components/wallet/dialogs/revoke/Dialog.d.cts +2 -1
- package/dist/browser/components/wallet/dialogs/revoke/Dialog.d.cts.map +1 -1
- package/dist/browser/components/wallet/dialogs/revoke/Dialog.d.mts +2 -1
- package/dist/browser/components/wallet/dialogs/revoke/Dialog.d.mts.map +1 -1
- package/dist/browser/components/wallet/dialogs/revoke/Dialog.d.ts +2 -1
- package/dist/browser/components/wallet/dialogs/revoke/Dialog.d.ts.map +1 -1
- package/dist/browser/components/wallet/dialogs/revoke/index.d.cts +1 -1
- package/dist/browser/components/wallet/dialogs/revoke/index.d.cts.map +1 -1
- package/dist/browser/components/wallet/dialogs/revoke/index.d.mts +1 -1
- package/dist/browser/components/wallet/dialogs/revoke/index.d.mts.map +1 -1
- package/dist/browser/components/wallet/dialogs/revoke/index.d.ts +1 -1
- package/dist/browser/components/wallet/dialogs/revoke/index.d.ts.map +1 -1
- package/dist/browser/components/wallet/index.d.cts +2 -2
- package/dist/browser/components/wallet/index.d.mts +2 -2
- package/dist/browser/components/wallet/index.d.ts +2 -2
- package/dist/browser/components/wallet/lib/index.d.cts +2 -2
- package/dist/browser/components/wallet/lib/index.d.mts +2 -2
- package/dist/browser/components/wallet/lib/index.d.ts +2 -2
- package/dist/browser/components/wallet/table/ConnectedWalletsTable.d.cts +1 -0
- package/dist/browser/components/wallet/table/ConnectedWalletsTable.d.cts.map +1 -1
- package/dist/browser/components/wallet/table/ConnectedWalletsTable.d.mts +1 -0
- package/dist/browser/components/wallet/table/ConnectedWalletsTable.d.mts.map +1 -1
- package/dist/browser/components/wallet/table/ConnectedWalletsTable.d.ts +1 -0
- package/dist/browser/components/wallet/table/ConnectedWalletsTable.d.ts.map +1 -1
- package/dist/browser/components/wallet/table/ConnectedWalletsTableRow.d.cts +2 -1
- package/dist/browser/components/wallet/table/ConnectedWalletsTableRow.d.cts.map +1 -1
- package/dist/browser/components/wallet/table/ConnectedWalletsTableRow.d.mts +2 -1
- package/dist/browser/components/wallet/table/ConnectedWalletsTableRow.d.mts.map +1 -1
- package/dist/browser/components/wallet/table/ConnectedWalletsTableRow.d.ts +2 -1
- package/dist/browser/components/wallet/table/ConnectedWalletsTableRow.d.ts.map +1 -1
- package/dist/browser/components/wallet/table/cells/Accounts.d.cts +2 -1
- package/dist/browser/components/wallet/table/cells/Accounts.d.cts.map +1 -1
- package/dist/browser/components/wallet/table/cells/Accounts.d.mts +2 -1
- package/dist/browser/components/wallet/table/cells/Accounts.d.mts.map +1 -1
- package/dist/browser/components/wallet/table/cells/Accounts.d.ts +2 -1
- package/dist/browser/components/wallet/table/cells/Accounts.d.ts.map +1 -1
- package/dist/browser/components/wallet/table/cells/Actions.d.cts +2 -1
- package/dist/browser/components/wallet/table/cells/Actions.d.cts.map +1 -1
- package/dist/browser/components/wallet/table/cells/Actions.d.mts +2 -1
- package/dist/browser/components/wallet/table/cells/Actions.d.mts.map +1 -1
- package/dist/browser/components/wallet/table/cells/Actions.d.ts +2 -1
- package/dist/browser/components/wallet/table/cells/Actions.d.ts.map +1 -1
- package/dist/browser/components/wallet/table/cells/Cells.d.cts +1 -1
- package/dist/browser/components/wallet/table/cells/Cells.d.mts +1 -1
- package/dist/browser/components/wallet/table/cells/Cells.d.ts +1 -1
- package/dist/browser/components/wallet/table/cells/ChainName.d.cts +2 -1
- package/dist/browser/components/wallet/table/cells/ChainName.d.cts.map +1 -1
- package/dist/browser/components/wallet/table/cells/ChainName.d.mts +2 -1
- package/dist/browser/components/wallet/table/cells/ChainName.d.mts.map +1 -1
- package/dist/browser/components/wallet/table/cells/ChainName.d.ts +2 -1
- package/dist/browser/components/wallet/table/cells/ChainName.d.ts.map +1 -1
- package/dist/browser/components/wallet/table/cells/State.d.cts +2 -1
- package/dist/browser/components/wallet/table/cells/State.d.cts.map +1 -1
- package/dist/browser/components/wallet/table/cells/State.d.mts +2 -1
- package/dist/browser/components/wallet/table/cells/State.d.mts.map +1 -1
- package/dist/browser/components/wallet/table/cells/State.d.ts +2 -1
- package/dist/browser/components/wallet/table/cells/State.d.ts.map +1 -1
- package/dist/browser/components/wallet/table/cells/Wallet.d.cts +2 -1
- package/dist/browser/components/wallet/table/cells/Wallet.d.cts.map +1 -1
- package/dist/browser/components/wallet/table/cells/Wallet.d.mts +2 -1
- package/dist/browser/components/wallet/table/cells/Wallet.d.mts.map +1 -1
- package/dist/browser/components/wallet/table/cells/Wallet.d.ts +2 -1
- package/dist/browser/components/wallet/table/cells/Wallet.d.ts.map +1 -1
- package/dist/browser/components/wallet/table/cells/index.d.cts +6 -6
- package/dist/browser/components/wallet/table/cells/index.d.cts.map +1 -1
- package/dist/browser/components/wallet/table/cells/index.d.mts +6 -6
- package/dist/browser/components/wallet/table/cells/index.d.mts.map +1 -1
- package/dist/browser/components/wallet/table/cells/index.d.ts +6 -6
- package/dist/browser/components/wallet/table/cells/index.d.ts.map +1 -1
- package/dist/browser/components/wallet/table/cells/lib/index.d.cts +1 -1
- package/dist/browser/components/wallet/table/cells/lib/index.d.cts.map +1 -1
- package/dist/browser/components/wallet/table/cells/lib/index.d.mts +1 -1
- package/dist/browser/components/wallet/table/cells/lib/index.d.mts.map +1 -1
- package/dist/browser/components/wallet/table/cells/lib/index.d.ts +1 -1
- package/dist/browser/components/wallet/table/cells/lib/index.d.ts.map +1 -1
- package/dist/browser/components/wallet/table/hooks/index.d.cts +1 -1
- package/dist/browser/components/wallet/table/hooks/index.d.cts.map +1 -1
- package/dist/browser/components/wallet/table/hooks/index.d.mts +1 -1
- package/dist/browser/components/wallet/table/hooks/index.d.mts.map +1 -1
- package/dist/browser/components/wallet/table/hooks/index.d.ts +1 -1
- package/dist/browser/components/wallet/table/hooks/index.d.ts.map +1 -1
- package/dist/browser/components/wallet/table/hooks/useActiveProviderDialogState.d.cts +1 -1
- package/dist/browser/components/wallet/table/hooks/useActiveProviderDialogState.d.mts +1 -1
- package/dist/browser/components/wallet/table/hooks/useActiveProviderDialogState.d.ts +1 -1
- package/dist/browser/components/wallet/table/index.d.cts +4 -4
- package/dist/browser/components/wallet/table/index.d.cts.map +1 -1
- package/dist/browser/components/wallet/table/index.d.mts +4 -4
- package/dist/browser/components/wallet/table/index.d.mts.map +1 -1
- package/dist/browser/components/wallet/table/index.d.ts +4 -4
- package/dist/browser/components/wallet/table/index.d.ts.map +1 -1
- package/dist/browser/hooks/index.d.cts +2 -2
- package/dist/browser/hooks/index.d.cts.map +1 -1
- package/dist/browser/hooks/index.d.mts +2 -2
- package/dist/browser/hooks/index.d.mts.map +1 -1
- package/dist/browser/hooks/index.d.ts +2 -2
- package/dist/browser/hooks/index.d.ts.map +1 -1
- package/dist/browser/hooks/useDetectWallets.d.cts.map +1 -1
- package/dist/browser/hooks/useDetectWallets.d.mts.map +1 -1
- package/dist/browser/hooks/useDetectWallets.d.ts.map +1 -1
- package/dist/browser/hooks/useEnabledWallets.d.cts +1 -1
- package/dist/browser/hooks/useEnabledWallets.d.mts +1 -1
- package/dist/browser/hooks/useEnabledWallets.d.ts +1 -1
- package/dist/browser/index.cjs +339 -260
- package/dist/browser/index.cjs.map +1 -1
- package/dist/browser/index.d.cts +3 -3
- package/dist/browser/index.d.mts +3 -3
- package/dist/browser/index.d.ts +3 -3
- package/dist/browser/index.mjs +623 -0
- package/dist/browser/index.mjs.map +1 -0
- package/dist/neutral/classes/index.d.cts +1 -1
- package/dist/neutral/classes/index.d.mts +1 -1
- package/dist/neutral/classes/index.d.ts +1 -1
- package/dist/neutral/components/ConnectedAccountsFlexbox.d.cts +2 -1
- package/dist/neutral/components/ConnectedAccountsFlexbox.d.cts.map +1 -1
- package/dist/neutral/components/ConnectedAccountsFlexbox.d.mts +2 -1
- package/dist/neutral/components/ConnectedAccountsFlexbox.d.mts.map +1 -1
- package/dist/neutral/components/ConnectedAccountsFlexbox.d.ts +2 -1
- package/dist/neutral/components/ConnectedAccountsFlexbox.d.ts.map +1 -1
- package/dist/neutral/components/index.d.cts +2 -2
- package/dist/neutral/components/index.d.cts.map +1 -1
- package/dist/neutral/components/index.d.mts +2 -2
- package/dist/neutral/components/index.d.mts.map +1 -1
- package/dist/neutral/components/index.d.ts +2 -2
- package/dist/neutral/components/index.d.ts.map +1 -1
- package/dist/neutral/components/wallet/dialogs/connect/CheckboxFormControl.d.cts +1 -0
- package/dist/neutral/components/wallet/dialogs/connect/CheckboxFormControl.d.cts.map +1 -1
- package/dist/neutral/components/wallet/dialogs/connect/CheckboxFormControl.d.mts +1 -0
- package/dist/neutral/components/wallet/dialogs/connect/CheckboxFormControl.d.mts.map +1 -1
- package/dist/neutral/components/wallet/dialogs/connect/CheckboxFormControl.d.ts +1 -0
- package/dist/neutral/components/wallet/dialogs/connect/CheckboxFormControl.d.ts.map +1 -1
- package/dist/neutral/components/wallet/dialogs/connect/Dialog.d.cts +2 -1
- package/dist/neutral/components/wallet/dialogs/connect/Dialog.d.cts.map +1 -1
- package/dist/neutral/components/wallet/dialogs/connect/Dialog.d.mts +2 -1
- package/dist/neutral/components/wallet/dialogs/connect/Dialog.d.mts.map +1 -1
- package/dist/neutral/components/wallet/dialogs/connect/Dialog.d.ts +2 -1
- package/dist/neutral/components/wallet/dialogs/connect/Dialog.d.ts.map +1 -1
- package/dist/neutral/components/wallet/dialogs/connect/LinkedProvidersFlexbox.d.cts +1 -0
- package/dist/neutral/components/wallet/dialogs/connect/LinkedProvidersFlexbox.d.cts.map +1 -1
- package/dist/neutral/components/wallet/dialogs/connect/LinkedProvidersFlexbox.d.mts +1 -0
- package/dist/neutral/components/wallet/dialogs/connect/LinkedProvidersFlexbox.d.mts.map +1 -1
- package/dist/neutral/components/wallet/dialogs/connect/LinkedProvidersFlexbox.d.ts +1 -0
- package/dist/neutral/components/wallet/dialogs/connect/LinkedProvidersFlexbox.d.ts.map +1 -1
- package/dist/neutral/components/wallet/dialogs/connect/Permissions.d.cts +1 -0
- package/dist/neutral/components/wallet/dialogs/connect/Permissions.d.cts.map +1 -1
- package/dist/neutral/components/wallet/dialogs/connect/Permissions.d.mts +1 -0
- package/dist/neutral/components/wallet/dialogs/connect/Permissions.d.mts.map +1 -1
- package/dist/neutral/components/wallet/dialogs/connect/Permissions.d.ts +1 -0
- package/dist/neutral/components/wallet/dialogs/connect/Permissions.d.ts.map +1 -1
- package/dist/neutral/components/wallet/dialogs/connect/index.d.cts +2 -2
- package/dist/neutral/components/wallet/dialogs/connect/index.d.cts.map +1 -1
- package/dist/neutral/components/wallet/dialogs/connect/index.d.mts +2 -2
- package/dist/neutral/components/wallet/dialogs/connect/index.d.mts.map +1 -1
- package/dist/neutral/components/wallet/dialogs/connect/index.d.ts +2 -2
- package/dist/neutral/components/wallet/dialogs/connect/index.d.ts.map +1 -1
- package/dist/neutral/components/wallet/dialogs/index.d.cts +2 -2
- package/dist/neutral/components/wallet/dialogs/index.d.mts +2 -2
- package/dist/neutral/components/wallet/dialogs/index.d.ts +2 -2
- package/dist/neutral/components/wallet/dialogs/revoke/Dialog.d.cts +2 -1
- package/dist/neutral/components/wallet/dialogs/revoke/Dialog.d.cts.map +1 -1
- package/dist/neutral/components/wallet/dialogs/revoke/Dialog.d.mts +2 -1
- package/dist/neutral/components/wallet/dialogs/revoke/Dialog.d.mts.map +1 -1
- package/dist/neutral/components/wallet/dialogs/revoke/Dialog.d.ts +2 -1
- package/dist/neutral/components/wallet/dialogs/revoke/Dialog.d.ts.map +1 -1
- package/dist/neutral/components/wallet/dialogs/revoke/index.d.cts +1 -1
- package/dist/neutral/components/wallet/dialogs/revoke/index.d.cts.map +1 -1
- package/dist/neutral/components/wallet/dialogs/revoke/index.d.mts +1 -1
- package/dist/neutral/components/wallet/dialogs/revoke/index.d.mts.map +1 -1
- package/dist/neutral/components/wallet/dialogs/revoke/index.d.ts +1 -1
- package/dist/neutral/components/wallet/dialogs/revoke/index.d.ts.map +1 -1
- package/dist/neutral/components/wallet/index.d.cts +2 -2
- package/dist/neutral/components/wallet/index.d.mts +2 -2
- package/dist/neutral/components/wallet/index.d.ts +2 -2
- package/dist/neutral/components/wallet/lib/index.d.cts +2 -2
- package/dist/neutral/components/wallet/lib/index.d.mts +2 -2
- package/dist/neutral/components/wallet/lib/index.d.ts +2 -2
- package/dist/neutral/components/wallet/table/ConnectedWalletsTable.d.cts +1 -0
- package/dist/neutral/components/wallet/table/ConnectedWalletsTable.d.cts.map +1 -1
- package/dist/neutral/components/wallet/table/ConnectedWalletsTable.d.mts +1 -0
- package/dist/neutral/components/wallet/table/ConnectedWalletsTable.d.mts.map +1 -1
- package/dist/neutral/components/wallet/table/ConnectedWalletsTable.d.ts +1 -0
- package/dist/neutral/components/wallet/table/ConnectedWalletsTable.d.ts.map +1 -1
- package/dist/neutral/components/wallet/table/ConnectedWalletsTableRow.d.cts +2 -1
- package/dist/neutral/components/wallet/table/ConnectedWalletsTableRow.d.cts.map +1 -1
- package/dist/neutral/components/wallet/table/ConnectedWalletsTableRow.d.mts +2 -1
- package/dist/neutral/components/wallet/table/ConnectedWalletsTableRow.d.mts.map +1 -1
- package/dist/neutral/components/wallet/table/ConnectedWalletsTableRow.d.ts +2 -1
- package/dist/neutral/components/wallet/table/ConnectedWalletsTableRow.d.ts.map +1 -1
- package/dist/neutral/components/wallet/table/cells/Accounts.d.cts +2 -1
- package/dist/neutral/components/wallet/table/cells/Accounts.d.cts.map +1 -1
- package/dist/neutral/components/wallet/table/cells/Accounts.d.mts +2 -1
- package/dist/neutral/components/wallet/table/cells/Accounts.d.mts.map +1 -1
- package/dist/neutral/components/wallet/table/cells/Accounts.d.ts +2 -1
- package/dist/neutral/components/wallet/table/cells/Accounts.d.ts.map +1 -1
- package/dist/neutral/components/wallet/table/cells/Actions.d.cts +2 -1
- package/dist/neutral/components/wallet/table/cells/Actions.d.cts.map +1 -1
- package/dist/neutral/components/wallet/table/cells/Actions.d.mts +2 -1
- package/dist/neutral/components/wallet/table/cells/Actions.d.mts.map +1 -1
- package/dist/neutral/components/wallet/table/cells/Actions.d.ts +2 -1
- package/dist/neutral/components/wallet/table/cells/Actions.d.ts.map +1 -1
- package/dist/neutral/components/wallet/table/cells/Cells.d.cts +1 -1
- package/dist/neutral/components/wallet/table/cells/Cells.d.mts +1 -1
- package/dist/neutral/components/wallet/table/cells/Cells.d.ts +1 -1
- package/dist/neutral/components/wallet/table/cells/ChainName.d.cts +2 -1
- package/dist/neutral/components/wallet/table/cells/ChainName.d.cts.map +1 -1
- package/dist/neutral/components/wallet/table/cells/ChainName.d.mts +2 -1
- package/dist/neutral/components/wallet/table/cells/ChainName.d.mts.map +1 -1
- package/dist/neutral/components/wallet/table/cells/ChainName.d.ts +2 -1
- package/dist/neutral/components/wallet/table/cells/ChainName.d.ts.map +1 -1
- package/dist/neutral/components/wallet/table/cells/State.d.cts +2 -1
- package/dist/neutral/components/wallet/table/cells/State.d.cts.map +1 -1
- package/dist/neutral/components/wallet/table/cells/State.d.mts +2 -1
- package/dist/neutral/components/wallet/table/cells/State.d.mts.map +1 -1
- package/dist/neutral/components/wallet/table/cells/State.d.ts +2 -1
- package/dist/neutral/components/wallet/table/cells/State.d.ts.map +1 -1
- package/dist/neutral/components/wallet/table/cells/Wallet.d.cts +2 -1
- package/dist/neutral/components/wallet/table/cells/Wallet.d.cts.map +1 -1
- package/dist/neutral/components/wallet/table/cells/Wallet.d.mts +2 -1
- package/dist/neutral/components/wallet/table/cells/Wallet.d.mts.map +1 -1
- package/dist/neutral/components/wallet/table/cells/Wallet.d.ts +2 -1
- package/dist/neutral/components/wallet/table/cells/Wallet.d.ts.map +1 -1
- package/dist/neutral/components/wallet/table/cells/index.d.cts +6 -6
- package/dist/neutral/components/wallet/table/cells/index.d.cts.map +1 -1
- package/dist/neutral/components/wallet/table/cells/index.d.mts +6 -6
- package/dist/neutral/components/wallet/table/cells/index.d.mts.map +1 -1
- package/dist/neutral/components/wallet/table/cells/index.d.ts +6 -6
- package/dist/neutral/components/wallet/table/cells/index.d.ts.map +1 -1
- package/dist/neutral/components/wallet/table/cells/lib/index.d.cts +1 -1
- package/dist/neutral/components/wallet/table/cells/lib/index.d.cts.map +1 -1
- package/dist/neutral/components/wallet/table/cells/lib/index.d.mts +1 -1
- package/dist/neutral/components/wallet/table/cells/lib/index.d.mts.map +1 -1
- package/dist/neutral/components/wallet/table/cells/lib/index.d.ts +1 -1
- package/dist/neutral/components/wallet/table/cells/lib/index.d.ts.map +1 -1
- package/dist/neutral/components/wallet/table/hooks/index.d.cts +1 -1
- package/dist/neutral/components/wallet/table/hooks/index.d.cts.map +1 -1
- package/dist/neutral/components/wallet/table/hooks/index.d.mts +1 -1
- package/dist/neutral/components/wallet/table/hooks/index.d.mts.map +1 -1
- package/dist/neutral/components/wallet/table/hooks/index.d.ts +1 -1
- package/dist/neutral/components/wallet/table/hooks/index.d.ts.map +1 -1
- package/dist/neutral/components/wallet/table/hooks/useActiveProviderDialogState.d.cts +1 -1
- package/dist/neutral/components/wallet/table/hooks/useActiveProviderDialogState.d.mts +1 -1
- package/dist/neutral/components/wallet/table/hooks/useActiveProviderDialogState.d.ts +1 -1
- package/dist/neutral/components/wallet/table/index.d.cts +4 -4
- package/dist/neutral/components/wallet/table/index.d.cts.map +1 -1
- package/dist/neutral/components/wallet/table/index.d.mts +4 -4
- package/dist/neutral/components/wallet/table/index.d.mts.map +1 -1
- package/dist/neutral/components/wallet/table/index.d.ts +4 -4
- package/dist/neutral/components/wallet/table/index.d.ts.map +1 -1
- package/dist/neutral/hooks/index.d.cts +2 -2
- package/dist/neutral/hooks/index.d.cts.map +1 -1
- package/dist/neutral/hooks/index.d.mts +2 -2
- package/dist/neutral/hooks/index.d.mts.map +1 -1
- package/dist/neutral/hooks/index.d.ts +2 -2
- package/dist/neutral/hooks/index.d.ts.map +1 -1
- package/dist/neutral/hooks/useDetectWallets.d.cts.map +1 -1
- package/dist/neutral/hooks/useDetectWallets.d.mts.map +1 -1
- package/dist/neutral/hooks/useDetectWallets.d.ts.map +1 -1
- package/dist/neutral/hooks/useEnabledWallets.d.cts +1 -1
- package/dist/neutral/hooks/useEnabledWallets.d.mts +1 -1
- package/dist/neutral/hooks/useEnabledWallets.d.ts +1 -1
- package/dist/neutral/index.cjs +339 -260
- package/dist/neutral/index.cjs.map +1 -1
- package/dist/neutral/index.d.cts +3 -3
- package/dist/neutral/index.d.mts +3 -3
- package/dist/neutral/index.d.ts +3 -3
- package/dist/neutral/index.mjs +623 -0
- package/dist/neutral/index.mjs.map +1 -0
- package/dist/node/classes/index.d.cts +1 -1
- package/dist/node/classes/index.d.mts +1 -1
- package/dist/node/classes/index.d.ts +1 -1
- package/dist/node/components/ConnectedAccountsFlexbox.d.cts +2 -1
- package/dist/node/components/ConnectedAccountsFlexbox.d.cts.map +1 -1
- package/dist/node/components/ConnectedAccountsFlexbox.d.mts +2 -1
- package/dist/node/components/ConnectedAccountsFlexbox.d.mts.map +1 -1
- package/dist/node/components/ConnectedAccountsFlexbox.d.ts +2 -1
- package/dist/node/components/ConnectedAccountsFlexbox.d.ts.map +1 -1
- package/dist/node/components/index.d.cts +2 -2
- package/dist/node/components/index.d.cts.map +1 -1
- package/dist/node/components/index.d.mts +2 -2
- package/dist/node/components/index.d.mts.map +1 -1
- package/dist/node/components/index.d.ts +2 -2
- package/dist/node/components/index.d.ts.map +1 -1
- package/dist/node/components/wallet/dialogs/connect/CheckboxFormControl.d.cts +1 -0
- package/dist/node/components/wallet/dialogs/connect/CheckboxFormControl.d.cts.map +1 -1
- package/dist/node/components/wallet/dialogs/connect/CheckboxFormControl.d.mts +1 -0
- package/dist/node/components/wallet/dialogs/connect/CheckboxFormControl.d.mts.map +1 -1
- package/dist/node/components/wallet/dialogs/connect/CheckboxFormControl.d.ts +1 -0
- package/dist/node/components/wallet/dialogs/connect/CheckboxFormControl.d.ts.map +1 -1
- package/dist/node/components/wallet/dialogs/connect/Dialog.d.cts +2 -1
- package/dist/node/components/wallet/dialogs/connect/Dialog.d.cts.map +1 -1
- package/dist/node/components/wallet/dialogs/connect/Dialog.d.mts +2 -1
- package/dist/node/components/wallet/dialogs/connect/Dialog.d.mts.map +1 -1
- package/dist/node/components/wallet/dialogs/connect/Dialog.d.ts +2 -1
- package/dist/node/components/wallet/dialogs/connect/Dialog.d.ts.map +1 -1
- package/dist/node/components/wallet/dialogs/connect/LinkedProvidersFlexbox.d.cts +1 -0
- package/dist/node/components/wallet/dialogs/connect/LinkedProvidersFlexbox.d.cts.map +1 -1
- package/dist/node/components/wallet/dialogs/connect/LinkedProvidersFlexbox.d.mts +1 -0
- package/dist/node/components/wallet/dialogs/connect/LinkedProvidersFlexbox.d.mts.map +1 -1
- package/dist/node/components/wallet/dialogs/connect/LinkedProvidersFlexbox.d.ts +1 -0
- package/dist/node/components/wallet/dialogs/connect/LinkedProvidersFlexbox.d.ts.map +1 -1
- package/dist/node/components/wallet/dialogs/connect/Permissions.d.cts +1 -0
- package/dist/node/components/wallet/dialogs/connect/Permissions.d.cts.map +1 -1
- package/dist/node/components/wallet/dialogs/connect/Permissions.d.mts +1 -0
- package/dist/node/components/wallet/dialogs/connect/Permissions.d.mts.map +1 -1
- package/dist/node/components/wallet/dialogs/connect/Permissions.d.ts +1 -0
- package/dist/node/components/wallet/dialogs/connect/Permissions.d.ts.map +1 -1
- package/dist/node/components/wallet/dialogs/connect/index.d.cts +2 -2
- package/dist/node/components/wallet/dialogs/connect/index.d.cts.map +1 -1
- package/dist/node/components/wallet/dialogs/connect/index.d.mts +2 -2
- package/dist/node/components/wallet/dialogs/connect/index.d.mts.map +1 -1
- package/dist/node/components/wallet/dialogs/connect/index.d.ts +2 -2
- package/dist/node/components/wallet/dialogs/connect/index.d.ts.map +1 -1
- package/dist/node/components/wallet/dialogs/index.d.cts +2 -2
- package/dist/node/components/wallet/dialogs/index.d.mts +2 -2
- package/dist/node/components/wallet/dialogs/index.d.ts +2 -2
- package/dist/node/components/wallet/dialogs/revoke/Dialog.d.cts +2 -1
- package/dist/node/components/wallet/dialogs/revoke/Dialog.d.cts.map +1 -1
- package/dist/node/components/wallet/dialogs/revoke/Dialog.d.mts +2 -1
- package/dist/node/components/wallet/dialogs/revoke/Dialog.d.mts.map +1 -1
- package/dist/node/components/wallet/dialogs/revoke/Dialog.d.ts +2 -1
- package/dist/node/components/wallet/dialogs/revoke/Dialog.d.ts.map +1 -1
- package/dist/node/components/wallet/dialogs/revoke/index.d.cts +1 -1
- package/dist/node/components/wallet/dialogs/revoke/index.d.cts.map +1 -1
- package/dist/node/components/wallet/dialogs/revoke/index.d.mts +1 -1
- package/dist/node/components/wallet/dialogs/revoke/index.d.mts.map +1 -1
- package/dist/node/components/wallet/dialogs/revoke/index.d.ts +1 -1
- package/dist/node/components/wallet/dialogs/revoke/index.d.ts.map +1 -1
- package/dist/node/components/wallet/index.d.cts +2 -2
- package/dist/node/components/wallet/index.d.mts +2 -2
- package/dist/node/components/wallet/index.d.ts +2 -2
- package/dist/node/components/wallet/lib/index.d.cts +2 -2
- package/dist/node/components/wallet/lib/index.d.mts +2 -2
- package/dist/node/components/wallet/lib/index.d.ts +2 -2
- package/dist/node/components/wallet/table/ConnectedWalletsTable.d.cts +1 -0
- package/dist/node/components/wallet/table/ConnectedWalletsTable.d.cts.map +1 -1
- package/dist/node/components/wallet/table/ConnectedWalletsTable.d.mts +1 -0
- package/dist/node/components/wallet/table/ConnectedWalletsTable.d.mts.map +1 -1
- package/dist/node/components/wallet/table/ConnectedWalletsTable.d.ts +1 -0
- package/dist/node/components/wallet/table/ConnectedWalletsTable.d.ts.map +1 -1
- package/dist/node/components/wallet/table/ConnectedWalletsTableRow.d.cts +2 -1
- package/dist/node/components/wallet/table/ConnectedWalletsTableRow.d.cts.map +1 -1
- package/dist/node/components/wallet/table/ConnectedWalletsTableRow.d.mts +2 -1
- package/dist/node/components/wallet/table/ConnectedWalletsTableRow.d.mts.map +1 -1
- package/dist/node/components/wallet/table/ConnectedWalletsTableRow.d.ts +2 -1
- package/dist/node/components/wallet/table/ConnectedWalletsTableRow.d.ts.map +1 -1
- package/dist/node/components/wallet/table/cells/Accounts.d.cts +2 -1
- package/dist/node/components/wallet/table/cells/Accounts.d.cts.map +1 -1
- package/dist/node/components/wallet/table/cells/Accounts.d.mts +2 -1
- package/dist/node/components/wallet/table/cells/Accounts.d.mts.map +1 -1
- package/dist/node/components/wallet/table/cells/Accounts.d.ts +2 -1
- package/dist/node/components/wallet/table/cells/Accounts.d.ts.map +1 -1
- package/dist/node/components/wallet/table/cells/Actions.d.cts +2 -1
- package/dist/node/components/wallet/table/cells/Actions.d.cts.map +1 -1
- package/dist/node/components/wallet/table/cells/Actions.d.mts +2 -1
- package/dist/node/components/wallet/table/cells/Actions.d.mts.map +1 -1
- package/dist/node/components/wallet/table/cells/Actions.d.ts +2 -1
- package/dist/node/components/wallet/table/cells/Actions.d.ts.map +1 -1
- package/dist/node/components/wallet/table/cells/Cells.d.cts +1 -1
- package/dist/node/components/wallet/table/cells/Cells.d.mts +1 -1
- package/dist/node/components/wallet/table/cells/Cells.d.ts +1 -1
- package/dist/node/components/wallet/table/cells/ChainName.d.cts +2 -1
- package/dist/node/components/wallet/table/cells/ChainName.d.cts.map +1 -1
- package/dist/node/components/wallet/table/cells/ChainName.d.mts +2 -1
- package/dist/node/components/wallet/table/cells/ChainName.d.mts.map +1 -1
- package/dist/node/components/wallet/table/cells/ChainName.d.ts +2 -1
- package/dist/node/components/wallet/table/cells/ChainName.d.ts.map +1 -1
- package/dist/node/components/wallet/table/cells/State.d.cts +2 -1
- package/dist/node/components/wallet/table/cells/State.d.cts.map +1 -1
- package/dist/node/components/wallet/table/cells/State.d.mts +2 -1
- package/dist/node/components/wallet/table/cells/State.d.mts.map +1 -1
- package/dist/node/components/wallet/table/cells/State.d.ts +2 -1
- package/dist/node/components/wallet/table/cells/State.d.ts.map +1 -1
- package/dist/node/components/wallet/table/cells/Wallet.d.cts +2 -1
- package/dist/node/components/wallet/table/cells/Wallet.d.cts.map +1 -1
- package/dist/node/components/wallet/table/cells/Wallet.d.mts +2 -1
- package/dist/node/components/wallet/table/cells/Wallet.d.mts.map +1 -1
- package/dist/node/components/wallet/table/cells/Wallet.d.ts +2 -1
- package/dist/node/components/wallet/table/cells/Wallet.d.ts.map +1 -1
- package/dist/node/components/wallet/table/cells/index.d.cts +6 -6
- package/dist/node/components/wallet/table/cells/index.d.cts.map +1 -1
- package/dist/node/components/wallet/table/cells/index.d.mts +6 -6
- package/dist/node/components/wallet/table/cells/index.d.mts.map +1 -1
- package/dist/node/components/wallet/table/cells/index.d.ts +6 -6
- package/dist/node/components/wallet/table/cells/index.d.ts.map +1 -1
- package/dist/node/components/wallet/table/cells/lib/index.d.cts +1 -1
- package/dist/node/components/wallet/table/cells/lib/index.d.cts.map +1 -1
- package/dist/node/components/wallet/table/cells/lib/index.d.mts +1 -1
- package/dist/node/components/wallet/table/cells/lib/index.d.mts.map +1 -1
- package/dist/node/components/wallet/table/cells/lib/index.d.ts +1 -1
- package/dist/node/components/wallet/table/cells/lib/index.d.ts.map +1 -1
- package/dist/node/components/wallet/table/hooks/index.d.cts +1 -1
- package/dist/node/components/wallet/table/hooks/index.d.cts.map +1 -1
- package/dist/node/components/wallet/table/hooks/index.d.mts +1 -1
- package/dist/node/components/wallet/table/hooks/index.d.mts.map +1 -1
- package/dist/node/components/wallet/table/hooks/index.d.ts +1 -1
- package/dist/node/components/wallet/table/hooks/index.d.ts.map +1 -1
- package/dist/node/components/wallet/table/hooks/useActiveProviderDialogState.d.cts +1 -1
- package/dist/node/components/wallet/table/hooks/useActiveProviderDialogState.d.mts +1 -1
- package/dist/node/components/wallet/table/hooks/useActiveProviderDialogState.d.ts +1 -1
- package/dist/node/components/wallet/table/index.d.cts +4 -4
- package/dist/node/components/wallet/table/index.d.cts.map +1 -1
- package/dist/node/components/wallet/table/index.d.mts +4 -4
- package/dist/node/components/wallet/table/index.d.mts.map +1 -1
- package/dist/node/components/wallet/table/index.d.ts +4 -4
- package/dist/node/components/wallet/table/index.d.ts.map +1 -1
- package/dist/node/hooks/index.d.cts +2 -2
- package/dist/node/hooks/index.d.cts.map +1 -1
- package/dist/node/hooks/index.d.mts +2 -2
- package/dist/node/hooks/index.d.mts.map +1 -1
- package/dist/node/hooks/index.d.ts +2 -2
- package/dist/node/hooks/index.d.ts.map +1 -1
- package/dist/node/hooks/useDetectWallets.d.cts.map +1 -1
- package/dist/node/hooks/useDetectWallets.d.mts.map +1 -1
- package/dist/node/hooks/useDetectWallets.d.ts.map +1 -1
- package/dist/node/hooks/useEnabledWallets.d.cts +1 -1
- package/dist/node/hooks/useEnabledWallets.d.mts +1 -1
- package/dist/node/hooks/useEnabledWallets.d.ts +1 -1
- package/dist/node/index.cjs +346 -268
- package/dist/node/index.cjs.map +1 -1
- package/dist/node/index.d.cts +3 -3
- package/dist/node/index.d.mts +3 -3
- package/dist/node/index.d.ts +3 -3
- package/dist/node/index.mjs +633 -0
- package/dist/node/index.mjs.map +1 -0
- package/package.json +11 -11
- package/src/classes/EnabledWallets.ts +1 -1
- package/src/classes/index.ts +1 -1
- package/src/components/ConnectedAccountsFlexbox.stories.tsx +2 -4
- package/src/components/ConnectedAccountsFlexbox.tsx +13 -9
- package/src/components/index.ts +2 -2
- package/src/components/wallet/dialogs/connect/CheckboxFormControl.tsx +1 -0
- package/src/components/wallet/dialogs/connect/Dialog.tsx +5 -4
- package/src/components/wallet/dialogs/connect/LinkedProvidersFlexbox.tsx +4 -3
- package/src/components/wallet/dialogs/connect/Permissions.tsx +3 -1
- package/src/components/wallet/dialogs/connect/index.ts +2 -2
- package/src/components/wallet/dialogs/index.ts +2 -2
- package/src/components/wallet/dialogs/revoke/Dialog.tsx +13 -4
- package/src/components/wallet/dialogs/revoke/index.ts +1 -1
- package/src/components/wallet/index.ts +2 -2
- package/src/components/wallet/lib/index.ts +2 -2
- package/src/components/wallet/table/ConnectedWalletsTable.tsx +6 -6
- package/src/components/wallet/table/ConnectedWalletsTableRow.tsx +3 -3
- package/src/components/wallet/table/cells/Accounts.tsx +2 -1
- package/src/components/wallet/table/cells/Actions.tsx +21 -15
- package/src/components/wallet/table/cells/Cells.tsx +6 -6
- package/src/components/wallet/table/cells/ChainName.tsx +2 -1
- package/src/components/wallet/table/cells/State.tsx +4 -3
- package/src/components/wallet/table/cells/Wallet.tsx +2 -1
- package/src/components/wallet/table/cells/index.ts +6 -6
- package/src/components/wallet/table/cells/lib/index.ts +1 -1
- package/src/components/wallet/table/hooks/index.ts +1 -1
- package/src/components/wallet/table/hooks/useActiveProviderDialogState.tsx +1 -1
- package/src/components/wallet/table/index.ts +4 -4
- package/src/hooks/index.ts +2 -2
- package/src/hooks/useDetectWallets.tsx +2 -1
- package/src/hooks/useEnabledWallets.tsx +1 -1
- package/src/index.ts +3 -3
- package/dist/browser/index.js +0 -542
- package/dist/browser/index.js.map +0 -1
- package/dist/neutral/index.js +0 -542
- package/dist/neutral/index.js.map +0 -1
- package/dist/node/index.js +0 -553
- package/dist/node/index.js.map +0 -1
@@ -0,0 +1,623 @@
|
|
1
|
+
var __defProp = Object.defineProperty;
|
2
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
3
|
+
|
4
|
+
// src/classes/EnabledWallets.ts
|
5
|
+
var DEFAULT_LOCAL_STORAGE_KEY = "XYO|EnabledWallets";
|
6
|
+
var EnabledEthWalletConnections = class {
|
7
|
+
static {
|
8
|
+
__name(this, "EnabledEthWalletConnections");
|
9
|
+
}
|
10
|
+
// control whether or not enabled/disabled preferences are persisted (i.e. in localStorage)
|
11
|
+
persistPreferences = true;
|
12
|
+
// Map of wallet names and their enabled/disabled state
|
13
|
+
enabledWallets = {};
|
14
|
+
// Map of wallet names, their enabled/disabled state, and their wallet class
|
15
|
+
ethWalletsState = {};
|
16
|
+
// list of listeners that want to be notified on wallet changes
|
17
|
+
listeners = [];
|
18
|
+
// key to use in localStorage when persisting preferences
|
19
|
+
localStorageKey = DEFAULT_LOCAL_STORAGE_KEY;
|
20
|
+
constructor(localStorageKey = DEFAULT_LOCAL_STORAGE_KEY) {
|
21
|
+
this.localStorageKey = localStorageKey;
|
22
|
+
this.reviveSettings();
|
23
|
+
}
|
24
|
+
get wallets() {
|
25
|
+
return this.ethWalletsState;
|
26
|
+
}
|
27
|
+
disableWallet(rdns) {
|
28
|
+
this.toggleEnabledWallet(rdns, false);
|
29
|
+
}
|
30
|
+
enableWallet(rdns) {
|
31
|
+
this.toggleEnabledWallet(rdns, true);
|
32
|
+
}
|
33
|
+
/**
|
34
|
+
* Given a new set of wallets, set their enabled state based off previous preferences
|
35
|
+
*/
|
36
|
+
resetWallets(wallets) {
|
37
|
+
const newWallets = {};
|
38
|
+
const addWallet = /* @__PURE__ */ __name(([walletName, wallet]) => {
|
39
|
+
newWallets[walletName] = {
|
40
|
+
// preserve the existing enabled state
|
41
|
+
enabled: walletName in this.enabledWallets ? this.enabledWallets[walletName] : true,
|
42
|
+
wallet
|
43
|
+
};
|
44
|
+
}, "addWallet");
|
45
|
+
Object.entries(wallets).forEach(addWallet.bind(this));
|
46
|
+
this.ethWalletsState = newWallets;
|
47
|
+
this.emitChange();
|
48
|
+
}
|
49
|
+
subscribe(listener) {
|
50
|
+
this.listeners = [
|
51
|
+
...this.listeners,
|
52
|
+
listener
|
53
|
+
];
|
54
|
+
return () => {
|
55
|
+
this.listeners = this.listeners.filter((existingListener) => existingListener !== listener);
|
56
|
+
};
|
57
|
+
}
|
58
|
+
toggleEnabledWallet(rdns, enabled) {
|
59
|
+
if (rdns && this.ethWalletsState[rdns]) {
|
60
|
+
this.ethWalletsState[rdns].enabled = enabled;
|
61
|
+
this.ethWalletsState = {
|
62
|
+
...this.ethWalletsState
|
63
|
+
};
|
64
|
+
this.emitChange();
|
65
|
+
}
|
66
|
+
}
|
67
|
+
emitChange() {
|
68
|
+
for (const listener of this.listeners) {
|
69
|
+
listener();
|
70
|
+
}
|
71
|
+
this.persistSettings();
|
72
|
+
}
|
73
|
+
isPersistance(method) {
|
74
|
+
if (this.persistPreferences) {
|
75
|
+
method();
|
76
|
+
}
|
77
|
+
}
|
78
|
+
persistSettings() {
|
79
|
+
this.isPersistance(() => {
|
80
|
+
const enabledWallets = Object.entries(this.ethWalletsState).reduce((acc, [rdns, { enabled }]) => {
|
81
|
+
acc[rdns] = enabled;
|
82
|
+
return acc;
|
83
|
+
}, {});
|
84
|
+
localStorage.setItem(this.localStorageKey, JSON.stringify(enabledWallets));
|
85
|
+
});
|
86
|
+
}
|
87
|
+
reviveSettings() {
|
88
|
+
this.isPersistance(() => {
|
89
|
+
const existingEntries = localStorage.getItem(this.localStorageKey);
|
90
|
+
try {
|
91
|
+
const entries = existingEntries ? JSON.parse(existingEntries) : {};
|
92
|
+
this.enabledWallets = entries;
|
93
|
+
} catch (e) {
|
94
|
+
console.warn(`Error parsing saved enabled wallet entries: ${e.message}`);
|
95
|
+
}
|
96
|
+
});
|
97
|
+
}
|
98
|
+
};
|
99
|
+
|
100
|
+
// src/components/ConnectedAccountsFlexbox.tsx
|
101
|
+
import { Typography as Typography6, useTheme as useTheme2 } from "@mui/material";
|
102
|
+
import { FlexCol as FlexCol3 } from "@xylabs/react-flexbox";
|
103
|
+
import React13, { forwardRef } from "react";
|
104
|
+
|
105
|
+
// src/hooks/useDetectWallets.tsx
|
106
|
+
import { AccountsChangedEventName, useWalletDiscovery } from "@xylabs/react-crypto";
|
107
|
+
import { useEffect, useMemo, useState } from "react";
|
108
|
+
var sortWallets = /* @__PURE__ */ __name((wallets) => (
|
109
|
+
// eslint-disable-next-line unicorn/no-array-reduce
|
110
|
+
Object.values(wallets).reduce((acc, wallet) => {
|
111
|
+
wallet.allowedAccounts.length > 0 ? acc.unshift(wallet) : acc.push(wallet);
|
112
|
+
return acc;
|
113
|
+
}, [])
|
114
|
+
), "sortWallets");
|
115
|
+
var useDetectedWallets = /* @__PURE__ */ __name(() => {
|
116
|
+
const wallets = useWalletDiscovery();
|
117
|
+
const [refresh, setRefresh] = useState(0);
|
118
|
+
const [sortedWallets, setSortedWallets] = useState([]);
|
119
|
+
useEffect(() => {
|
120
|
+
setSortedWallets(sortWallets(wallets));
|
121
|
+
}, [
|
122
|
+
wallets,
|
123
|
+
refresh
|
124
|
+
]);
|
125
|
+
useEffect(() => {
|
126
|
+
const listener = /* @__PURE__ */ __name(() => {
|
127
|
+
setRefresh((refresh2) => refresh2 + 1);
|
128
|
+
}, "listener");
|
129
|
+
window.addEventListener(AccountsChangedEventName, listener);
|
130
|
+
return () => {
|
131
|
+
window.removeEventListener(AccountsChangedEventName, listener);
|
132
|
+
};
|
133
|
+
}, [
|
134
|
+
wallets
|
135
|
+
]);
|
136
|
+
const totalConnectedAccounts = useMemo(() => Object.values(sortedWallets).reduce((acc, wallet) => acc + wallet.allowedAccounts.length, 0), [
|
137
|
+
sortedWallets
|
138
|
+
]);
|
139
|
+
return {
|
140
|
+
sortedWallets,
|
141
|
+
totalConnectedAccounts
|
142
|
+
};
|
143
|
+
}, "useDetectedWallets");
|
144
|
+
|
145
|
+
// src/hooks/useEnabledWallets.tsx
|
146
|
+
import { useWalletDiscovery as useWalletDiscovery2 } from "@xylabs/react-crypto";
|
147
|
+
import { useMemo as useMemo2, useSyncExternalStore } from "react";
|
148
|
+
var enabledEthWallets;
|
149
|
+
var useEnabledWalletsInner = /* @__PURE__ */ __name((enabledWalletsRdns) => {
|
150
|
+
const discoveredWallets = useWalletDiscovery2();
|
151
|
+
const wallets = useMemo2(() => {
|
152
|
+
if (enabledEthWallets === void 0) enabledEthWallets = new EnabledEthWalletConnections();
|
153
|
+
enabledEthWallets.resetWallets(discoveredWallets);
|
154
|
+
for (const [rdns, enabled] of Object.entries(enabledWalletsRdns ?? {})) enabledEthWallets?.toggleEnabledWallet(rdns, enabled);
|
155
|
+
return enabledEthWallets;
|
156
|
+
}, [
|
157
|
+
discoveredWallets,
|
158
|
+
enabledWalletsRdns
|
159
|
+
]);
|
160
|
+
return useSyncExternalStore(wallets.subscribe.bind(wallets), () => wallets.wallets);
|
161
|
+
}, "useEnabledWalletsInner");
|
162
|
+
var useEnabledWallets = /* @__PURE__ */ __name((enabledWalletsRdns) => {
|
163
|
+
const wallets = useEnabledWalletsInner(enabledWalletsRdns);
|
164
|
+
const enabledWallets = useMemo2(() => (
|
165
|
+
// eslint-disable-next-line unicorn/no-array-reduce
|
166
|
+
Object.entries(wallets).reduce((acc, [walletName, wallet]) => {
|
167
|
+
if (wallet.enabled) acc[walletName] = wallet;
|
168
|
+
return acc;
|
169
|
+
}, {})
|
170
|
+
), [
|
171
|
+
wallets
|
172
|
+
]);
|
173
|
+
return {
|
174
|
+
disableWallet: enabledEthWallets?.disableWallet.bind(enabledEthWallets),
|
175
|
+
enableWallet: enabledEthWallets?.enableWallet.bind(enabledEthWallets),
|
176
|
+
enabledWallets,
|
177
|
+
wallets
|
178
|
+
};
|
179
|
+
}, "useEnabledWallets");
|
180
|
+
|
181
|
+
// src/components/wallet/dialogs/connect/CheckboxFormControl.tsx
|
182
|
+
import { Checkbox, FormControl, FormLabel } from "@mui/material";
|
183
|
+
import React from "react";
|
184
|
+
var CheckboxFormControl = /* @__PURE__ */ __name(({ onCheckChanged, ...props }) => {
|
185
|
+
return /* @__PURE__ */ React.createElement(FormControl, props, /* @__PURE__ */ React.createElement(FormLabel, null, /* @__PURE__ */ React.createElement(Checkbox, {
|
186
|
+
onChange: /* @__PURE__ */ __name((_, checked) => onCheckChanged?.(checked), "onChange")
|
187
|
+
}), "Do not show this again."));
|
188
|
+
}, "CheckboxFormControl");
|
189
|
+
|
190
|
+
// src/components/wallet/dialogs/connect/Dialog.tsx
|
191
|
+
import { Button, Dialog, DialogActions, DialogContent, DialogTitle } from "@mui/material";
|
192
|
+
import React4 from "react";
|
193
|
+
|
194
|
+
// src/components/wallet/dialogs/connect/LinkedProvidersFlexbox.tsx
|
195
|
+
import { SyncAlt } from "@mui/icons-material";
|
196
|
+
import { Typography } from "@mui/material";
|
197
|
+
import { ConstrainedImage } from "@xylabs/react-crypto";
|
198
|
+
import { FlexCol, FlexRow } from "@xylabs/react-flexbox";
|
199
|
+
import React2 from "react";
|
200
|
+
|
201
|
+
// src/img/index.ts
|
202
|
+
import { default as default2 } from "./xyo-color-logo-LHR2SMEM.svg";
|
203
|
+
import { default as default3 } from "./xyo-color-logo-text-only-QPAW5BSQ.svg";
|
204
|
+
|
205
|
+
// src/components/wallet/dialogs/connect/LinkedProvidersFlexbox.tsx
|
206
|
+
var LinkedProvidersFlexbox = /* @__PURE__ */ __name(({ icon, providerName, ...props }) => {
|
207
|
+
return /* @__PURE__ */ React2.createElement(FlexRow, {
|
208
|
+
gap: 4,
|
209
|
+
justifyContent: "space-evenly",
|
210
|
+
...props
|
211
|
+
}, /* @__PURE__ */ React2.createElement(FlexCol, {
|
212
|
+
gap: 0.5
|
213
|
+
}, /* @__PURE__ */ React2.createElement("img", {
|
214
|
+
alt: "XYO Logo",
|
215
|
+
src: default2,
|
216
|
+
style: {
|
217
|
+
height: "48px"
|
218
|
+
}
|
219
|
+
}), /* @__PURE__ */ React2.createElement(Typography, {
|
220
|
+
variant: "subtitle1"
|
221
|
+
}, "XYO App")), /* @__PURE__ */ React2.createElement(SyncAlt, {
|
222
|
+
fontSize: "large"
|
223
|
+
}), /* @__PURE__ */ React2.createElement(FlexCol, {
|
224
|
+
gap: 0.5
|
225
|
+
}, /* @__PURE__ */ React2.createElement(ConstrainedImage, {
|
226
|
+
constrainedValue: "48px",
|
227
|
+
src: icon,
|
228
|
+
alt: providerName,
|
229
|
+
style: {
|
230
|
+
height: "48px",
|
231
|
+
maxWidth: "48px"
|
232
|
+
}
|
233
|
+
}), /* @__PURE__ */ React2.createElement(Typography, {
|
234
|
+
variant: "subtitle1"
|
235
|
+
}, providerName)));
|
236
|
+
}, "LinkedProvidersFlexbox");
|
237
|
+
|
238
|
+
// src/components/wallet/dialogs/connect/Permissions.tsx
|
239
|
+
import { Link, Typography as Typography2 } from "@mui/material";
|
240
|
+
import { FlexCol as FlexCol2 } from "@xylabs/react-flexbox";
|
241
|
+
import React3 from "react";
|
242
|
+
var WalletPermissionsFlexbox = /* @__PURE__ */ __name((props) => {
|
243
|
+
return /* @__PURE__ */ React3.createElement(FlexCol2, {
|
244
|
+
gap: 4,
|
245
|
+
...props
|
246
|
+
}, /* @__PURE__ */ React3.createElement(Typography2, {
|
247
|
+
fontWeight: "bold",
|
248
|
+
sx: {
|
249
|
+
textAlign: "center"
|
250
|
+
}
|
251
|
+
}, "This will allow XYO to:"), /* @__PURE__ */ React3.createElement("ul", null, /* @__PURE__ */ React3.createElement("li", null, "View your wallet account(s) and address(es)"), /* @__PURE__ */ React3.createElement("li", null, "Read-only access to browse the public blockchain(s) you select")), /* @__PURE__ */ React3.createElement(Typography2, {
|
252
|
+
variant: "subtitle1",
|
253
|
+
sx: {
|
254
|
+
textAlign: "center"
|
255
|
+
}
|
256
|
+
}, "You control what accounts to share and what blockchains to view. You can see or revoke access via your wallet's settings at anytime. View more on XYO's sovereign data philosophy", " ", /* @__PURE__ */ React3.createElement(Link, {
|
257
|
+
href: "https://cointelegraph.com/innovation-circle/decentralization-and-sovereignty-debunking-our-approach-to-digital-sovereignty",
|
258
|
+
sx: {
|
259
|
+
fontWeight: "bold"
|
260
|
+
},
|
261
|
+
target: "_blank"
|
262
|
+
}, "here"), "."));
|
263
|
+
}, "WalletPermissionsFlexbox");
|
264
|
+
|
265
|
+
// src/components/wallet/dialogs/connect/Dialog.tsx
|
266
|
+
var ConnectWalletDialog = /* @__PURE__ */ __name(({ activeProvider, onIgnoreConnectDialog, ...props }) => {
|
267
|
+
const { icon, providerName } = activeProvider ?? {};
|
268
|
+
const onConnect = /* @__PURE__ */ __name(async () => {
|
269
|
+
try {
|
270
|
+
await activeProvider?.connectWallet?.();
|
271
|
+
props.onClose?.({}, "escapeKeyDown");
|
272
|
+
} catch (e) {
|
273
|
+
console.warn(`Error connecting to wallet: ${e.message}`);
|
274
|
+
}
|
275
|
+
}, "onConnect");
|
276
|
+
return /* @__PURE__ */ React4.createElement(Dialog, {
|
277
|
+
PaperProps: {
|
278
|
+
sx: {
|
279
|
+
display: "flex",
|
280
|
+
gap: 4
|
281
|
+
}
|
282
|
+
},
|
283
|
+
...props
|
284
|
+
}, /* @__PURE__ */ React4.createElement(DialogTitle, {
|
285
|
+
sx: {
|
286
|
+
textAlign: "center"
|
287
|
+
}
|
288
|
+
}, "XYO Wants To Access The Blockchain on Your Behalf"), /* @__PURE__ */ React4.createElement(DialogContent, {
|
289
|
+
sx: {
|
290
|
+
display: "flex",
|
291
|
+
flexDirection: "column",
|
292
|
+
gap: 4
|
293
|
+
}
|
294
|
+
}, /* @__PURE__ */ React4.createElement(LinkedProvidersFlexbox, {
|
295
|
+
icon,
|
296
|
+
providerName
|
297
|
+
}), /* @__PURE__ */ React4.createElement(WalletPermissionsFlexbox, null), /* @__PURE__ */ React4.createElement(CheckboxFormControl, {
|
298
|
+
onCheckChanged: onIgnoreConnectDialog
|
299
|
+
})), /* @__PURE__ */ React4.createElement(DialogActions, null, /* @__PURE__ */ React4.createElement(Button, {
|
300
|
+
variant: "outlined",
|
301
|
+
onClick: /* @__PURE__ */ __name(() => props.onClose?.({}, "escapeKeyDown"), "onClick")
|
302
|
+
}, "Close"), /* @__PURE__ */ React4.createElement(Button, {
|
303
|
+
variant: "contained",
|
304
|
+
onClick: onConnect
|
305
|
+
}, "Connect")));
|
306
|
+
}, "ConnectWalletDialog");
|
307
|
+
|
308
|
+
// src/components/wallet/dialogs/revoke/Dialog.tsx
|
309
|
+
import { Button as Button2, Dialog as Dialog2, DialogActions as DialogActions2, DialogContent as DialogContent2, DialogTitle as DialogTitle2, Typography as Typography3 } from "@mui/material";
|
310
|
+
import { ConstrainedImage as ConstrainedImage2 } from "@xylabs/react-crypto";
|
311
|
+
import { FlexRow as FlexRow2 } from "@xylabs/react-flexbox";
|
312
|
+
import React5 from "react";
|
313
|
+
var RevokeWalletConnectionDialog = /* @__PURE__ */ __name(({ activeProvider, ...props }) => {
|
314
|
+
return /* @__PURE__ */ React5.createElement(Dialog2, props, /* @__PURE__ */ React5.createElement(FlexRow2, {
|
315
|
+
gap: 2,
|
316
|
+
justifyContent: "start",
|
317
|
+
pl: 2
|
318
|
+
}, /* @__PURE__ */ React5.createElement(ConstrainedImage2, {
|
319
|
+
src: activeProvider?.icon,
|
320
|
+
constrainedValue: "24px"
|
321
|
+
}), /* @__PURE__ */ React5.createElement(DialogTitle2, {
|
322
|
+
sx: {
|
323
|
+
pl: 0
|
324
|
+
}
|
325
|
+
}, "Revoke", activeProvider?.providerName, " ", "Access")), /* @__PURE__ */ React5.createElement(DialogContent2, null, /* @__PURE__ */ React5.createElement(Typography3, null, "Revoking access to your wallet must be done from the wallet's browser extension. Wallets grant access to specific domains please consult", " ", activeProvider?.providerName, "'s documentation on how to revoke access to this website:"), /* @__PURE__ */ React5.createElement(Typography3, null, window.location.origin)), /* @__PURE__ */ React5.createElement(DialogActions2, null, /* @__PURE__ */ React5.createElement(Button2, {
|
326
|
+
variant: "contained",
|
327
|
+
onClick: /* @__PURE__ */ __name(() => props.onClose?.({}, "escapeKeyDown"), "onClick")
|
328
|
+
}, "Close")));
|
329
|
+
}, "RevokeWalletConnectionDialog");
|
330
|
+
|
331
|
+
// src/components/wallet/table/cells/Accounts.tsx
|
332
|
+
import { TableCell, Tooltip, Typography as Typography4 } from "@mui/material";
|
333
|
+
import React6 from "react";
|
334
|
+
var ConnectedWalletsAccountsTableCell = /* @__PURE__ */ __name(({ additionalAccounts, currentAccount, totalAccounts, tableCellProps }) => {
|
335
|
+
return /* @__PURE__ */ React6.createElement(TableCell, tableCellProps, /* @__PURE__ */ React6.createElement(Tooltip, {
|
336
|
+
sx: {
|
337
|
+
cursor: totalAccounts > 0 ? "pointer" : "auto"
|
338
|
+
},
|
339
|
+
title: [
|
340
|
+
...currentAccount ?? [],
|
341
|
+
...additionalAccounts ?? []
|
342
|
+
].map((address, index) => /* @__PURE__ */ React6.createElement("p", {
|
343
|
+
key: index
|
344
|
+
}, address))
|
345
|
+
}, /* @__PURE__ */ React6.createElement(Typography4, null, totalAccounts)));
|
346
|
+
}, "ConnectedWalletsAccountsTableCell");
|
347
|
+
|
348
|
+
// src/components/wallet/table/cells/Actions.tsx
|
349
|
+
import { Check, InfoOutlined } from "@mui/icons-material";
|
350
|
+
import { Button as Button3, IconButton, TableCell as TableCell2, Typography as Typography5 } from "@mui/material";
|
351
|
+
import { FlexRow as FlexRow3 } from "@xylabs/react-flexbox";
|
352
|
+
import React7 from "react";
|
353
|
+
var ConnectedWalletsActionsTableCell = /* @__PURE__ */ __name(({ connected, onConnect, onRevoke, tableCellProps }) => {
|
354
|
+
return /* @__PURE__ */ React7.createElement(TableCell2, tableCellProps, /* @__PURE__ */ React7.createElement(FlexRow3, {
|
355
|
+
gap: 2,
|
356
|
+
justifyContent: "start"
|
357
|
+
}, connected ? /* @__PURE__ */ React7.createElement(Typography5, {
|
358
|
+
sx: {
|
359
|
+
display: "inline-flex",
|
360
|
+
gap: 0.5
|
361
|
+
}
|
362
|
+
}, /* @__PURE__ */ React7.createElement(Check, null), "Connected") : /* @__PURE__ */ React7.createElement(Button3, {
|
363
|
+
variant: "contained",
|
364
|
+
onClick: onConnect
|
365
|
+
}, "Connect"), connected ? /* @__PURE__ */ React7.createElement(IconButton, {
|
366
|
+
onClick: onRevoke
|
367
|
+
}, /* @__PURE__ */ React7.createElement(InfoOutlined, null)) : null));
|
368
|
+
}, "ConnectedWalletsActionsTableCell");
|
369
|
+
|
370
|
+
// src/components/wallet/table/cells/ChainName.tsx
|
371
|
+
import { TableCell as TableCell3 } from "@mui/material";
|
372
|
+
import React8 from "react";
|
373
|
+
var ConnectedWalletsChainNameTableCell = /* @__PURE__ */ __name(({ chainName, tableCellProps }) => {
|
374
|
+
return /* @__PURE__ */ React8.createElement(TableCell3, tableCellProps, chainName);
|
375
|
+
}, "ConnectedWalletsChainNameTableCell");
|
376
|
+
|
377
|
+
// src/components/wallet/table/cells/State.tsx
|
378
|
+
import { Switch, TableCell as TableCell4 } from "@mui/material";
|
379
|
+
import React9, { useMemo as useMemo3 } from "react";
|
380
|
+
var ConnectedWalletState = /* @__PURE__ */ __name(({ connected, walletRdns, tableCellProps }) => {
|
381
|
+
const { disableWallet, enableWallet, wallets } = useEnabledWallets();
|
382
|
+
const enabled = useMemo3(() => walletRdns ? wallets[walletRdns].enabled : false, [
|
383
|
+
wallets,
|
384
|
+
walletRdns
|
385
|
+
]);
|
386
|
+
const handleClick = /* @__PURE__ */ __name((event) => {
|
387
|
+
const checked = event.target?.checked;
|
388
|
+
if (walletRdns) {
|
389
|
+
checked ? enableWallet?.(walletRdns) : disableWallet?.(walletRdns);
|
390
|
+
}
|
391
|
+
}, "handleClick");
|
392
|
+
return /* @__PURE__ */ React9.createElement(TableCell4, tableCellProps, /* @__PURE__ */ React9.createElement(Switch, {
|
393
|
+
disabled: !connected,
|
394
|
+
checked: connected && enabled,
|
395
|
+
onChange: handleClick
|
396
|
+
}));
|
397
|
+
}, "ConnectedWalletState");
|
398
|
+
|
399
|
+
// src/components/wallet/table/cells/Wallet.tsx
|
400
|
+
import { TableCell as TableCell5, useTheme } from "@mui/material";
|
401
|
+
import { ConstrainedImage as ConstrainedImage3 } from "@xylabs/react-crypto";
|
402
|
+
import { FlexRow as FlexRow4 } from "@xylabs/react-flexbox";
|
403
|
+
import React10 from "react";
|
404
|
+
var ConnectedWalletsWalletTableCell = /* @__PURE__ */ __name(({ icon, walletName, tableCellProps }) => {
|
405
|
+
const theme = useTheme();
|
406
|
+
return /* @__PURE__ */ React10.createElement(TableCell5, tableCellProps, /* @__PURE__ */ React10.createElement(FlexRow4, {
|
407
|
+
gap: 2,
|
408
|
+
justifyContent: "start"
|
409
|
+
}, /* @__PURE__ */ React10.createElement(ConstrainedImage3, {
|
410
|
+
constrainedValue: theme.spacing(4),
|
411
|
+
src: icon
|
412
|
+
}), walletName));
|
413
|
+
}, "ConnectedWalletsWalletTableCell");
|
414
|
+
|
415
|
+
// src/components/wallet/table/cells/Cells.tsx
|
416
|
+
var ConnectedWalletTableCells = [
|
417
|
+
ConnectedWalletsWalletTableCell,
|
418
|
+
ConnectedWalletsChainNameTableCell,
|
419
|
+
ConnectedWalletsAccountsTableCell,
|
420
|
+
ConnectedWalletsActionsTableCell,
|
421
|
+
ConnectedWalletState
|
422
|
+
];
|
423
|
+
|
424
|
+
// src/components/wallet/table/ConnectedWalletsTable.tsx
|
425
|
+
import { Table, TableBody, TableCell as TableCell6, TableHead, TableRow as TableRow2 } from "@mui/material";
|
426
|
+
import React12, { useState as useState3 } from "react";
|
427
|
+
|
428
|
+
// src/components/wallet/lib/TableHeadData.ts
|
429
|
+
var WalletsTableHeadCells = [
|
430
|
+
{
|
431
|
+
disablePadding: false,
|
432
|
+
id: "wallet",
|
433
|
+
label: "Wallet",
|
434
|
+
numeric: false,
|
435
|
+
showOnMobile: true
|
436
|
+
},
|
437
|
+
{
|
438
|
+
disablePadding: false,
|
439
|
+
id: "chain",
|
440
|
+
label: "Chain",
|
441
|
+
numeric: false,
|
442
|
+
showOnMobile: true
|
443
|
+
},
|
444
|
+
{
|
445
|
+
disablePadding: false,
|
446
|
+
id: "accounts",
|
447
|
+
label: "Accounts",
|
448
|
+
numeric: true,
|
449
|
+
showOnMobile: true
|
450
|
+
},
|
451
|
+
{
|
452
|
+
disablePadding: false,
|
453
|
+
id: "actions",
|
454
|
+
label: "Actions",
|
455
|
+
numeric: false,
|
456
|
+
showOnMobile: true
|
457
|
+
},
|
458
|
+
{
|
459
|
+
disablePadding: false,
|
460
|
+
id: "enabled",
|
461
|
+
label: "Enabled",
|
462
|
+
numeric: false,
|
463
|
+
showOnMobile: true
|
464
|
+
}
|
465
|
+
];
|
466
|
+
|
467
|
+
// src/components/wallet/table/ConnectedWalletsTableRow.tsx
|
468
|
+
import { TableRow } from "@mui/material";
|
469
|
+
import { useEthWallet } from "@xylabs/react-crypto";
|
470
|
+
import React11, { useCallback, useMemo as useMemo4 } from "react";
|
471
|
+
var WalletConnectionsTableRow = /* @__PURE__ */ __name(({ ignoreConnectDialog, onConnectClick, onRevoke, wallet, ...props }) => {
|
472
|
+
const { currentAccount: currentAccountFromWallet, additionalAccounts, chainName, connectWallet, providerInfo } = useEthWallet(wallet);
|
473
|
+
const currentAccount = currentAccountFromWallet?.toString() ? [
|
474
|
+
currentAccountFromWallet.toString()
|
475
|
+
] : [];
|
476
|
+
const totalAccounts = (additionalAccounts?.length ?? 0) + (currentAccount?.length ?? 0);
|
477
|
+
const connected = !!(currentAccount?.length ?? 0 > 0);
|
478
|
+
const { icon, name, rdns } = useMemo4(() => providerInfo ?? {
|
479
|
+
icon: void 0,
|
480
|
+
name: void 0,
|
481
|
+
rdns: void 0
|
482
|
+
}, [
|
483
|
+
providerInfo
|
484
|
+
]);
|
485
|
+
const activeProvider = useMemo4(() => ({
|
486
|
+
connectWallet,
|
487
|
+
icon,
|
488
|
+
providerName: name
|
489
|
+
}), [
|
490
|
+
connectWallet,
|
491
|
+
icon,
|
492
|
+
name
|
493
|
+
]);
|
494
|
+
const onRevokeLocal = useCallback(() => {
|
495
|
+
onRevoke?.(activeProvider);
|
496
|
+
}, [
|
497
|
+
activeProvider,
|
498
|
+
onRevoke
|
499
|
+
]);
|
500
|
+
const onConnectLocal = useCallback(async () => {
|
501
|
+
if (ignoreConnectDialog) {
|
502
|
+
await connectWallet?.();
|
503
|
+
} else {
|
504
|
+
onConnectClick?.(activeProvider);
|
505
|
+
}
|
506
|
+
}, [
|
507
|
+
activeProvider,
|
508
|
+
connectWallet,
|
509
|
+
ignoreConnectDialog,
|
510
|
+
onConnectClick
|
511
|
+
]);
|
512
|
+
return /* @__PURE__ */ React11.createElement(TableRow, props, Object.values(ConnectedWalletTableCells).map((Cell, index) => /* @__PURE__ */ React11.createElement(Cell, {
|
513
|
+
key: index,
|
514
|
+
additionalAccounts,
|
515
|
+
chainName,
|
516
|
+
connected,
|
517
|
+
currentAccount,
|
518
|
+
icon,
|
519
|
+
onConnect: onConnectLocal,
|
520
|
+
onRevoke: onRevokeLocal,
|
521
|
+
totalAccounts,
|
522
|
+
walletName: name,
|
523
|
+
walletRdns: rdns
|
524
|
+
})));
|
525
|
+
}, "WalletConnectionsTableRow");
|
526
|
+
|
527
|
+
// src/components/wallet/table/hooks/useActiveProviderDialogState.tsx
|
528
|
+
import { useState as useState2 } from "react";
|
529
|
+
var useActiveProviderDialogState = /* @__PURE__ */ __name((setActiveProvider) => {
|
530
|
+
const [show, setShow] = useState2(false);
|
531
|
+
const onSetActiveProvider = /* @__PURE__ */ __name((activeProvider) => {
|
532
|
+
setShow(true);
|
533
|
+
setActiveProvider(activeProvider);
|
534
|
+
}, "onSetActiveProvider");
|
535
|
+
const onClose = /* @__PURE__ */ __name(() => {
|
536
|
+
setShow(false);
|
537
|
+
setActiveProvider({});
|
538
|
+
}, "onClose");
|
539
|
+
return [
|
540
|
+
show,
|
541
|
+
onSetActiveProvider,
|
542
|
+
onClose
|
543
|
+
];
|
544
|
+
}, "useActiveProviderDialogState");
|
545
|
+
|
546
|
+
// src/components/wallet/table/ConnectedWalletsTable.tsx
|
547
|
+
var ConnectedWalletsTable = /* @__PURE__ */ __name(({ ignoreConnectDialog, onIgnoreConnectDialog, wallets, ...props }) => {
|
548
|
+
const [activeProvider, setActiveProvider] = useState3();
|
549
|
+
const [showConnect, onSetActiveProviderConnect, onConnectClose] = useActiveProviderDialogState(setActiveProvider);
|
550
|
+
const [showRevoke, onSetActiveProviderRevoke, onRevokeClose] = useActiveProviderDialogState(setActiveProvider);
|
551
|
+
return /* @__PURE__ */ React12.createElement(React12.Fragment, null, /* @__PURE__ */ React12.createElement(Table, props, /* @__PURE__ */ React12.createElement(TableHead, null, /* @__PURE__ */ React12.createElement(TableRow2, null, WalletsTableHeadCells.map(({ disablePadding, id, label, align, width }) => /* @__PURE__ */ React12.createElement(TableCell6, {
|
552
|
+
align,
|
553
|
+
key: id,
|
554
|
+
padding: disablePadding ? "none" : "normal",
|
555
|
+
width: width ?? "auto"
|
556
|
+
}, label)))), /* @__PURE__ */ React12.createElement(TableBody, null, (wallets ?? []).map((wallet) => /* @__PURE__ */ React12.createElement(WalletConnectionsTableRow, {
|
557
|
+
ignoreConnectDialog,
|
558
|
+
key: wallet.providerInfo?.rdns,
|
559
|
+
onConnectClick: onSetActiveProviderConnect,
|
560
|
+
onRevoke: onSetActiveProviderRevoke,
|
561
|
+
wallet
|
562
|
+
})))), /* @__PURE__ */ React12.createElement(RevokeWalletConnectionDialog, {
|
563
|
+
open: showRevoke,
|
564
|
+
onClose: onRevokeClose,
|
565
|
+
activeProvider
|
566
|
+
}), /* @__PURE__ */ React12.createElement(ConnectWalletDialog, {
|
567
|
+
activeProvider,
|
568
|
+
onClose: onConnectClose,
|
569
|
+
open: showConnect,
|
570
|
+
onIgnoreConnectDialog
|
571
|
+
}));
|
572
|
+
}, "ConnectedWalletsTable");
|
573
|
+
|
574
|
+
// src/components/ConnectedAccountsFlexbox.tsx
|
575
|
+
var ConnectedAccountsFlexbox = /* @__PURE__ */ forwardRef(({ ignoreConnectDialog, onIgnoreConnectDialog, ...props }, ref) => {
|
576
|
+
const theme = useTheme2();
|
577
|
+
const { totalConnectedAccounts, sortedWallets } = useDetectedWallets();
|
578
|
+
return /* @__PURE__ */ React13.createElement(FlexCol3, {
|
579
|
+
alignItems: "stretch",
|
580
|
+
justifyContent: "start",
|
581
|
+
gap: 2,
|
582
|
+
ref,
|
583
|
+
...props
|
584
|
+
}, /* @__PURE__ */ React13.createElement(FlexCol3, {
|
585
|
+
alignItems: "start"
|
586
|
+
}, /* @__PURE__ */ React13.createElement(Typography6, {
|
587
|
+
variant: "h2",
|
588
|
+
sx: {
|
589
|
+
mb: 0.5
|
590
|
+
}
|
591
|
+
}, "Detected Web3 Wallets"), totalConnectedAccounts ? /* @__PURE__ */ React13.createElement(Typography6, {
|
592
|
+
variant: "subtitle1",
|
593
|
+
color: theme.palette.secondary.main,
|
594
|
+
sx: {
|
595
|
+
opacity: 0.5
|
596
|
+
}
|
597
|
+
}, "Total Connected Accounts:", " ", totalConnectedAccounts) : null), /* @__PURE__ */ React13.createElement(ConnectedWalletsTable, {
|
598
|
+
wallets: sortedWallets,
|
599
|
+
ignoreConnectDialog,
|
600
|
+
onIgnoreConnectDialog
|
601
|
+
}));
|
602
|
+
});
|
603
|
+
ConnectedAccountsFlexbox.displayName = "ConnectedAccountsFlexbox";
|
604
|
+
export {
|
605
|
+
CheckboxFormControl,
|
606
|
+
ConnectWalletDialog,
|
607
|
+
ConnectedAccountsFlexbox,
|
608
|
+
ConnectedWalletState,
|
609
|
+
ConnectedWalletTableCells,
|
610
|
+
ConnectedWalletsAccountsTableCell,
|
611
|
+
ConnectedWalletsActionsTableCell,
|
612
|
+
ConnectedWalletsChainNameTableCell,
|
613
|
+
ConnectedWalletsTable,
|
614
|
+
ConnectedWalletsWalletTableCell,
|
615
|
+
EnabledEthWalletConnections,
|
616
|
+
RevokeWalletConnectionDialog,
|
617
|
+
WalletConnectionsTableRow,
|
618
|
+
useActiveProviderDialogState,
|
619
|
+
useDetectedWallets,
|
620
|
+
useEnabledWallets,
|
621
|
+
useEnabledWalletsInner
|
622
|
+
};
|
623
|
+
//# sourceMappingURL=index.mjs.map
|