@xyo-network/react-connected-accounts 2.66.3 → 2.66.4
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/browser/classes/EnabledWallets.d.cts +39 -0
- package/dist/browser/classes/EnabledWallets.d.cts.map +1 -0
- package/dist/browser/classes/EnabledWallets.d.mts +39 -0
- package/dist/browser/classes/EnabledWallets.d.mts.map +1 -0
- package/dist/browser/classes/EnabledWallets.d.ts +39 -0
- package/dist/browser/classes/EnabledWallets.d.ts.map +1 -0
- package/dist/browser/classes/index.d.cts +2 -0
- package/dist/browser/classes/index.d.cts.map +1 -0
- package/dist/browser/classes/index.d.mts +2 -0
- package/dist/browser/classes/index.d.mts.map +1 -0
- package/dist/browser/classes/index.d.ts +2 -0
- package/dist/browser/classes/index.d.ts.map +1 -0
- package/dist/browser/components/ConnectedAccountsFlexbox.d.cts +5 -1
- package/dist/browser/components/ConnectedAccountsFlexbox.d.cts.map +1 -1
- package/dist/browser/components/ConnectedAccountsFlexbox.d.mts +5 -1
- package/dist/browser/components/ConnectedAccountsFlexbox.d.mts.map +1 -1
- package/dist/browser/components/ConnectedAccountsFlexbox.d.ts +5 -1
- package/dist/browser/components/ConnectedAccountsFlexbox.d.ts.map +1 -1
- package/dist/browser/components/wallet/dialogs/connect/CheckboxFormControl.d.cts +7 -0
- package/dist/browser/components/wallet/dialogs/connect/CheckboxFormControl.d.cts.map +1 -0
- package/dist/browser/components/wallet/dialogs/connect/CheckboxFormControl.d.mts +7 -0
- package/dist/browser/components/wallet/dialogs/connect/CheckboxFormControl.d.mts.map +1 -0
- package/dist/browser/components/wallet/dialogs/connect/CheckboxFormControl.d.ts +7 -0
- package/dist/browser/components/wallet/dialogs/connect/CheckboxFormControl.d.ts.map +1 -0
- package/dist/browser/components/wallet/dialogs/connect/Dialog.d.cts +9 -0
- package/dist/browser/components/wallet/dialogs/connect/Dialog.d.cts.map +1 -0
- package/dist/browser/components/wallet/dialogs/connect/Dialog.d.mts +9 -0
- package/dist/browser/components/wallet/dialogs/connect/Dialog.d.mts.map +1 -0
- package/dist/browser/components/wallet/dialogs/connect/Dialog.d.ts +9 -0
- package/dist/browser/components/wallet/dialogs/connect/Dialog.d.ts.map +1 -0
- package/dist/browser/components/wallet/dialogs/connect/LinkedProvidersFlexbox.d.cts +8 -0
- package/dist/browser/components/wallet/dialogs/connect/LinkedProvidersFlexbox.d.cts.map +1 -0
- package/dist/browser/components/wallet/dialogs/connect/LinkedProvidersFlexbox.d.mts +8 -0
- package/dist/browser/components/wallet/dialogs/connect/LinkedProvidersFlexbox.d.mts.map +1 -0
- package/dist/browser/components/wallet/dialogs/connect/LinkedProvidersFlexbox.d.ts +8 -0
- package/dist/browser/components/wallet/dialogs/connect/LinkedProvidersFlexbox.d.ts.map +1 -0
- package/dist/browser/components/wallet/dialogs/connect/Permissions.d.cts +6 -0
- package/dist/browser/components/wallet/dialogs/connect/Permissions.d.cts.map +1 -0
- package/dist/browser/components/wallet/dialogs/connect/Permissions.d.mts +6 -0
- package/dist/browser/components/wallet/dialogs/connect/Permissions.d.mts.map +1 -0
- package/dist/browser/components/wallet/dialogs/connect/Permissions.d.ts +6 -0
- package/dist/browser/components/wallet/dialogs/connect/Permissions.d.ts.map +1 -0
- package/dist/browser/components/wallet/dialogs/connect/index.d.cts +3 -0
- package/dist/browser/components/wallet/dialogs/connect/index.d.cts.map +1 -0
- package/dist/browser/components/wallet/dialogs/connect/index.d.mts +3 -0
- package/dist/browser/components/wallet/dialogs/connect/index.d.mts.map +1 -0
- package/dist/browser/components/wallet/dialogs/connect/index.d.ts +3 -0
- package/dist/browser/components/wallet/dialogs/connect/index.d.ts.map +1 -0
- package/dist/browser/components/wallet/dialogs/index.d.cts +3 -0
- package/dist/browser/components/wallet/dialogs/index.d.cts.map +1 -0
- package/dist/browser/components/wallet/dialogs/index.d.mts +3 -0
- package/dist/browser/components/wallet/dialogs/index.d.mts.map +1 -0
- package/dist/browser/components/wallet/dialogs/index.d.ts +3 -0
- package/dist/browser/components/wallet/dialogs/index.d.ts.map +1 -0
- package/dist/browser/components/wallet/dialogs/revoke/Dialog.d.cts +8 -0
- package/dist/browser/components/wallet/dialogs/revoke/Dialog.d.cts.map +1 -0
- package/dist/browser/components/wallet/dialogs/revoke/Dialog.d.mts +8 -0
- package/dist/browser/components/wallet/dialogs/revoke/Dialog.d.mts.map +1 -0
- package/dist/browser/components/wallet/dialogs/revoke/Dialog.d.ts +8 -0
- package/dist/browser/components/wallet/dialogs/revoke/Dialog.d.ts.map +1 -0
- package/dist/browser/components/wallet/dialogs/revoke/index.d.cts +2 -0
- package/dist/browser/components/wallet/dialogs/revoke/index.d.cts.map +1 -0
- package/dist/browser/components/wallet/dialogs/revoke/index.d.mts +2 -0
- package/dist/browser/components/wallet/dialogs/revoke/index.d.mts.map +1 -0
- package/dist/browser/components/wallet/dialogs/revoke/index.d.ts +2 -0
- package/dist/browser/components/wallet/dialogs/revoke/index.d.ts.map +1 -0
- package/dist/browser/components/wallet/index.d.cts +1 -0
- package/dist/browser/components/wallet/index.d.cts.map +1 -1
- package/dist/browser/components/wallet/index.d.mts +1 -0
- package/dist/browser/components/wallet/index.d.mts.map +1 -1
- package/dist/browser/components/wallet/index.d.ts +1 -0
- package/dist/browser/components/wallet/index.d.ts.map +1 -1
- package/dist/browser/components/wallet/lib/ActiveProvider.d.cts +7 -0
- package/dist/browser/components/wallet/lib/ActiveProvider.d.cts.map +1 -0
- package/dist/browser/components/wallet/lib/ActiveProvider.d.mts +7 -0
- package/dist/browser/components/wallet/lib/ActiveProvider.d.mts.map +1 -0
- package/dist/browser/components/wallet/lib/ActiveProvider.d.ts +7 -0
- package/dist/browser/components/wallet/lib/ActiveProvider.d.ts.map +1 -0
- package/dist/browser/components/wallet/lib/TableHeadData.d.cts.map +1 -1
- package/dist/browser/components/wallet/lib/TableHeadData.d.mts.map +1 -1
- package/dist/browser/components/wallet/lib/TableHeadData.d.ts.map +1 -1
- package/dist/browser/components/wallet/lib/index.d.cts +1 -0
- package/dist/browser/components/wallet/lib/index.d.cts.map +1 -1
- package/dist/browser/components/wallet/lib/index.d.mts +1 -0
- package/dist/browser/components/wallet/lib/index.d.mts.map +1 -1
- package/dist/browser/components/wallet/lib/index.d.ts +1 -0
- package/dist/browser/components/wallet/lib/index.d.ts.map +1 -1
- package/dist/browser/components/wallet/table/ConnectedWalletsTable.d.cts +2 -0
- package/dist/browser/components/wallet/table/ConnectedWalletsTable.d.cts.map +1 -1
- package/dist/browser/components/wallet/table/ConnectedWalletsTable.d.mts +2 -0
- package/dist/browser/components/wallet/table/ConnectedWalletsTable.d.mts.map +1 -1
- package/dist/browser/components/wallet/table/ConnectedWalletsTable.d.ts +2 -0
- package/dist/browser/components/wallet/table/ConnectedWalletsTable.d.ts.map +1 -1
- package/dist/browser/components/wallet/table/ConnectedWalletsTableRow.d.cts +6 -10
- package/dist/browser/components/wallet/table/ConnectedWalletsTableRow.d.cts.map +1 -1
- package/dist/browser/components/wallet/table/ConnectedWalletsTableRow.d.mts +6 -10
- package/dist/browser/components/wallet/table/ConnectedWalletsTableRow.d.mts.map +1 -1
- package/dist/browser/components/wallet/table/ConnectedWalletsTableRow.d.ts +6 -10
- package/dist/browser/components/wallet/table/ConnectedWalletsTableRow.d.ts.map +1 -1
- package/dist/browser/components/wallet/table/cells/Accounts.d.cts +4 -0
- package/dist/browser/components/wallet/table/cells/Accounts.d.cts.map +1 -0
- package/dist/browser/components/wallet/table/cells/Accounts.d.mts +4 -0
- package/dist/browser/components/wallet/table/cells/Accounts.d.mts.map +1 -0
- package/dist/browser/components/wallet/table/cells/Accounts.d.ts +4 -0
- package/dist/browser/components/wallet/table/cells/Accounts.d.ts.map +1 -0
- package/dist/browser/components/wallet/table/cells/Actions.d.cts +4 -0
- package/dist/browser/components/wallet/table/cells/Actions.d.cts.map +1 -0
- package/dist/browser/components/wallet/table/cells/Actions.d.mts +4 -0
- package/dist/browser/components/wallet/table/cells/Actions.d.mts.map +1 -0
- package/dist/browser/components/wallet/table/cells/Actions.d.ts +4 -0
- package/dist/browser/components/wallet/table/cells/Actions.d.ts.map +1 -0
- package/dist/browser/components/wallet/table/cells/Cells.d.cts +4 -0
- package/dist/browser/components/wallet/table/cells/Cells.d.cts.map +1 -0
- package/dist/browser/components/wallet/table/cells/Cells.d.mts +4 -0
- package/dist/browser/components/wallet/table/cells/Cells.d.mts.map +1 -0
- package/dist/browser/components/wallet/table/cells/Cells.d.ts +4 -0
- package/dist/browser/components/wallet/table/cells/Cells.d.ts.map +1 -0
- package/dist/browser/components/wallet/table/cells/ChainName.d.cts +4 -0
- package/dist/browser/components/wallet/table/cells/ChainName.d.cts.map +1 -0
- package/dist/browser/components/wallet/table/cells/ChainName.d.mts +4 -0
- package/dist/browser/components/wallet/table/cells/ChainName.d.mts.map +1 -0
- package/dist/browser/components/wallet/table/cells/ChainName.d.ts +4 -0
- package/dist/browser/components/wallet/table/cells/ChainName.d.ts.map +1 -0
- package/dist/browser/components/wallet/table/cells/State.d.cts +4 -0
- package/dist/browser/components/wallet/table/cells/State.d.cts.map +1 -0
- package/dist/browser/components/wallet/table/cells/State.d.mts +4 -0
- package/dist/browser/components/wallet/table/cells/State.d.mts.map +1 -0
- package/dist/browser/components/wallet/table/cells/State.d.ts +4 -0
- package/dist/browser/components/wallet/table/cells/State.d.ts.map +1 -0
- package/dist/browser/components/wallet/table/cells/Wallet.d.cts +4 -0
- package/dist/browser/components/wallet/table/cells/Wallet.d.cts.map +1 -0
- package/dist/browser/components/wallet/table/cells/Wallet.d.mts +4 -0
- package/dist/browser/components/wallet/table/cells/Wallet.d.mts.map +1 -0
- package/dist/browser/components/wallet/table/cells/Wallet.d.ts +4 -0
- package/dist/browser/components/wallet/table/cells/Wallet.d.ts.map +1 -0
- package/dist/browser/components/wallet/table/cells/index.d.cts +7 -0
- package/dist/browser/components/wallet/table/cells/index.d.cts.map +1 -0
- package/dist/browser/components/wallet/table/cells/index.d.mts +7 -0
- package/dist/browser/components/wallet/table/cells/index.d.mts.map +1 -0
- package/dist/browser/components/wallet/table/cells/index.d.ts +7 -0
- package/dist/browser/components/wallet/table/cells/index.d.ts.map +1 -0
- package/dist/browser/components/wallet/table/cells/lib/ConnectedWalletTableCellProps.d.cts +15 -0
- package/dist/browser/components/wallet/table/cells/lib/ConnectedWalletTableCellProps.d.cts.map +1 -0
- package/dist/browser/components/wallet/table/cells/lib/ConnectedWalletTableCellProps.d.mts +15 -0
- package/dist/browser/components/wallet/table/cells/lib/ConnectedWalletTableCellProps.d.mts.map +1 -0
- package/dist/browser/components/wallet/table/cells/lib/ConnectedWalletTableCellProps.d.ts +15 -0
- package/dist/browser/components/wallet/table/cells/lib/ConnectedWalletTableCellProps.d.ts.map +1 -0
- package/dist/browser/components/wallet/table/cells/lib/index.d.cts +2 -0
- package/dist/browser/components/wallet/table/cells/lib/index.d.cts.map +1 -0
- package/dist/browser/components/wallet/table/cells/lib/index.d.mts +2 -0
- package/dist/browser/components/wallet/table/cells/lib/index.d.mts.map +1 -0
- package/dist/browser/components/wallet/table/cells/lib/index.d.ts +2 -0
- package/dist/browser/components/wallet/table/cells/lib/index.d.ts.map +1 -0
- package/dist/browser/components/wallet/table/hooks/index.d.cts +2 -0
- package/dist/browser/components/wallet/table/hooks/index.d.cts.map +1 -0
- package/dist/browser/components/wallet/table/hooks/index.d.mts +2 -0
- package/dist/browser/components/wallet/table/hooks/index.d.mts.map +1 -0
- package/dist/browser/components/wallet/table/hooks/index.d.ts +2 -0
- package/dist/browser/components/wallet/table/hooks/index.d.ts.map +1 -0
- package/dist/browser/components/wallet/table/hooks/useActiveProviderDialogState.d.cts +4 -0
- package/dist/browser/components/wallet/table/hooks/useActiveProviderDialogState.d.cts.map +1 -0
- package/dist/browser/components/wallet/table/hooks/useActiveProviderDialogState.d.mts +4 -0
- package/dist/browser/components/wallet/table/hooks/useActiveProviderDialogState.d.mts.map +1 -0
- package/dist/browser/components/wallet/table/hooks/useActiveProviderDialogState.d.ts +4 -0
- package/dist/browser/components/wallet/table/hooks/useActiveProviderDialogState.d.ts.map +1 -0
- package/dist/browser/components/wallet/table/index.d.cts +2 -0
- package/dist/browser/components/wallet/table/index.d.cts.map +1 -1
- package/dist/browser/components/wallet/table/index.d.mts +2 -0
- package/dist/browser/components/wallet/table/index.d.mts.map +1 -1
- package/dist/browser/components/wallet/table/index.d.ts +2 -0
- package/dist/browser/components/wallet/table/index.d.ts.map +1 -1
- package/dist/browser/hooks/index.d.cts +1 -0
- package/dist/browser/hooks/index.d.cts.map +1 -1
- package/dist/browser/hooks/index.d.mts +1 -0
- package/dist/browser/hooks/index.d.mts.map +1 -1
- package/dist/browser/hooks/index.d.ts +1 -0
- package/dist/browser/hooks/index.d.ts.map +1 -1
- package/dist/browser/hooks/useEnabledWallets.d.cts +15 -0
- package/dist/browser/hooks/useEnabledWallets.d.cts.map +1 -0
- package/dist/browser/hooks/useEnabledWallets.d.mts +15 -0
- package/dist/browser/hooks/useEnabledWallets.d.mts.map +1 -0
- package/dist/browser/hooks/useEnabledWallets.d.ts +15 -0
- package/dist/browser/hooks/useEnabledWallets.d.ts.map +1 -0
- package/dist/browser/img/index.d.cts +4 -0
- package/dist/browser/img/index.d.cts.map +1 -0
- package/dist/browser/img/index.d.mts +4 -0
- package/dist/browser/img/index.d.mts.map +1 -0
- package/dist/browser/img/index.d.ts +4 -0
- package/dist/browser/img/index.d.ts.map +1 -0
- package/dist/browser/index.cjs +462 -79
- package/dist/browser/index.cjs.map +1 -1
- package/dist/browser/index.d.cts +1 -0
- package/dist/browser/index.d.cts.map +1 -1
- package/dist/browser/index.d.mts +1 -0
- package/dist/browser/index.d.mts.map +1 -1
- package/dist/browser/index.d.ts +1 -0
- package/dist/browser/index.d.ts.map +1 -1
- package/dist/browser/index.js +452 -79
- package/dist/browser/index.js.map +1 -1
- package/dist/browser/xyo-color-logo-LHR2SMEM.svg +1 -0
- package/dist/browser/xyo-color-logo-text-only-QPAW5BSQ.svg +1 -0
- package/dist/node/classes/EnabledWallets.d.cts +39 -0
- package/dist/node/classes/EnabledWallets.d.cts.map +1 -0
- package/dist/node/classes/EnabledWallets.d.mts +39 -0
- package/dist/node/classes/EnabledWallets.d.mts.map +1 -0
- package/dist/node/classes/EnabledWallets.d.ts +39 -0
- package/dist/node/classes/EnabledWallets.d.ts.map +1 -0
- package/dist/node/classes/index.d.cts +2 -0
- package/dist/node/classes/index.d.cts.map +1 -0
- package/dist/node/classes/index.d.mts +2 -0
- package/dist/node/classes/index.d.mts.map +1 -0
- package/dist/node/classes/index.d.ts +2 -0
- package/dist/node/classes/index.d.ts.map +1 -0
- package/dist/node/components/ConnectedAccountsFlexbox.d.cts +5 -1
- package/dist/node/components/ConnectedAccountsFlexbox.d.cts.map +1 -1
- package/dist/node/components/ConnectedAccountsFlexbox.d.mts +5 -1
- package/dist/node/components/ConnectedAccountsFlexbox.d.mts.map +1 -1
- package/dist/node/components/ConnectedAccountsFlexbox.d.ts +5 -1
- package/dist/node/components/ConnectedAccountsFlexbox.d.ts.map +1 -1
- package/dist/node/components/wallet/dialogs/connect/CheckboxFormControl.d.cts +7 -0
- package/dist/node/components/wallet/dialogs/connect/CheckboxFormControl.d.cts.map +1 -0
- package/dist/node/components/wallet/dialogs/connect/CheckboxFormControl.d.mts +7 -0
- package/dist/node/components/wallet/dialogs/connect/CheckboxFormControl.d.mts.map +1 -0
- package/dist/node/components/wallet/dialogs/connect/CheckboxFormControl.d.ts +7 -0
- package/dist/node/components/wallet/dialogs/connect/CheckboxFormControl.d.ts.map +1 -0
- package/dist/node/components/wallet/dialogs/connect/Dialog.d.cts +9 -0
- package/dist/node/components/wallet/dialogs/connect/Dialog.d.cts.map +1 -0
- package/dist/node/components/wallet/dialogs/connect/Dialog.d.mts +9 -0
- package/dist/node/components/wallet/dialogs/connect/Dialog.d.mts.map +1 -0
- package/dist/node/components/wallet/dialogs/connect/Dialog.d.ts +9 -0
- package/dist/node/components/wallet/dialogs/connect/Dialog.d.ts.map +1 -0
- package/dist/node/components/wallet/dialogs/connect/LinkedProvidersFlexbox.d.cts +8 -0
- package/dist/node/components/wallet/dialogs/connect/LinkedProvidersFlexbox.d.cts.map +1 -0
- package/dist/node/components/wallet/dialogs/connect/LinkedProvidersFlexbox.d.mts +8 -0
- package/dist/node/components/wallet/dialogs/connect/LinkedProvidersFlexbox.d.mts.map +1 -0
- package/dist/node/components/wallet/dialogs/connect/LinkedProvidersFlexbox.d.ts +8 -0
- package/dist/node/components/wallet/dialogs/connect/LinkedProvidersFlexbox.d.ts.map +1 -0
- package/dist/node/components/wallet/dialogs/connect/Permissions.d.cts +6 -0
- package/dist/node/components/wallet/dialogs/connect/Permissions.d.cts.map +1 -0
- package/dist/node/components/wallet/dialogs/connect/Permissions.d.mts +6 -0
- package/dist/node/components/wallet/dialogs/connect/Permissions.d.mts.map +1 -0
- package/dist/node/components/wallet/dialogs/connect/Permissions.d.ts +6 -0
- package/dist/node/components/wallet/dialogs/connect/Permissions.d.ts.map +1 -0
- package/dist/node/components/wallet/dialogs/connect/index.d.cts +3 -0
- package/dist/node/components/wallet/dialogs/connect/index.d.cts.map +1 -0
- package/dist/node/components/wallet/dialogs/connect/index.d.mts +3 -0
- package/dist/node/components/wallet/dialogs/connect/index.d.mts.map +1 -0
- package/dist/node/components/wallet/dialogs/connect/index.d.ts +3 -0
- package/dist/node/components/wallet/dialogs/connect/index.d.ts.map +1 -0
- package/dist/node/components/wallet/dialogs/index.d.cts +3 -0
- package/dist/node/components/wallet/dialogs/index.d.cts.map +1 -0
- package/dist/node/components/wallet/dialogs/index.d.mts +3 -0
- package/dist/node/components/wallet/dialogs/index.d.mts.map +1 -0
- package/dist/node/components/wallet/dialogs/index.d.ts +3 -0
- package/dist/node/components/wallet/dialogs/index.d.ts.map +1 -0
- package/dist/node/components/wallet/dialogs/revoke/Dialog.d.cts +8 -0
- package/dist/node/components/wallet/dialogs/revoke/Dialog.d.cts.map +1 -0
- package/dist/node/components/wallet/dialogs/revoke/Dialog.d.mts +8 -0
- package/dist/node/components/wallet/dialogs/revoke/Dialog.d.mts.map +1 -0
- package/dist/node/components/wallet/dialogs/revoke/Dialog.d.ts +8 -0
- package/dist/node/components/wallet/dialogs/revoke/Dialog.d.ts.map +1 -0
- package/dist/node/components/wallet/dialogs/revoke/index.d.cts +2 -0
- package/dist/node/components/wallet/dialogs/revoke/index.d.cts.map +1 -0
- package/dist/node/components/wallet/dialogs/revoke/index.d.mts +2 -0
- package/dist/node/components/wallet/dialogs/revoke/index.d.mts.map +1 -0
- package/dist/node/components/wallet/dialogs/revoke/index.d.ts +2 -0
- package/dist/node/components/wallet/dialogs/revoke/index.d.ts.map +1 -0
- package/dist/node/components/wallet/index.d.cts +1 -0
- package/dist/node/components/wallet/index.d.cts.map +1 -1
- package/dist/node/components/wallet/index.d.mts +1 -0
- package/dist/node/components/wallet/index.d.mts.map +1 -1
- package/dist/node/components/wallet/index.d.ts +1 -0
- package/dist/node/components/wallet/index.d.ts.map +1 -1
- package/dist/node/components/wallet/lib/ActiveProvider.d.cts +7 -0
- package/dist/node/components/wallet/lib/ActiveProvider.d.cts.map +1 -0
- package/dist/node/components/wallet/lib/ActiveProvider.d.mts +7 -0
- package/dist/node/components/wallet/lib/ActiveProvider.d.mts.map +1 -0
- package/dist/node/components/wallet/lib/ActiveProvider.d.ts +7 -0
- package/dist/node/components/wallet/lib/ActiveProvider.d.ts.map +1 -0
- package/dist/node/components/wallet/lib/TableHeadData.d.cts.map +1 -1
- package/dist/node/components/wallet/lib/TableHeadData.d.mts.map +1 -1
- package/dist/node/components/wallet/lib/TableHeadData.d.ts.map +1 -1
- package/dist/node/components/wallet/lib/index.d.cts +1 -0
- package/dist/node/components/wallet/lib/index.d.cts.map +1 -1
- package/dist/node/components/wallet/lib/index.d.mts +1 -0
- package/dist/node/components/wallet/lib/index.d.mts.map +1 -1
- package/dist/node/components/wallet/lib/index.d.ts +1 -0
- package/dist/node/components/wallet/lib/index.d.ts.map +1 -1
- package/dist/node/components/wallet/table/ConnectedWalletsTable.d.cts +2 -0
- package/dist/node/components/wallet/table/ConnectedWalletsTable.d.cts.map +1 -1
- package/dist/node/components/wallet/table/ConnectedWalletsTable.d.mts +2 -0
- package/dist/node/components/wallet/table/ConnectedWalletsTable.d.mts.map +1 -1
- package/dist/node/components/wallet/table/ConnectedWalletsTable.d.ts +2 -0
- package/dist/node/components/wallet/table/ConnectedWalletsTable.d.ts.map +1 -1
- package/dist/node/components/wallet/table/ConnectedWalletsTableRow.d.cts +6 -10
- package/dist/node/components/wallet/table/ConnectedWalletsTableRow.d.cts.map +1 -1
- package/dist/node/components/wallet/table/ConnectedWalletsTableRow.d.mts +6 -10
- package/dist/node/components/wallet/table/ConnectedWalletsTableRow.d.mts.map +1 -1
- package/dist/node/components/wallet/table/ConnectedWalletsTableRow.d.ts +6 -10
- package/dist/node/components/wallet/table/ConnectedWalletsTableRow.d.ts.map +1 -1
- package/dist/node/components/wallet/table/cells/Accounts.d.cts +4 -0
- package/dist/node/components/wallet/table/cells/Accounts.d.cts.map +1 -0
- package/dist/node/components/wallet/table/cells/Accounts.d.mts +4 -0
- package/dist/node/components/wallet/table/cells/Accounts.d.mts.map +1 -0
- package/dist/node/components/wallet/table/cells/Accounts.d.ts +4 -0
- package/dist/node/components/wallet/table/cells/Accounts.d.ts.map +1 -0
- package/dist/node/components/wallet/table/cells/Actions.d.cts +4 -0
- package/dist/node/components/wallet/table/cells/Actions.d.cts.map +1 -0
- package/dist/node/components/wallet/table/cells/Actions.d.mts +4 -0
- package/dist/node/components/wallet/table/cells/Actions.d.mts.map +1 -0
- package/dist/node/components/wallet/table/cells/Actions.d.ts +4 -0
- package/dist/node/components/wallet/table/cells/Actions.d.ts.map +1 -0
- package/dist/node/components/wallet/table/cells/Cells.d.cts +4 -0
- package/dist/node/components/wallet/table/cells/Cells.d.cts.map +1 -0
- package/dist/node/components/wallet/table/cells/Cells.d.mts +4 -0
- package/dist/node/components/wallet/table/cells/Cells.d.mts.map +1 -0
- package/dist/node/components/wallet/table/cells/Cells.d.ts +4 -0
- package/dist/node/components/wallet/table/cells/Cells.d.ts.map +1 -0
- package/dist/node/components/wallet/table/cells/ChainName.d.cts +4 -0
- package/dist/node/components/wallet/table/cells/ChainName.d.cts.map +1 -0
- package/dist/node/components/wallet/table/cells/ChainName.d.mts +4 -0
- package/dist/node/components/wallet/table/cells/ChainName.d.mts.map +1 -0
- package/dist/node/components/wallet/table/cells/ChainName.d.ts +4 -0
- package/dist/node/components/wallet/table/cells/ChainName.d.ts.map +1 -0
- package/dist/node/components/wallet/table/cells/State.d.cts +4 -0
- package/dist/node/components/wallet/table/cells/State.d.cts.map +1 -0
- package/dist/node/components/wallet/table/cells/State.d.mts +4 -0
- package/dist/node/components/wallet/table/cells/State.d.mts.map +1 -0
- package/dist/node/components/wallet/table/cells/State.d.ts +4 -0
- package/dist/node/components/wallet/table/cells/State.d.ts.map +1 -0
- package/dist/node/components/wallet/table/cells/Wallet.d.cts +4 -0
- package/dist/node/components/wallet/table/cells/Wallet.d.cts.map +1 -0
- package/dist/node/components/wallet/table/cells/Wallet.d.mts +4 -0
- package/dist/node/components/wallet/table/cells/Wallet.d.mts.map +1 -0
- package/dist/node/components/wallet/table/cells/Wallet.d.ts +4 -0
- package/dist/node/components/wallet/table/cells/Wallet.d.ts.map +1 -0
- package/dist/node/components/wallet/table/cells/index.d.cts +7 -0
- package/dist/node/components/wallet/table/cells/index.d.cts.map +1 -0
- package/dist/node/components/wallet/table/cells/index.d.mts +7 -0
- package/dist/node/components/wallet/table/cells/index.d.mts.map +1 -0
- package/dist/node/components/wallet/table/cells/index.d.ts +7 -0
- package/dist/node/components/wallet/table/cells/index.d.ts.map +1 -0
- package/dist/node/components/wallet/table/cells/lib/ConnectedWalletTableCellProps.d.cts +15 -0
- package/dist/node/components/wallet/table/cells/lib/ConnectedWalletTableCellProps.d.cts.map +1 -0
- package/dist/node/components/wallet/table/cells/lib/ConnectedWalletTableCellProps.d.mts +15 -0
- package/dist/node/components/wallet/table/cells/lib/ConnectedWalletTableCellProps.d.mts.map +1 -0
- package/dist/node/components/wallet/table/cells/lib/ConnectedWalletTableCellProps.d.ts +15 -0
- package/dist/node/components/wallet/table/cells/lib/ConnectedWalletTableCellProps.d.ts.map +1 -0
- package/dist/node/components/wallet/table/cells/lib/index.d.cts +2 -0
- package/dist/node/components/wallet/table/cells/lib/index.d.cts.map +1 -0
- package/dist/node/components/wallet/table/cells/lib/index.d.mts +2 -0
- package/dist/node/components/wallet/table/cells/lib/index.d.mts.map +1 -0
- package/dist/node/components/wallet/table/cells/lib/index.d.ts +2 -0
- package/dist/node/components/wallet/table/cells/lib/index.d.ts.map +1 -0
- package/dist/node/components/wallet/table/hooks/index.d.cts +2 -0
- package/dist/node/components/wallet/table/hooks/index.d.cts.map +1 -0
- package/dist/node/components/wallet/table/hooks/index.d.mts +2 -0
- package/dist/node/components/wallet/table/hooks/index.d.mts.map +1 -0
- package/dist/node/components/wallet/table/hooks/index.d.ts +2 -0
- package/dist/node/components/wallet/table/hooks/index.d.ts.map +1 -0
- package/dist/node/components/wallet/table/hooks/useActiveProviderDialogState.d.cts +4 -0
- package/dist/node/components/wallet/table/hooks/useActiveProviderDialogState.d.cts.map +1 -0
- package/dist/node/components/wallet/table/hooks/useActiveProviderDialogState.d.mts +4 -0
- package/dist/node/components/wallet/table/hooks/useActiveProviderDialogState.d.mts.map +1 -0
- package/dist/node/components/wallet/table/hooks/useActiveProviderDialogState.d.ts +4 -0
- package/dist/node/components/wallet/table/hooks/useActiveProviderDialogState.d.ts.map +1 -0
- package/dist/node/components/wallet/table/index.d.cts +2 -0
- package/dist/node/components/wallet/table/index.d.cts.map +1 -1
- package/dist/node/components/wallet/table/index.d.mts +2 -0
- package/dist/node/components/wallet/table/index.d.mts.map +1 -1
- package/dist/node/components/wallet/table/index.d.ts +2 -0
- package/dist/node/components/wallet/table/index.d.ts.map +1 -1
- package/dist/node/hooks/index.d.cts +1 -0
- package/dist/node/hooks/index.d.cts.map +1 -1
- package/dist/node/hooks/index.d.mts +1 -0
- package/dist/node/hooks/index.d.mts.map +1 -1
- package/dist/node/hooks/index.d.ts +1 -0
- package/dist/node/hooks/index.d.ts.map +1 -1
- package/dist/node/hooks/useEnabledWallets.d.cts +15 -0
- package/dist/node/hooks/useEnabledWallets.d.cts.map +1 -0
- package/dist/node/hooks/useEnabledWallets.d.mts +15 -0
- package/dist/node/hooks/useEnabledWallets.d.mts.map +1 -0
- package/dist/node/hooks/useEnabledWallets.d.ts +15 -0
- package/dist/node/hooks/useEnabledWallets.d.ts.map +1 -0
- package/dist/node/img/index.d.cts +4 -0
- package/dist/node/img/index.d.cts.map +1 -0
- package/dist/node/img/index.d.mts +4 -0
- package/dist/node/img/index.d.mts.map +1 -0
- package/dist/node/img/index.d.ts +4 -0
- package/dist/node/img/index.d.ts.map +1 -0
- package/dist/node/index.cjs +487 -84
- package/dist/node/index.cjs.map +1 -1
- package/dist/node/index.d.cts +1 -0
- package/dist/node/index.d.cts.map +1 -1
- package/dist/node/index.d.mts +1 -0
- package/dist/node/index.d.mts.map +1 -1
- package/dist/node/index.d.ts +1 -0
- package/dist/node/index.d.ts.map +1 -1
- package/dist/node/index.js +463 -82
- package/dist/node/index.js.map +1 -1
- package/dist/node/xyo-color-logo-LHR2SMEM.svg +1 -0
- package/dist/node/xyo-color-logo-text-only-QPAW5BSQ.svg +1 -0
- package/package.json +2 -2
- package/src/classes/EnabledWallets.ts +128 -0
- package/src/classes/index.ts +1 -0
- package/src/components/ConnectedAccountsFlexbox.stories.tsx +11 -1
- package/src/components/ConnectedAccountsFlexbox.tsx +28 -17
- package/src/components/wallet/dialogs/connect/CheckboxFormControl.tsx +16 -0
- package/src/components/wallet/dialogs/connect/Dialog.tsx +43 -0
- package/src/components/wallet/dialogs/connect/LinkedProvidersFlexbox.tsx +27 -0
- package/src/components/wallet/dialogs/connect/Permissions.tsx +30 -0
- package/src/components/wallet/dialogs/connect/index.ts +2 -0
- package/src/components/wallet/dialogs/index.ts +2 -0
- package/src/components/wallet/dialogs/revoke/Dialog.tsx +32 -0
- package/src/components/wallet/dialogs/revoke/index.ts +1 -0
- package/src/components/wallet/index.ts +1 -0
- package/src/components/wallet/lib/ActiveProvider.ts +7 -0
- package/src/components/wallet/lib/TableHeadData.ts +7 -0
- package/src/components/wallet/lib/index.ts +1 -0
- package/src/components/wallet/table/ConnectedWalletsTable.tsx +41 -17
- package/src/components/wallet/table/ConnectedWalletsTableRow.tsx +56 -82
- package/src/components/wallet/table/cells/Accounts.tsx +23 -0
- package/src/components/wallet/table/cells/Actions.tsx +29 -0
- package/src/components/wallet/table/cells/Cells.tsx +16 -0
- package/src/components/wallet/table/cells/ChainName.tsx +7 -0
- package/src/components/wallet/table/cells/State.tsx +23 -0
- package/src/components/wallet/table/cells/Wallet.tsx +18 -0
- package/src/components/wallet/table/cells/index.ts +6 -0
- package/src/components/wallet/table/cells/lib/ConnectedWalletTableCellProps.tsx +17 -0
- package/src/components/wallet/table/cells/lib/index.ts +1 -0
- package/src/components/wallet/table/hooks/index.ts +1 -0
- package/src/components/wallet/table/hooks/useActiveProviderDialogState.tsx +20 -0
- package/src/components/wallet/table/index.ts +2 -0
- package/src/hooks/index.ts +1 -0
- package/src/hooks/useEnabledWallets.tsx +45 -0
- package/src/img/index.ts +4 -0
- package/src/img/xyo-color-logo-text-only.svg +1 -0
- package/src/img/xyo-color-logo.svg +1 -0
- package/src/index.ts +1 -0
- package/src/types/images.d.ts +5 -0
package/dist/node/index.js
CHANGED
@@ -1,6 +1,95 @@
|
|
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
|
+
|
1
89
|
// src/components/ConnectedAccountsFlexbox.tsx
|
2
|
-
import { Typography as
|
3
|
-
import { FlexCol } from "@xylabs/react-flexbox";
|
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";
|
4
93
|
|
5
94
|
// src/hooks/useDetectWallets.tsx
|
6
95
|
import { AccountsChangedEventName, useWalletDiscovery } from "@xylabs/react-crypto";
|
@@ -32,8 +121,249 @@ var useDetectedWallets = () => {
|
|
32
121
|
return { sortedWallets, totalConnectedAccounts };
|
33
122
|
};
|
34
123
|
|
124
|
+
// src/hooks/useEnabledWallets.tsx
|
125
|
+
import { useWalletDiscovery as useWalletDiscovery2 } from "@xylabs/react-crypto";
|
126
|
+
import { useMemo as useMemo2, useSyncExternalStore } from "react";
|
127
|
+
var enabledEthWallets;
|
128
|
+
var useEnabledWalletsInner = (enabledWalletsRdns) => {
|
129
|
+
const discoveredWallets = useWalletDiscovery2();
|
130
|
+
const wallets = useMemo2(() => {
|
131
|
+
if (enabledEthWallets === void 0)
|
132
|
+
enabledEthWallets = new EnabledEthWalletConnections();
|
133
|
+
enabledEthWallets.resetWallets(discoveredWallets);
|
134
|
+
Object.entries(enabledWalletsRdns ?? {}).forEach(([rdns, enabled]) => enabledEthWallets == null ? void 0 : enabledEthWallets.toggleEnabledWallet(rdns, enabled));
|
135
|
+
return enabledEthWallets;
|
136
|
+
}, [discoveredWallets, enabledWalletsRdns]);
|
137
|
+
return useSyncExternalStore(wallets.subscribe.bind(wallets), () => wallets.wallets);
|
138
|
+
};
|
139
|
+
var useEnabledWallets = (enabledWalletsRdns) => {
|
140
|
+
const wallets = useEnabledWalletsInner(enabledWalletsRdns);
|
141
|
+
const enabledWallets = useMemo2(
|
142
|
+
() => Object.entries(wallets).reduce((acc, [walletName, wallet]) => {
|
143
|
+
if (wallet.enabled)
|
144
|
+
acc[walletName] = wallet;
|
145
|
+
return acc;
|
146
|
+
}, {}),
|
147
|
+
[wallets]
|
148
|
+
);
|
149
|
+
return {
|
150
|
+
disableWallet: enabledEthWallets == null ? void 0 : enabledEthWallets.disableWallet.bind(enabledEthWallets),
|
151
|
+
enableWallet: enabledEthWallets == null ? void 0 : enabledEthWallets.enableWallet.bind(enabledEthWallets),
|
152
|
+
enabledWallets,
|
153
|
+
wallets
|
154
|
+
};
|
155
|
+
};
|
156
|
+
|
157
|
+
// src/components/wallet/dialogs/connect/CheckboxFormControl.tsx
|
158
|
+
import { Checkbox, FormControl, FormLabel } from "@mui/material";
|
159
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
160
|
+
var CheckboxFormControl = ({ onCheckChanged, ...props }) => {
|
161
|
+
return /* @__PURE__ */ jsx(FormControl, { ...props, children: /* @__PURE__ */ jsxs(FormLabel, { children: [
|
162
|
+
/* @__PURE__ */ jsx(Checkbox, { onChange: (_, checked) => onCheckChanged == null ? void 0 : onCheckChanged(checked) }),
|
163
|
+
"Do not show this again."
|
164
|
+
] }) });
|
165
|
+
};
|
166
|
+
|
167
|
+
// src/components/wallet/dialogs/connect/Dialog.tsx
|
168
|
+
import { Button, Dialog, DialogActions, DialogContent, DialogTitle } from "@mui/material";
|
169
|
+
|
170
|
+
// src/components/wallet/dialogs/connect/LinkedProvidersFlexbox.tsx
|
171
|
+
import { SyncAlt } from "@mui/icons-material";
|
172
|
+
import { Typography } from "@mui/material";
|
173
|
+
import { ConstrainedImage } from "@xylabs/react-crypto";
|
174
|
+
import { FlexCol, FlexRow } from "@xylabs/react-flexbox";
|
175
|
+
|
176
|
+
// src/img/index.ts
|
177
|
+
import xyoColorLogo from "./xyo-color-logo-LHR2SMEM.svg";
|
178
|
+
import xyoColorLogoText from "./xyo-color-logo-text-only-QPAW5BSQ.svg";
|
179
|
+
|
180
|
+
// src/components/wallet/dialogs/connect/LinkedProvidersFlexbox.tsx
|
181
|
+
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
182
|
+
var LinkedProvidersFlexbox = ({ icon, providerName, ...props }) => {
|
183
|
+
return /* @__PURE__ */ jsxs2(FlexRow, { gap: 4, justifyContent: "space-evenly", ...props, children: [
|
184
|
+
/* @__PURE__ */ jsxs2(FlexCol, { gap: 0.5, children: [
|
185
|
+
/* @__PURE__ */ jsx2("img", { alt: "XYO Logo", src: xyoColorLogo, style: { height: "48px" } }),
|
186
|
+
/* @__PURE__ */ jsx2(Typography, { variant: "subtitle1", children: "XYO App" })
|
187
|
+
] }),
|
188
|
+
/* @__PURE__ */ jsx2(SyncAlt, { fontSize: "large" }),
|
189
|
+
/* @__PURE__ */ jsxs2(FlexCol, { gap: 0.5, children: [
|
190
|
+
/* @__PURE__ */ jsx2(ConstrainedImage, { constrainedValue: "48px", src: icon, alt: providerName, style: { height: "48px", maxWidth: "48px" } }),
|
191
|
+
/* @__PURE__ */ jsx2(Typography, { variant: "subtitle1", children: providerName })
|
192
|
+
] })
|
193
|
+
] });
|
194
|
+
};
|
195
|
+
|
196
|
+
// src/components/wallet/dialogs/connect/Permissions.tsx
|
197
|
+
import { Link, Typography as Typography2 } from "@mui/material";
|
198
|
+
import { FlexCol as FlexCol2 } from "@xylabs/react-flexbox";
|
199
|
+
import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
200
|
+
var WalletPermissionsFlexbox = (props) => {
|
201
|
+
return /* @__PURE__ */ jsxs3(FlexCol2, { gap: 4, ...props, children: [
|
202
|
+
/* @__PURE__ */ jsx3(Typography2, { fontWeight: "bold", sx: { textAlign: "center" }, children: "This will allow XYO to:" }),
|
203
|
+
/* @__PURE__ */ jsxs3("ul", { children: [
|
204
|
+
/* @__PURE__ */ jsx3("li", { children: "View your wallet account(s) and address(es)" }),
|
205
|
+
/* @__PURE__ */ jsx3("li", { children: "Read-only access to browse the public blockchain(s) you select" })
|
206
|
+
] }),
|
207
|
+
/* @__PURE__ */ jsxs3(Typography2, { variant: "subtitle1", sx: { textAlign: "center" }, children: [
|
208
|
+
"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",
|
209
|
+
" ",
|
210
|
+
/* @__PURE__ */ jsx3(
|
211
|
+
Link,
|
212
|
+
{
|
213
|
+
href: "https://cointelegraph.com/innovation-circle/decentralization-and-sovereignty-debunking-our-approach-to-digital-sovereignty",
|
214
|
+
sx: { fontWeight: "bold" },
|
215
|
+
target: "_blank",
|
216
|
+
children: "here"
|
217
|
+
}
|
218
|
+
),
|
219
|
+
"."
|
220
|
+
] })
|
221
|
+
] });
|
222
|
+
};
|
223
|
+
|
224
|
+
// src/components/wallet/dialogs/connect/Dialog.tsx
|
225
|
+
import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
|
226
|
+
var ConnectWalletDialog = ({ activeProvider, onIgnoreConnectDialog, ...props }) => {
|
227
|
+
const { icon, providerName } = activeProvider ?? {};
|
228
|
+
const onConnect = async () => {
|
229
|
+
var _a, _b;
|
230
|
+
try {
|
231
|
+
await ((_a = activeProvider == null ? void 0 : activeProvider.connectWallet) == null ? void 0 : _a.call(activeProvider));
|
232
|
+
(_b = props.onClose) == null ? void 0 : _b.call(props, {}, "escapeKeyDown");
|
233
|
+
} catch (e) {
|
234
|
+
console.warn(`Error connecting to wallet: ${e.message}`);
|
235
|
+
}
|
236
|
+
};
|
237
|
+
return /* @__PURE__ */ jsxs4(Dialog, { PaperProps: { sx: { display: "flex", gap: 4 } }, ...props, children: [
|
238
|
+
/* @__PURE__ */ jsx4(DialogTitle, { sx: { textAlign: "center" }, children: "XYO Wants To Access The Blockchain on Your Behalf" }),
|
239
|
+
/* @__PURE__ */ jsxs4(DialogContent, { sx: { display: "flex", flexDirection: "column", gap: 4 }, children: [
|
240
|
+
/* @__PURE__ */ jsx4(LinkedProvidersFlexbox, { icon, providerName }),
|
241
|
+
/* @__PURE__ */ jsx4(WalletPermissionsFlexbox, {}),
|
242
|
+
/* @__PURE__ */ jsx4(CheckboxFormControl, { onCheckChanged: onIgnoreConnectDialog })
|
243
|
+
] }),
|
244
|
+
/* @__PURE__ */ jsxs4(DialogActions, { children: [
|
245
|
+
/* @__PURE__ */ jsx4(Button, { variant: "outlined", onClick: () => {
|
246
|
+
var _a;
|
247
|
+
return (_a = props.onClose) == null ? void 0 : _a.call(props, {}, "escapeKeyDown");
|
248
|
+
}, 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 == null ? void 0 : activeProvider.icon, constrainedValue: "24px" }),
|
263
|
+
/* @__PURE__ */ jsxs5(DialogTitle2, { sx: { pl: 0 }, children: [
|
264
|
+
"Revoke ",
|
265
|
+
activeProvider == null ? void 0 : 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 == null ? void 0 : 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: () => {
|
278
|
+
var _a;
|
279
|
+
return (_a = props.onClose) == null ? void 0 : _a.call(props, {}, "escapeKeyDown");
|
280
|
+
}, children: "Close" }) })
|
281
|
+
] });
|
282
|
+
};
|
283
|
+
|
284
|
+
// src/components/wallet/table/cells/Accounts.tsx
|
285
|
+
import { TableCell, Tooltip, Typography as Typography4 } from "@mui/material";
|
286
|
+
import { jsx as jsx6 } from "react/jsx-runtime";
|
287
|
+
var ConnectedWalletsAccountsTableCell = ({
|
288
|
+
additionalAccounts,
|
289
|
+
currentAccount,
|
290
|
+
totalAccounts,
|
291
|
+
tableCellProps
|
292
|
+
}) => {
|
293
|
+
return /* @__PURE__ */ jsx6(TableCell, { ...tableCellProps, children: /* @__PURE__ */ jsx6(
|
294
|
+
Tooltip,
|
295
|
+
{
|
296
|
+
sx: { cursor: totalAccounts > 0 ? "pointer" : "auto" },
|
297
|
+
title: [...currentAccount ?? [], ...additionalAccounts ?? []].map((address, index) => /* @__PURE__ */ jsx6("p", { children: address }, index)),
|
298
|
+
children: /* @__PURE__ */ jsx6(Typography4, { children: totalAccounts })
|
299
|
+
}
|
300
|
+
) });
|
301
|
+
};
|
302
|
+
|
303
|
+
// src/components/wallet/table/cells/Actions.tsx
|
304
|
+
import { Check, InfoOutlined } from "@mui/icons-material";
|
305
|
+
import { Button as Button3, IconButton, TableCell as TableCell2, Typography as Typography5 } from "@mui/material";
|
306
|
+
import { FlexRow as FlexRow3 } from "@xylabs/react-flexbox";
|
307
|
+
import { jsx as jsx7, jsxs as jsxs6 } from "react/jsx-runtime";
|
308
|
+
var ConnectedWalletsActionsTableCell = ({ connected, onConnect, onRevoke, tableCellProps }) => {
|
309
|
+
return /* @__PURE__ */ jsx7(TableCell2, { ...tableCellProps, children: /* @__PURE__ */ jsxs6(FlexRow3, { gap: 2, justifyContent: "start", children: [
|
310
|
+
connected ? /* @__PURE__ */ jsxs6(Typography5, { sx: { display: "inline-flex", gap: 0.5 }, children: [
|
311
|
+
/* @__PURE__ */ jsx7(Check, {}),
|
312
|
+
"Connected"
|
313
|
+
] }) : /* @__PURE__ */ jsx7(Button3, { variant: "contained", onClick: onConnect, children: "Connect" }),
|
314
|
+
connected ? /* @__PURE__ */ jsx7(IconButton, { onClick: onRevoke, children: /* @__PURE__ */ jsx7(InfoOutlined, {}) }) : null
|
315
|
+
] }) });
|
316
|
+
};
|
317
|
+
|
318
|
+
// src/components/wallet/table/cells/ChainName.tsx
|
319
|
+
import { TableCell as TableCell3 } from "@mui/material";
|
320
|
+
import { jsx as jsx8 } from "react/jsx-runtime";
|
321
|
+
var ConnectedWalletsChainNameTableCell = ({ chainName, tableCellProps }) => {
|
322
|
+
return /* @__PURE__ */ jsx8(TableCell3, { ...tableCellProps, children: chainName });
|
323
|
+
};
|
324
|
+
|
325
|
+
// src/components/wallet/table/cells/State.tsx
|
326
|
+
import { Switch, TableCell as TableCell4 } from "@mui/material";
|
327
|
+
import { useMemo as useMemo3 } from "react";
|
328
|
+
import { jsx as jsx9 } from "react/jsx-runtime";
|
329
|
+
var ConnectedWalletState = ({ connected, walletRdns, tableCellProps }) => {
|
330
|
+
const { disableWallet, enableWallet, wallets } = useEnabledWallets();
|
331
|
+
const enabled = useMemo3(() => walletRdns ? wallets[walletRdns].enabled : false, [wallets, walletRdns]);
|
332
|
+
const handleClick = (event) => {
|
333
|
+
var _a;
|
334
|
+
const checked = (_a = event.target) == null ? void 0 : _a.checked;
|
335
|
+
if (walletRdns) {
|
336
|
+
checked ? enableWallet == null ? void 0 : enableWallet(walletRdns) : disableWallet == null ? void 0 : disableWallet(walletRdns);
|
337
|
+
}
|
338
|
+
};
|
339
|
+
return /* @__PURE__ */ jsx9(TableCell4, { ...tableCellProps, children: /* @__PURE__ */ jsx9(Switch, { disabled: !connected, checked: connected && enabled, onChange: handleClick }) });
|
340
|
+
};
|
341
|
+
|
342
|
+
// src/components/wallet/table/cells/Wallet.tsx
|
343
|
+
import { TableCell as TableCell5, useTheme } from "@mui/material";
|
344
|
+
import { ConstrainedImage as ConstrainedImage3 } from "@xylabs/react-crypto";
|
345
|
+
import { FlexRow as FlexRow4 } from "@xylabs/react-flexbox";
|
346
|
+
import { jsx as jsx10, jsxs as jsxs7 } from "react/jsx-runtime";
|
347
|
+
var ConnectedWalletsWalletTableCell = ({ icon, walletName, tableCellProps }) => {
|
348
|
+
const theme = useTheme();
|
349
|
+
return /* @__PURE__ */ jsx10(TableCell5, { ...tableCellProps, children: /* @__PURE__ */ jsxs7(FlexRow4, { gap: 2, justifyContent: "start", children: [
|
350
|
+
/* @__PURE__ */ jsx10(ConstrainedImage3, { constrainedValue: theme.spacing(4), src: icon }),
|
351
|
+
walletName
|
352
|
+
] }) });
|
353
|
+
};
|
354
|
+
|
355
|
+
// src/components/wallet/table/cells/Cells.tsx
|
356
|
+
var ConnectedWalletTableCells = [
|
357
|
+
ConnectedWalletsWalletTableCell,
|
358
|
+
ConnectedWalletsChainNameTableCell,
|
359
|
+
ConnectedWalletsAccountsTableCell,
|
360
|
+
ConnectedWalletsActionsTableCell,
|
361
|
+
ConnectedWalletState
|
362
|
+
];
|
363
|
+
|
35
364
|
// src/components/wallet/table/ConnectedWalletsTable.tsx
|
36
|
-
import { Table, TableBody, TableCell as
|
365
|
+
import { Table, TableBody, TableCell as TableCell6, TableHead, TableRow as TableRow2 } from "@mui/material";
|
366
|
+
import { useState as useState3 } from "react";
|
37
367
|
|
38
368
|
// src/components/wallet/lib/TableHeadData.ts
|
39
369
|
var WalletsTableHeadCells = [
|
@@ -64,105 +394,156 @@ var WalletsTableHeadCells = [
|
|
64
394
|
label: "Actions",
|
65
395
|
numeric: false,
|
66
396
|
showOnMobile: true
|
397
|
+
},
|
398
|
+
{
|
399
|
+
disablePadding: false,
|
400
|
+
id: "enabled",
|
401
|
+
label: "Enabled",
|
402
|
+
numeric: false,
|
403
|
+
showOnMobile: true
|
67
404
|
}
|
68
405
|
];
|
69
406
|
|
70
407
|
// src/components/wallet/table/ConnectedWalletsTableRow.tsx
|
71
|
-
import {
|
72
|
-
import {
|
73
|
-
import {
|
74
|
-
import {
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
chainName,
|
81
|
-
icon,
|
82
|
-
name,
|
408
|
+
import { TableRow } from "@mui/material";
|
409
|
+
import { useEthWallet } from "@xylabs/react-crypto";
|
410
|
+
import { useCallback, useMemo as useMemo4 } from "react";
|
411
|
+
import { jsx as jsx11 } from "react/jsx-runtime";
|
412
|
+
var WalletConnectionsTableRow = ({
|
413
|
+
ignoreConnectDialog,
|
414
|
+
onConnectClick,
|
415
|
+
onRevoke,
|
416
|
+
wallet,
|
83
417
|
...props
|
84
418
|
}) => {
|
85
|
-
const
|
419
|
+
const { currentAccount: currentAccountFromWallet, additionalAccounts, chainName, connectWallet, providerInfo } = useEthWallet(wallet);
|
420
|
+
const currentAccount = (currentAccountFromWallet == null ? void 0 : currentAccountFromWallet.toString()) ? [currentAccountFromWallet.toString()] : [];
|
86
421
|
const totalAccounts = ((additionalAccounts == null ? void 0 : additionalAccounts.length) ?? 0) + ((currentAccount == null ? void 0 : currentAccount.length) ?? 0);
|
87
|
-
const connected = (currentAccount == null ? void 0 : currentAccount.length) ?? 0 > 0;
|
88
|
-
const
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
] }) : /* @__PURE__ */ jsx(Button, { variant: "contained", children: "Connect" }),
|
110
|
-
connected ? /* @__PURE__ */ jsx(Button, { variant: "outlined", color: "error", children: "Revoke" }) : null
|
111
|
-
] }) }, 4)
|
112
|
-
};
|
113
|
-
return TableCells;
|
114
|
-
}, [additionalAccounts, chainName, connected, currentAccount, icon, name, theme, totalAccounts]);
|
115
|
-
return /* @__PURE__ */ jsx(TableRow, { ...props, children: Object.values(Cells).map((cell) => cell) });
|
116
|
-
};
|
117
|
-
var WalletConnectionsTableRow = ({ wallet, ...props }) => {
|
118
|
-
const { currentAccount, additionalAccounts, chainName, providerInfo, providerName } = useEthWallet(wallet);
|
119
|
-
const currentAccountString = currentAccount == null ? void 0 : currentAccount.toString();
|
120
|
-
return /* @__PURE__ */ jsx(
|
121
|
-
WalletConnectionsTableRowInner,
|
422
|
+
const connected = !!((currentAccount == null ? void 0 : currentAccount.length) ?? 0 > 0);
|
423
|
+
const { icon, name, rdns } = useMemo4(() => providerInfo ?? { icon: void 0, name: void 0, rdns: void 0 }, [providerInfo]);
|
424
|
+
const activeProvider = useMemo4(
|
425
|
+
() => ({
|
426
|
+
connectWallet,
|
427
|
+
icon,
|
428
|
+
providerName: name
|
429
|
+
}),
|
430
|
+
[connectWallet, icon, name]
|
431
|
+
);
|
432
|
+
const onRevokeLocal = useCallback(() => {
|
433
|
+
onRevoke == null ? void 0 : onRevoke(activeProvider);
|
434
|
+
}, [activeProvider, onRevoke]);
|
435
|
+
const onConnectLocal = useCallback(async () => {
|
436
|
+
if (ignoreConnectDialog) {
|
437
|
+
await (connectWallet == null ? void 0 : connectWallet());
|
438
|
+
} else {
|
439
|
+
onConnectClick == null ? void 0 : onConnectClick(activeProvider);
|
440
|
+
}
|
441
|
+
}, [activeProvider, connectWallet, ignoreConnectDialog, onConnectClick]);
|
442
|
+
return /* @__PURE__ */ jsx11(TableRow, { ...props, children: Object.values(ConnectedWalletTableCells).map((Cell, index) => /* @__PURE__ */ jsx11(
|
443
|
+
Cell,
|
122
444
|
{
|
123
445
|
additionalAccounts,
|
124
|
-
currentAccount: currentAccountString ? [currentAccountString] : [],
|
125
446
|
chainName,
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
447
|
+
connected,
|
448
|
+
currentAccount,
|
449
|
+
icon,
|
450
|
+
onConnect: onConnectLocal,
|
451
|
+
onRevoke: onRevokeLocal,
|
452
|
+
totalAccounts,
|
453
|
+
walletName: name,
|
454
|
+
walletRdns: rdns
|
455
|
+
},
|
456
|
+
index
|
457
|
+
)) });
|
131
458
|
};
|
132
459
|
|
133
|
-
// src/components/wallet/table/
|
134
|
-
import {
|
135
|
-
var
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
460
|
+
// src/components/wallet/table/hooks/useActiveProviderDialogState.tsx
|
461
|
+
import { useState as useState2 } from "react";
|
462
|
+
var useActiveProviderDialogState = (setActiveProvider) => {
|
463
|
+
const [show, setShow] = useState2(false);
|
464
|
+
const onSetActiveProvider = (activeProvider) => {
|
465
|
+
setShow(true);
|
466
|
+
setActiveProvider(activeProvider);
|
467
|
+
};
|
468
|
+
const onClose = () => {
|
469
|
+
setShow(false);
|
470
|
+
setActiveProvider({});
|
471
|
+
};
|
472
|
+
return [show, onSetActiveProvider, onClose];
|
143
473
|
};
|
144
474
|
|
145
|
-
// src/components/
|
146
|
-
import { jsx as
|
147
|
-
var
|
148
|
-
const
|
149
|
-
const
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
475
|
+
// src/components/wallet/table/ConnectedWalletsTable.tsx
|
476
|
+
import { Fragment, jsx as jsx12, jsxs as jsxs8 } from "react/jsx-runtime";
|
477
|
+
var ConnectedWalletsTable = ({ ignoreConnectDialog, onIgnoreConnectDialog, wallets, ...props }) => {
|
478
|
+
const [activeProvider, setActiveProvider] = useState3();
|
479
|
+
const [showConnect, onSetActiveProviderConnect, onConnectClose] = useActiveProviderDialogState(setActiveProvider);
|
480
|
+
const [showRevoke, onSetActiveProviderRevoke, onRevokeClose] = useActiveProviderDialogState(setActiveProvider);
|
481
|
+
return /* @__PURE__ */ jsxs8(Fragment, { children: [
|
482
|
+
/* @__PURE__ */ jsxs8(Table, { ...props, children: [
|
483
|
+
/* @__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)) }) }),
|
484
|
+
/* @__PURE__ */ jsx12(TableBody, { children: (wallets ?? []).map((wallet) => {
|
485
|
+
var _a;
|
486
|
+
return /* @__PURE__ */ jsx12(
|
487
|
+
WalletConnectionsTableRow,
|
488
|
+
{
|
489
|
+
ignoreConnectDialog,
|
490
|
+
onConnectClick: onSetActiveProviderConnect,
|
491
|
+
onRevoke: onSetActiveProviderRevoke,
|
492
|
+
wallet
|
493
|
+
},
|
494
|
+
(_a = wallet.providerInfo) == null ? void 0 : _a.rdns
|
495
|
+
);
|
496
|
+
}) })
|
157
497
|
] }),
|
158
|
-
/* @__PURE__ */
|
498
|
+
/* @__PURE__ */ jsx12(RevokeWalletConnectionDialog, { open: showRevoke, onClose: onRevokeClose, activeProvider }),
|
499
|
+
/* @__PURE__ */ jsx12(
|
500
|
+
ConnectWalletDialog,
|
501
|
+
{
|
502
|
+
activeProvider,
|
503
|
+
onClose: onConnectClose,
|
504
|
+
open: showConnect,
|
505
|
+
onIgnoreConnectDialog
|
506
|
+
}
|
507
|
+
)
|
159
508
|
] });
|
160
509
|
};
|
510
|
+
|
511
|
+
// src/components/ConnectedAccountsFlexbox.tsx
|
512
|
+
import { jsx as jsx13, jsxs as jsxs9 } from "react/jsx-runtime";
|
513
|
+
var ConnectedAccountsFlexbox = forwardRef(
|
514
|
+
({ ignoreConnectDialog, onIgnoreConnectDialog, ...props }, ref) => {
|
515
|
+
const theme = useTheme2();
|
516
|
+
const { totalConnectedAccounts, sortedWallets } = useDetectedWallets();
|
517
|
+
return /* @__PURE__ */ jsxs9(FlexCol3, { alignItems: "stretch", justifyContent: "start", gap: 2, ref, ...props, children: [
|
518
|
+
/* @__PURE__ */ jsxs9(FlexCol3, { alignItems: "start", children: [
|
519
|
+
/* @__PURE__ */ jsx13(Typography6, { variant: "h2", sx: { mb: 0.5 }, children: "Detected Web3 Wallets" }),
|
520
|
+
totalConnectedAccounts ? /* @__PURE__ */ jsxs9(Typography6, { variant: "subtitle1", color: theme.palette.secondary.main, sx: { opacity: 0.5 }, children: [
|
521
|
+
"Total Connected Accounts: ",
|
522
|
+
totalConnectedAccounts
|
523
|
+
] }) : null
|
524
|
+
] }),
|
525
|
+
/* @__PURE__ */ jsx13(ConnectedWalletsTable, { wallets: sortedWallets, ignoreConnectDialog, onIgnoreConnectDialog })
|
526
|
+
] });
|
527
|
+
}
|
528
|
+
);
|
529
|
+
ConnectedAccountsFlexbox.displayName = "ConnectedAccountsFlexbox";
|
161
530
|
export {
|
531
|
+
CheckboxFormControl,
|
532
|
+
ConnectWalletDialog,
|
162
533
|
ConnectedAccountsFlexbox,
|
534
|
+
ConnectedWalletState,
|
535
|
+
ConnectedWalletTableCells,
|
536
|
+
ConnectedWalletsAccountsTableCell,
|
537
|
+
ConnectedWalletsActionsTableCell,
|
538
|
+
ConnectedWalletsChainNameTableCell,
|
163
539
|
ConnectedWalletsTable,
|
540
|
+
ConnectedWalletsWalletTableCell,
|
541
|
+
EnabledEthWalletConnections,
|
542
|
+
RevokeWalletConnectionDialog,
|
164
543
|
WalletConnectionsTableRow,
|
165
|
-
|
166
|
-
useDetectedWallets
|
544
|
+
useActiveProviderDialogState,
|
545
|
+
useDetectedWallets,
|
546
|
+
useEnabledWallets,
|
547
|
+
useEnabledWalletsInner
|
167
548
|
};
|
168
549
|
//# sourceMappingURL=index.js.map
|