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