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