@xyo-network/react-connected-accounts 2.81.10 → 2.82.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/browser/classes/index.d.cts +1 -1
- package/dist/browser/classes/index.d.mts +1 -1
- package/dist/browser/classes/index.d.ts +1 -1
- package/dist/browser/components/ConnectedAccountsFlexbox.d.cts +2 -1
- package/dist/browser/components/ConnectedAccountsFlexbox.d.cts.map +1 -1
- package/dist/browser/components/ConnectedAccountsFlexbox.d.mts +2 -1
- package/dist/browser/components/ConnectedAccountsFlexbox.d.mts.map +1 -1
- package/dist/browser/components/ConnectedAccountsFlexbox.d.ts +2 -1
- package/dist/browser/components/ConnectedAccountsFlexbox.d.ts.map +1 -1
- package/dist/browser/components/index.d.cts +2 -2
- package/dist/browser/components/index.d.cts.map +1 -1
- package/dist/browser/components/index.d.mts +2 -2
- package/dist/browser/components/index.d.mts.map +1 -1
- package/dist/browser/components/index.d.ts +2 -2
- package/dist/browser/components/index.d.ts.map +1 -1
- package/dist/browser/components/wallet/dialogs/connect/CheckboxFormControl.d.cts +1 -0
- package/dist/browser/components/wallet/dialogs/connect/CheckboxFormControl.d.cts.map +1 -1
- package/dist/browser/components/wallet/dialogs/connect/CheckboxFormControl.d.mts +1 -0
- package/dist/browser/components/wallet/dialogs/connect/CheckboxFormControl.d.mts.map +1 -1
- package/dist/browser/components/wallet/dialogs/connect/CheckboxFormControl.d.ts +1 -0
- package/dist/browser/components/wallet/dialogs/connect/CheckboxFormControl.d.ts.map +1 -1
- package/dist/browser/components/wallet/dialogs/connect/Dialog.d.cts +2 -1
- package/dist/browser/components/wallet/dialogs/connect/Dialog.d.cts.map +1 -1
- package/dist/browser/components/wallet/dialogs/connect/Dialog.d.mts +2 -1
- package/dist/browser/components/wallet/dialogs/connect/Dialog.d.mts.map +1 -1
- package/dist/browser/components/wallet/dialogs/connect/Dialog.d.ts +2 -1
- package/dist/browser/components/wallet/dialogs/connect/Dialog.d.ts.map +1 -1
- package/dist/browser/components/wallet/dialogs/connect/LinkedProvidersFlexbox.d.cts +1 -0
- package/dist/browser/components/wallet/dialogs/connect/LinkedProvidersFlexbox.d.cts.map +1 -1
- package/dist/browser/components/wallet/dialogs/connect/LinkedProvidersFlexbox.d.mts +1 -0
- package/dist/browser/components/wallet/dialogs/connect/LinkedProvidersFlexbox.d.mts.map +1 -1
- package/dist/browser/components/wallet/dialogs/connect/LinkedProvidersFlexbox.d.ts +1 -0
- package/dist/browser/components/wallet/dialogs/connect/LinkedProvidersFlexbox.d.ts.map +1 -1
- package/dist/browser/components/wallet/dialogs/connect/Permissions.d.cts +1 -0
- package/dist/browser/components/wallet/dialogs/connect/Permissions.d.cts.map +1 -1
- package/dist/browser/components/wallet/dialogs/connect/Permissions.d.mts +1 -0
- package/dist/browser/components/wallet/dialogs/connect/Permissions.d.mts.map +1 -1
- package/dist/browser/components/wallet/dialogs/connect/Permissions.d.ts +1 -0
- package/dist/browser/components/wallet/dialogs/connect/Permissions.d.ts.map +1 -1
- package/dist/browser/components/wallet/dialogs/connect/index.d.cts +2 -2
- package/dist/browser/components/wallet/dialogs/connect/index.d.cts.map +1 -1
- package/dist/browser/components/wallet/dialogs/connect/index.d.mts +2 -2
- package/dist/browser/components/wallet/dialogs/connect/index.d.mts.map +1 -1
- package/dist/browser/components/wallet/dialogs/connect/index.d.ts +2 -2
- package/dist/browser/components/wallet/dialogs/connect/index.d.ts.map +1 -1
- package/dist/browser/components/wallet/dialogs/index.d.cts +2 -2
- package/dist/browser/components/wallet/dialogs/index.d.mts +2 -2
- package/dist/browser/components/wallet/dialogs/index.d.ts +2 -2
- package/dist/browser/components/wallet/dialogs/revoke/Dialog.d.cts +2 -1
- package/dist/browser/components/wallet/dialogs/revoke/Dialog.d.cts.map +1 -1
- package/dist/browser/components/wallet/dialogs/revoke/Dialog.d.mts +2 -1
- package/dist/browser/components/wallet/dialogs/revoke/Dialog.d.mts.map +1 -1
- package/dist/browser/components/wallet/dialogs/revoke/Dialog.d.ts +2 -1
- package/dist/browser/components/wallet/dialogs/revoke/Dialog.d.ts.map +1 -1
- package/dist/browser/components/wallet/dialogs/revoke/index.d.cts +1 -1
- package/dist/browser/components/wallet/dialogs/revoke/index.d.cts.map +1 -1
- package/dist/browser/components/wallet/dialogs/revoke/index.d.mts +1 -1
- package/dist/browser/components/wallet/dialogs/revoke/index.d.mts.map +1 -1
- package/dist/browser/components/wallet/dialogs/revoke/index.d.ts +1 -1
- package/dist/browser/components/wallet/dialogs/revoke/index.d.ts.map +1 -1
- package/dist/browser/components/wallet/index.d.cts +2 -2
- package/dist/browser/components/wallet/index.d.mts +2 -2
- package/dist/browser/components/wallet/index.d.ts +2 -2
- package/dist/browser/components/wallet/lib/index.d.cts +2 -2
- package/dist/browser/components/wallet/lib/index.d.mts +2 -2
- package/dist/browser/components/wallet/lib/index.d.ts +2 -2
- package/dist/browser/components/wallet/table/ConnectedWalletsTable.d.cts +1 -0
- package/dist/browser/components/wallet/table/ConnectedWalletsTable.d.cts.map +1 -1
- package/dist/browser/components/wallet/table/ConnectedWalletsTable.d.mts +1 -0
- package/dist/browser/components/wallet/table/ConnectedWalletsTable.d.mts.map +1 -1
- package/dist/browser/components/wallet/table/ConnectedWalletsTable.d.ts +1 -0
- package/dist/browser/components/wallet/table/ConnectedWalletsTable.d.ts.map +1 -1
- package/dist/browser/components/wallet/table/ConnectedWalletsTableRow.d.cts +2 -1
- package/dist/browser/components/wallet/table/ConnectedWalletsTableRow.d.cts.map +1 -1
- package/dist/browser/components/wallet/table/ConnectedWalletsTableRow.d.mts +2 -1
- package/dist/browser/components/wallet/table/ConnectedWalletsTableRow.d.mts.map +1 -1
- package/dist/browser/components/wallet/table/ConnectedWalletsTableRow.d.ts +2 -1
- package/dist/browser/components/wallet/table/ConnectedWalletsTableRow.d.ts.map +1 -1
- package/dist/browser/components/wallet/table/cells/Accounts.d.cts +2 -1
- package/dist/browser/components/wallet/table/cells/Accounts.d.cts.map +1 -1
- package/dist/browser/components/wallet/table/cells/Accounts.d.mts +2 -1
- package/dist/browser/components/wallet/table/cells/Accounts.d.mts.map +1 -1
- package/dist/browser/components/wallet/table/cells/Accounts.d.ts +2 -1
- package/dist/browser/components/wallet/table/cells/Accounts.d.ts.map +1 -1
- package/dist/browser/components/wallet/table/cells/Actions.d.cts +2 -1
- package/dist/browser/components/wallet/table/cells/Actions.d.cts.map +1 -1
- package/dist/browser/components/wallet/table/cells/Actions.d.mts +2 -1
- package/dist/browser/components/wallet/table/cells/Actions.d.mts.map +1 -1
- package/dist/browser/components/wallet/table/cells/Actions.d.ts +2 -1
- package/dist/browser/components/wallet/table/cells/Actions.d.ts.map +1 -1
- package/dist/browser/components/wallet/table/cells/Cells.d.cts +1 -1
- package/dist/browser/components/wallet/table/cells/Cells.d.mts +1 -1
- package/dist/browser/components/wallet/table/cells/Cells.d.ts +1 -1
- package/dist/browser/components/wallet/table/cells/ChainName.d.cts +2 -1
- package/dist/browser/components/wallet/table/cells/ChainName.d.cts.map +1 -1
- package/dist/browser/components/wallet/table/cells/ChainName.d.mts +2 -1
- package/dist/browser/components/wallet/table/cells/ChainName.d.mts.map +1 -1
- package/dist/browser/components/wallet/table/cells/ChainName.d.ts +2 -1
- package/dist/browser/components/wallet/table/cells/ChainName.d.ts.map +1 -1
- package/dist/browser/components/wallet/table/cells/State.d.cts +2 -1
- package/dist/browser/components/wallet/table/cells/State.d.cts.map +1 -1
- package/dist/browser/components/wallet/table/cells/State.d.mts +2 -1
- package/dist/browser/components/wallet/table/cells/State.d.mts.map +1 -1
- package/dist/browser/components/wallet/table/cells/State.d.ts +2 -1
- package/dist/browser/components/wallet/table/cells/State.d.ts.map +1 -1
- package/dist/browser/components/wallet/table/cells/Wallet.d.cts +2 -1
- package/dist/browser/components/wallet/table/cells/Wallet.d.cts.map +1 -1
- package/dist/browser/components/wallet/table/cells/Wallet.d.mts +2 -1
- package/dist/browser/components/wallet/table/cells/Wallet.d.mts.map +1 -1
- package/dist/browser/components/wallet/table/cells/Wallet.d.ts +2 -1
- package/dist/browser/components/wallet/table/cells/Wallet.d.ts.map +1 -1
- package/dist/browser/components/wallet/table/cells/index.d.cts +6 -6
- package/dist/browser/components/wallet/table/cells/index.d.cts.map +1 -1
- package/dist/browser/components/wallet/table/cells/index.d.mts +6 -6
- package/dist/browser/components/wallet/table/cells/index.d.mts.map +1 -1
- package/dist/browser/components/wallet/table/cells/index.d.ts +6 -6
- package/dist/browser/components/wallet/table/cells/index.d.ts.map +1 -1
- package/dist/browser/components/wallet/table/cells/lib/index.d.cts +1 -1
- package/dist/browser/components/wallet/table/cells/lib/index.d.cts.map +1 -1
- package/dist/browser/components/wallet/table/cells/lib/index.d.mts +1 -1
- package/dist/browser/components/wallet/table/cells/lib/index.d.mts.map +1 -1
- package/dist/browser/components/wallet/table/cells/lib/index.d.ts +1 -1
- package/dist/browser/components/wallet/table/cells/lib/index.d.ts.map +1 -1
- package/dist/browser/components/wallet/table/hooks/index.d.cts +1 -1
- package/dist/browser/components/wallet/table/hooks/index.d.cts.map +1 -1
- package/dist/browser/components/wallet/table/hooks/index.d.mts +1 -1
- package/dist/browser/components/wallet/table/hooks/index.d.mts.map +1 -1
- package/dist/browser/components/wallet/table/hooks/index.d.ts +1 -1
- package/dist/browser/components/wallet/table/hooks/index.d.ts.map +1 -1
- package/dist/browser/components/wallet/table/hooks/useActiveProviderDialogState.d.cts +1 -1
- package/dist/browser/components/wallet/table/hooks/useActiveProviderDialogState.d.mts +1 -1
- package/dist/browser/components/wallet/table/hooks/useActiveProviderDialogState.d.ts +1 -1
- package/dist/browser/components/wallet/table/index.d.cts +4 -4
- package/dist/browser/components/wallet/table/index.d.cts.map +1 -1
- package/dist/browser/components/wallet/table/index.d.mts +4 -4
- package/dist/browser/components/wallet/table/index.d.mts.map +1 -1
- package/dist/browser/components/wallet/table/index.d.ts +4 -4
- package/dist/browser/components/wallet/table/index.d.ts.map +1 -1
- package/dist/browser/hooks/index.d.cts +2 -2
- package/dist/browser/hooks/index.d.cts.map +1 -1
- package/dist/browser/hooks/index.d.mts +2 -2
- package/dist/browser/hooks/index.d.mts.map +1 -1
- package/dist/browser/hooks/index.d.ts +2 -2
- package/dist/browser/hooks/index.d.ts.map +1 -1
- package/dist/browser/hooks/useDetectWallets.d.cts.map +1 -1
- package/dist/browser/hooks/useDetectWallets.d.mts.map +1 -1
- package/dist/browser/hooks/useDetectWallets.d.ts.map +1 -1
- package/dist/browser/hooks/useEnabledWallets.d.cts +1 -1
- package/dist/browser/hooks/useEnabledWallets.d.mts +1 -1
- package/dist/browser/hooks/useEnabledWallets.d.ts +1 -1
- package/dist/browser/index.cjs +339 -260
- package/dist/browser/index.cjs.map +1 -1
- package/dist/browser/index.d.cts +3 -3
- package/dist/browser/index.d.mts +3 -3
- package/dist/browser/index.d.ts +3 -3
- package/dist/browser/index.mjs +623 -0
- package/dist/browser/index.mjs.map +1 -0
- package/dist/neutral/classes/index.d.cts +1 -1
- package/dist/neutral/classes/index.d.mts +1 -1
- package/dist/neutral/classes/index.d.ts +1 -1
- package/dist/neutral/components/ConnectedAccountsFlexbox.d.cts +2 -1
- package/dist/neutral/components/ConnectedAccountsFlexbox.d.cts.map +1 -1
- package/dist/neutral/components/ConnectedAccountsFlexbox.d.mts +2 -1
- package/dist/neutral/components/ConnectedAccountsFlexbox.d.mts.map +1 -1
- package/dist/neutral/components/ConnectedAccountsFlexbox.d.ts +2 -1
- package/dist/neutral/components/ConnectedAccountsFlexbox.d.ts.map +1 -1
- package/dist/neutral/components/index.d.cts +2 -2
- package/dist/neutral/components/index.d.cts.map +1 -1
- package/dist/neutral/components/index.d.mts +2 -2
- package/dist/neutral/components/index.d.mts.map +1 -1
- package/dist/neutral/components/index.d.ts +2 -2
- package/dist/neutral/components/index.d.ts.map +1 -1
- package/dist/neutral/components/wallet/dialogs/connect/CheckboxFormControl.d.cts +1 -0
- package/dist/neutral/components/wallet/dialogs/connect/CheckboxFormControl.d.cts.map +1 -1
- package/dist/neutral/components/wallet/dialogs/connect/CheckboxFormControl.d.mts +1 -0
- package/dist/neutral/components/wallet/dialogs/connect/CheckboxFormControl.d.mts.map +1 -1
- package/dist/neutral/components/wallet/dialogs/connect/CheckboxFormControl.d.ts +1 -0
- package/dist/neutral/components/wallet/dialogs/connect/CheckboxFormControl.d.ts.map +1 -1
- package/dist/neutral/components/wallet/dialogs/connect/Dialog.d.cts +2 -1
- package/dist/neutral/components/wallet/dialogs/connect/Dialog.d.cts.map +1 -1
- package/dist/neutral/components/wallet/dialogs/connect/Dialog.d.mts +2 -1
- package/dist/neutral/components/wallet/dialogs/connect/Dialog.d.mts.map +1 -1
- package/dist/neutral/components/wallet/dialogs/connect/Dialog.d.ts +2 -1
- package/dist/neutral/components/wallet/dialogs/connect/Dialog.d.ts.map +1 -1
- package/dist/neutral/components/wallet/dialogs/connect/LinkedProvidersFlexbox.d.cts +1 -0
- package/dist/neutral/components/wallet/dialogs/connect/LinkedProvidersFlexbox.d.cts.map +1 -1
- package/dist/neutral/components/wallet/dialogs/connect/LinkedProvidersFlexbox.d.mts +1 -0
- package/dist/neutral/components/wallet/dialogs/connect/LinkedProvidersFlexbox.d.mts.map +1 -1
- package/dist/neutral/components/wallet/dialogs/connect/LinkedProvidersFlexbox.d.ts +1 -0
- package/dist/neutral/components/wallet/dialogs/connect/LinkedProvidersFlexbox.d.ts.map +1 -1
- package/dist/neutral/components/wallet/dialogs/connect/Permissions.d.cts +1 -0
- package/dist/neutral/components/wallet/dialogs/connect/Permissions.d.cts.map +1 -1
- package/dist/neutral/components/wallet/dialogs/connect/Permissions.d.mts +1 -0
- package/dist/neutral/components/wallet/dialogs/connect/Permissions.d.mts.map +1 -1
- package/dist/neutral/components/wallet/dialogs/connect/Permissions.d.ts +1 -0
- package/dist/neutral/components/wallet/dialogs/connect/Permissions.d.ts.map +1 -1
- package/dist/neutral/components/wallet/dialogs/connect/index.d.cts +2 -2
- package/dist/neutral/components/wallet/dialogs/connect/index.d.cts.map +1 -1
- package/dist/neutral/components/wallet/dialogs/connect/index.d.mts +2 -2
- package/dist/neutral/components/wallet/dialogs/connect/index.d.mts.map +1 -1
- package/dist/neutral/components/wallet/dialogs/connect/index.d.ts +2 -2
- package/dist/neutral/components/wallet/dialogs/connect/index.d.ts.map +1 -1
- package/dist/neutral/components/wallet/dialogs/index.d.cts +2 -2
- package/dist/neutral/components/wallet/dialogs/index.d.mts +2 -2
- package/dist/neutral/components/wallet/dialogs/index.d.ts +2 -2
- package/dist/neutral/components/wallet/dialogs/revoke/Dialog.d.cts +2 -1
- package/dist/neutral/components/wallet/dialogs/revoke/Dialog.d.cts.map +1 -1
- package/dist/neutral/components/wallet/dialogs/revoke/Dialog.d.mts +2 -1
- package/dist/neutral/components/wallet/dialogs/revoke/Dialog.d.mts.map +1 -1
- package/dist/neutral/components/wallet/dialogs/revoke/Dialog.d.ts +2 -1
- package/dist/neutral/components/wallet/dialogs/revoke/Dialog.d.ts.map +1 -1
- package/dist/neutral/components/wallet/dialogs/revoke/index.d.cts +1 -1
- package/dist/neutral/components/wallet/dialogs/revoke/index.d.cts.map +1 -1
- package/dist/neutral/components/wallet/dialogs/revoke/index.d.mts +1 -1
- package/dist/neutral/components/wallet/dialogs/revoke/index.d.mts.map +1 -1
- package/dist/neutral/components/wallet/dialogs/revoke/index.d.ts +1 -1
- package/dist/neutral/components/wallet/dialogs/revoke/index.d.ts.map +1 -1
- package/dist/neutral/components/wallet/index.d.cts +2 -2
- package/dist/neutral/components/wallet/index.d.mts +2 -2
- package/dist/neutral/components/wallet/index.d.ts +2 -2
- package/dist/neutral/components/wallet/lib/index.d.cts +2 -2
- package/dist/neutral/components/wallet/lib/index.d.mts +2 -2
- package/dist/neutral/components/wallet/lib/index.d.ts +2 -2
- package/dist/neutral/components/wallet/table/ConnectedWalletsTable.d.cts +1 -0
- package/dist/neutral/components/wallet/table/ConnectedWalletsTable.d.cts.map +1 -1
- package/dist/neutral/components/wallet/table/ConnectedWalletsTable.d.mts +1 -0
- package/dist/neutral/components/wallet/table/ConnectedWalletsTable.d.mts.map +1 -1
- package/dist/neutral/components/wallet/table/ConnectedWalletsTable.d.ts +1 -0
- package/dist/neutral/components/wallet/table/ConnectedWalletsTable.d.ts.map +1 -1
- package/dist/neutral/components/wallet/table/ConnectedWalletsTableRow.d.cts +2 -1
- package/dist/neutral/components/wallet/table/ConnectedWalletsTableRow.d.cts.map +1 -1
- package/dist/neutral/components/wallet/table/ConnectedWalletsTableRow.d.mts +2 -1
- package/dist/neutral/components/wallet/table/ConnectedWalletsTableRow.d.mts.map +1 -1
- package/dist/neutral/components/wallet/table/ConnectedWalletsTableRow.d.ts +2 -1
- package/dist/neutral/components/wallet/table/ConnectedWalletsTableRow.d.ts.map +1 -1
- package/dist/neutral/components/wallet/table/cells/Accounts.d.cts +2 -1
- package/dist/neutral/components/wallet/table/cells/Accounts.d.cts.map +1 -1
- package/dist/neutral/components/wallet/table/cells/Accounts.d.mts +2 -1
- package/dist/neutral/components/wallet/table/cells/Accounts.d.mts.map +1 -1
- package/dist/neutral/components/wallet/table/cells/Accounts.d.ts +2 -1
- package/dist/neutral/components/wallet/table/cells/Accounts.d.ts.map +1 -1
- package/dist/neutral/components/wallet/table/cells/Actions.d.cts +2 -1
- package/dist/neutral/components/wallet/table/cells/Actions.d.cts.map +1 -1
- package/dist/neutral/components/wallet/table/cells/Actions.d.mts +2 -1
- package/dist/neutral/components/wallet/table/cells/Actions.d.mts.map +1 -1
- package/dist/neutral/components/wallet/table/cells/Actions.d.ts +2 -1
- package/dist/neutral/components/wallet/table/cells/Actions.d.ts.map +1 -1
- package/dist/neutral/components/wallet/table/cells/Cells.d.cts +1 -1
- package/dist/neutral/components/wallet/table/cells/Cells.d.mts +1 -1
- package/dist/neutral/components/wallet/table/cells/Cells.d.ts +1 -1
- package/dist/neutral/components/wallet/table/cells/ChainName.d.cts +2 -1
- package/dist/neutral/components/wallet/table/cells/ChainName.d.cts.map +1 -1
- package/dist/neutral/components/wallet/table/cells/ChainName.d.mts +2 -1
- package/dist/neutral/components/wallet/table/cells/ChainName.d.mts.map +1 -1
- package/dist/neutral/components/wallet/table/cells/ChainName.d.ts +2 -1
- package/dist/neutral/components/wallet/table/cells/ChainName.d.ts.map +1 -1
- package/dist/neutral/components/wallet/table/cells/State.d.cts +2 -1
- package/dist/neutral/components/wallet/table/cells/State.d.cts.map +1 -1
- package/dist/neutral/components/wallet/table/cells/State.d.mts +2 -1
- package/dist/neutral/components/wallet/table/cells/State.d.mts.map +1 -1
- package/dist/neutral/components/wallet/table/cells/State.d.ts +2 -1
- package/dist/neutral/components/wallet/table/cells/State.d.ts.map +1 -1
- package/dist/neutral/components/wallet/table/cells/Wallet.d.cts +2 -1
- package/dist/neutral/components/wallet/table/cells/Wallet.d.cts.map +1 -1
- package/dist/neutral/components/wallet/table/cells/Wallet.d.mts +2 -1
- package/dist/neutral/components/wallet/table/cells/Wallet.d.mts.map +1 -1
- package/dist/neutral/components/wallet/table/cells/Wallet.d.ts +2 -1
- package/dist/neutral/components/wallet/table/cells/Wallet.d.ts.map +1 -1
- package/dist/neutral/components/wallet/table/cells/index.d.cts +6 -6
- package/dist/neutral/components/wallet/table/cells/index.d.cts.map +1 -1
- package/dist/neutral/components/wallet/table/cells/index.d.mts +6 -6
- package/dist/neutral/components/wallet/table/cells/index.d.mts.map +1 -1
- package/dist/neutral/components/wallet/table/cells/index.d.ts +6 -6
- package/dist/neutral/components/wallet/table/cells/index.d.ts.map +1 -1
- package/dist/neutral/components/wallet/table/cells/lib/index.d.cts +1 -1
- package/dist/neutral/components/wallet/table/cells/lib/index.d.cts.map +1 -1
- package/dist/neutral/components/wallet/table/cells/lib/index.d.mts +1 -1
- package/dist/neutral/components/wallet/table/cells/lib/index.d.mts.map +1 -1
- package/dist/neutral/components/wallet/table/cells/lib/index.d.ts +1 -1
- package/dist/neutral/components/wallet/table/cells/lib/index.d.ts.map +1 -1
- package/dist/neutral/components/wallet/table/hooks/index.d.cts +1 -1
- package/dist/neutral/components/wallet/table/hooks/index.d.cts.map +1 -1
- package/dist/neutral/components/wallet/table/hooks/index.d.mts +1 -1
- package/dist/neutral/components/wallet/table/hooks/index.d.mts.map +1 -1
- package/dist/neutral/components/wallet/table/hooks/index.d.ts +1 -1
- package/dist/neutral/components/wallet/table/hooks/index.d.ts.map +1 -1
- package/dist/neutral/components/wallet/table/hooks/useActiveProviderDialogState.d.cts +1 -1
- package/dist/neutral/components/wallet/table/hooks/useActiveProviderDialogState.d.mts +1 -1
- package/dist/neutral/components/wallet/table/hooks/useActiveProviderDialogState.d.ts +1 -1
- package/dist/neutral/components/wallet/table/index.d.cts +4 -4
- package/dist/neutral/components/wallet/table/index.d.cts.map +1 -1
- package/dist/neutral/components/wallet/table/index.d.mts +4 -4
- package/dist/neutral/components/wallet/table/index.d.mts.map +1 -1
- package/dist/neutral/components/wallet/table/index.d.ts +4 -4
- package/dist/neutral/components/wallet/table/index.d.ts.map +1 -1
- package/dist/neutral/hooks/index.d.cts +2 -2
- package/dist/neutral/hooks/index.d.cts.map +1 -1
- package/dist/neutral/hooks/index.d.mts +2 -2
- package/dist/neutral/hooks/index.d.mts.map +1 -1
- package/dist/neutral/hooks/index.d.ts +2 -2
- package/dist/neutral/hooks/index.d.ts.map +1 -1
- package/dist/neutral/hooks/useDetectWallets.d.cts.map +1 -1
- package/dist/neutral/hooks/useDetectWallets.d.mts.map +1 -1
- package/dist/neutral/hooks/useDetectWallets.d.ts.map +1 -1
- package/dist/neutral/hooks/useEnabledWallets.d.cts +1 -1
- package/dist/neutral/hooks/useEnabledWallets.d.mts +1 -1
- package/dist/neutral/hooks/useEnabledWallets.d.ts +1 -1
- package/dist/neutral/index.cjs +339 -260
- package/dist/neutral/index.cjs.map +1 -1
- package/dist/neutral/index.d.cts +3 -3
- package/dist/neutral/index.d.mts +3 -3
- package/dist/neutral/index.d.ts +3 -3
- package/dist/neutral/index.mjs +623 -0
- package/dist/neutral/index.mjs.map +1 -0
- package/dist/node/classes/index.d.cts +1 -1
- package/dist/node/classes/index.d.mts +1 -1
- package/dist/node/classes/index.d.ts +1 -1
- package/dist/node/components/ConnectedAccountsFlexbox.d.cts +2 -1
- package/dist/node/components/ConnectedAccountsFlexbox.d.cts.map +1 -1
- package/dist/node/components/ConnectedAccountsFlexbox.d.mts +2 -1
- package/dist/node/components/ConnectedAccountsFlexbox.d.mts.map +1 -1
- package/dist/node/components/ConnectedAccountsFlexbox.d.ts +2 -1
- package/dist/node/components/ConnectedAccountsFlexbox.d.ts.map +1 -1
- package/dist/node/components/index.d.cts +2 -2
- package/dist/node/components/index.d.cts.map +1 -1
- package/dist/node/components/index.d.mts +2 -2
- package/dist/node/components/index.d.mts.map +1 -1
- package/dist/node/components/index.d.ts +2 -2
- package/dist/node/components/index.d.ts.map +1 -1
- package/dist/node/components/wallet/dialogs/connect/CheckboxFormControl.d.cts +1 -0
- package/dist/node/components/wallet/dialogs/connect/CheckboxFormControl.d.cts.map +1 -1
- package/dist/node/components/wallet/dialogs/connect/CheckboxFormControl.d.mts +1 -0
- package/dist/node/components/wallet/dialogs/connect/CheckboxFormControl.d.mts.map +1 -1
- package/dist/node/components/wallet/dialogs/connect/CheckboxFormControl.d.ts +1 -0
- package/dist/node/components/wallet/dialogs/connect/CheckboxFormControl.d.ts.map +1 -1
- package/dist/node/components/wallet/dialogs/connect/Dialog.d.cts +2 -1
- package/dist/node/components/wallet/dialogs/connect/Dialog.d.cts.map +1 -1
- package/dist/node/components/wallet/dialogs/connect/Dialog.d.mts +2 -1
- package/dist/node/components/wallet/dialogs/connect/Dialog.d.mts.map +1 -1
- package/dist/node/components/wallet/dialogs/connect/Dialog.d.ts +2 -1
- package/dist/node/components/wallet/dialogs/connect/Dialog.d.ts.map +1 -1
- package/dist/node/components/wallet/dialogs/connect/LinkedProvidersFlexbox.d.cts +1 -0
- package/dist/node/components/wallet/dialogs/connect/LinkedProvidersFlexbox.d.cts.map +1 -1
- package/dist/node/components/wallet/dialogs/connect/LinkedProvidersFlexbox.d.mts +1 -0
- package/dist/node/components/wallet/dialogs/connect/LinkedProvidersFlexbox.d.mts.map +1 -1
- package/dist/node/components/wallet/dialogs/connect/LinkedProvidersFlexbox.d.ts +1 -0
- package/dist/node/components/wallet/dialogs/connect/LinkedProvidersFlexbox.d.ts.map +1 -1
- package/dist/node/components/wallet/dialogs/connect/Permissions.d.cts +1 -0
- package/dist/node/components/wallet/dialogs/connect/Permissions.d.cts.map +1 -1
- package/dist/node/components/wallet/dialogs/connect/Permissions.d.mts +1 -0
- package/dist/node/components/wallet/dialogs/connect/Permissions.d.mts.map +1 -1
- package/dist/node/components/wallet/dialogs/connect/Permissions.d.ts +1 -0
- package/dist/node/components/wallet/dialogs/connect/Permissions.d.ts.map +1 -1
- package/dist/node/components/wallet/dialogs/connect/index.d.cts +2 -2
- package/dist/node/components/wallet/dialogs/connect/index.d.cts.map +1 -1
- package/dist/node/components/wallet/dialogs/connect/index.d.mts +2 -2
- package/dist/node/components/wallet/dialogs/connect/index.d.mts.map +1 -1
- package/dist/node/components/wallet/dialogs/connect/index.d.ts +2 -2
- package/dist/node/components/wallet/dialogs/connect/index.d.ts.map +1 -1
- package/dist/node/components/wallet/dialogs/index.d.cts +2 -2
- package/dist/node/components/wallet/dialogs/index.d.mts +2 -2
- package/dist/node/components/wallet/dialogs/index.d.ts +2 -2
- package/dist/node/components/wallet/dialogs/revoke/Dialog.d.cts +2 -1
- package/dist/node/components/wallet/dialogs/revoke/Dialog.d.cts.map +1 -1
- package/dist/node/components/wallet/dialogs/revoke/Dialog.d.mts +2 -1
- package/dist/node/components/wallet/dialogs/revoke/Dialog.d.mts.map +1 -1
- package/dist/node/components/wallet/dialogs/revoke/Dialog.d.ts +2 -1
- package/dist/node/components/wallet/dialogs/revoke/Dialog.d.ts.map +1 -1
- package/dist/node/components/wallet/dialogs/revoke/index.d.cts +1 -1
- package/dist/node/components/wallet/dialogs/revoke/index.d.cts.map +1 -1
- package/dist/node/components/wallet/dialogs/revoke/index.d.mts +1 -1
- package/dist/node/components/wallet/dialogs/revoke/index.d.mts.map +1 -1
- package/dist/node/components/wallet/dialogs/revoke/index.d.ts +1 -1
- package/dist/node/components/wallet/dialogs/revoke/index.d.ts.map +1 -1
- package/dist/node/components/wallet/index.d.cts +2 -2
- package/dist/node/components/wallet/index.d.mts +2 -2
- package/dist/node/components/wallet/index.d.ts +2 -2
- package/dist/node/components/wallet/lib/index.d.cts +2 -2
- package/dist/node/components/wallet/lib/index.d.mts +2 -2
- package/dist/node/components/wallet/lib/index.d.ts +2 -2
- package/dist/node/components/wallet/table/ConnectedWalletsTable.d.cts +1 -0
- package/dist/node/components/wallet/table/ConnectedWalletsTable.d.cts.map +1 -1
- package/dist/node/components/wallet/table/ConnectedWalletsTable.d.mts +1 -0
- package/dist/node/components/wallet/table/ConnectedWalletsTable.d.mts.map +1 -1
- package/dist/node/components/wallet/table/ConnectedWalletsTable.d.ts +1 -0
- package/dist/node/components/wallet/table/ConnectedWalletsTable.d.ts.map +1 -1
- package/dist/node/components/wallet/table/ConnectedWalletsTableRow.d.cts +2 -1
- package/dist/node/components/wallet/table/ConnectedWalletsTableRow.d.cts.map +1 -1
- package/dist/node/components/wallet/table/ConnectedWalletsTableRow.d.mts +2 -1
- package/dist/node/components/wallet/table/ConnectedWalletsTableRow.d.mts.map +1 -1
- package/dist/node/components/wallet/table/ConnectedWalletsTableRow.d.ts +2 -1
- package/dist/node/components/wallet/table/ConnectedWalletsTableRow.d.ts.map +1 -1
- package/dist/node/components/wallet/table/cells/Accounts.d.cts +2 -1
- package/dist/node/components/wallet/table/cells/Accounts.d.cts.map +1 -1
- package/dist/node/components/wallet/table/cells/Accounts.d.mts +2 -1
- package/dist/node/components/wallet/table/cells/Accounts.d.mts.map +1 -1
- package/dist/node/components/wallet/table/cells/Accounts.d.ts +2 -1
- package/dist/node/components/wallet/table/cells/Accounts.d.ts.map +1 -1
- package/dist/node/components/wallet/table/cells/Actions.d.cts +2 -1
- package/dist/node/components/wallet/table/cells/Actions.d.cts.map +1 -1
- package/dist/node/components/wallet/table/cells/Actions.d.mts +2 -1
- package/dist/node/components/wallet/table/cells/Actions.d.mts.map +1 -1
- package/dist/node/components/wallet/table/cells/Actions.d.ts +2 -1
- package/dist/node/components/wallet/table/cells/Actions.d.ts.map +1 -1
- package/dist/node/components/wallet/table/cells/Cells.d.cts +1 -1
- package/dist/node/components/wallet/table/cells/Cells.d.mts +1 -1
- package/dist/node/components/wallet/table/cells/Cells.d.ts +1 -1
- package/dist/node/components/wallet/table/cells/ChainName.d.cts +2 -1
- package/dist/node/components/wallet/table/cells/ChainName.d.cts.map +1 -1
- package/dist/node/components/wallet/table/cells/ChainName.d.mts +2 -1
- package/dist/node/components/wallet/table/cells/ChainName.d.mts.map +1 -1
- package/dist/node/components/wallet/table/cells/ChainName.d.ts +2 -1
- package/dist/node/components/wallet/table/cells/ChainName.d.ts.map +1 -1
- package/dist/node/components/wallet/table/cells/State.d.cts +2 -1
- package/dist/node/components/wallet/table/cells/State.d.cts.map +1 -1
- package/dist/node/components/wallet/table/cells/State.d.mts +2 -1
- package/dist/node/components/wallet/table/cells/State.d.mts.map +1 -1
- package/dist/node/components/wallet/table/cells/State.d.ts +2 -1
- package/dist/node/components/wallet/table/cells/State.d.ts.map +1 -1
- package/dist/node/components/wallet/table/cells/Wallet.d.cts +2 -1
- package/dist/node/components/wallet/table/cells/Wallet.d.cts.map +1 -1
- package/dist/node/components/wallet/table/cells/Wallet.d.mts +2 -1
- package/dist/node/components/wallet/table/cells/Wallet.d.mts.map +1 -1
- package/dist/node/components/wallet/table/cells/Wallet.d.ts +2 -1
- package/dist/node/components/wallet/table/cells/Wallet.d.ts.map +1 -1
- package/dist/node/components/wallet/table/cells/index.d.cts +6 -6
- package/dist/node/components/wallet/table/cells/index.d.cts.map +1 -1
- package/dist/node/components/wallet/table/cells/index.d.mts +6 -6
- package/dist/node/components/wallet/table/cells/index.d.mts.map +1 -1
- package/dist/node/components/wallet/table/cells/index.d.ts +6 -6
- package/dist/node/components/wallet/table/cells/index.d.ts.map +1 -1
- package/dist/node/components/wallet/table/cells/lib/index.d.cts +1 -1
- package/dist/node/components/wallet/table/cells/lib/index.d.cts.map +1 -1
- package/dist/node/components/wallet/table/cells/lib/index.d.mts +1 -1
- package/dist/node/components/wallet/table/cells/lib/index.d.mts.map +1 -1
- package/dist/node/components/wallet/table/cells/lib/index.d.ts +1 -1
- package/dist/node/components/wallet/table/cells/lib/index.d.ts.map +1 -1
- package/dist/node/components/wallet/table/hooks/index.d.cts +1 -1
- package/dist/node/components/wallet/table/hooks/index.d.cts.map +1 -1
- package/dist/node/components/wallet/table/hooks/index.d.mts +1 -1
- package/dist/node/components/wallet/table/hooks/index.d.mts.map +1 -1
- package/dist/node/components/wallet/table/hooks/index.d.ts +1 -1
- package/dist/node/components/wallet/table/hooks/index.d.ts.map +1 -1
- package/dist/node/components/wallet/table/hooks/useActiveProviderDialogState.d.cts +1 -1
- package/dist/node/components/wallet/table/hooks/useActiveProviderDialogState.d.mts +1 -1
- package/dist/node/components/wallet/table/hooks/useActiveProviderDialogState.d.ts +1 -1
- package/dist/node/components/wallet/table/index.d.cts +4 -4
- package/dist/node/components/wallet/table/index.d.cts.map +1 -1
- package/dist/node/components/wallet/table/index.d.mts +4 -4
- package/dist/node/components/wallet/table/index.d.mts.map +1 -1
- package/dist/node/components/wallet/table/index.d.ts +4 -4
- package/dist/node/components/wallet/table/index.d.ts.map +1 -1
- package/dist/node/hooks/index.d.cts +2 -2
- package/dist/node/hooks/index.d.cts.map +1 -1
- package/dist/node/hooks/index.d.mts +2 -2
- package/dist/node/hooks/index.d.mts.map +1 -1
- package/dist/node/hooks/index.d.ts +2 -2
- package/dist/node/hooks/index.d.ts.map +1 -1
- package/dist/node/hooks/useDetectWallets.d.cts.map +1 -1
- package/dist/node/hooks/useDetectWallets.d.mts.map +1 -1
- package/dist/node/hooks/useDetectWallets.d.ts.map +1 -1
- package/dist/node/hooks/useEnabledWallets.d.cts +1 -1
- package/dist/node/hooks/useEnabledWallets.d.mts +1 -1
- package/dist/node/hooks/useEnabledWallets.d.ts +1 -1
- package/dist/node/index.cjs +346 -268
- package/dist/node/index.cjs.map +1 -1
- package/dist/node/index.d.cts +3 -3
- package/dist/node/index.d.mts +3 -3
- package/dist/node/index.d.ts +3 -3
- package/dist/node/index.mjs +633 -0
- package/dist/node/index.mjs.map +1 -0
- package/package.json +11 -11
- package/src/classes/EnabledWallets.ts +1 -1
- package/src/classes/index.ts +1 -1
- package/src/components/ConnectedAccountsFlexbox.stories.tsx +2 -4
- package/src/components/ConnectedAccountsFlexbox.tsx +13 -9
- package/src/components/index.ts +2 -2
- package/src/components/wallet/dialogs/connect/CheckboxFormControl.tsx +1 -0
- package/src/components/wallet/dialogs/connect/Dialog.tsx +5 -4
- package/src/components/wallet/dialogs/connect/LinkedProvidersFlexbox.tsx +4 -3
- package/src/components/wallet/dialogs/connect/Permissions.tsx +3 -1
- package/src/components/wallet/dialogs/connect/index.ts +2 -2
- package/src/components/wallet/dialogs/index.ts +2 -2
- package/src/components/wallet/dialogs/revoke/Dialog.tsx +13 -4
- package/src/components/wallet/dialogs/revoke/index.ts +1 -1
- package/src/components/wallet/index.ts +2 -2
- package/src/components/wallet/lib/index.ts +2 -2
- package/src/components/wallet/table/ConnectedWalletsTable.tsx +6 -6
- package/src/components/wallet/table/ConnectedWalletsTableRow.tsx +3 -3
- package/src/components/wallet/table/cells/Accounts.tsx +2 -1
- package/src/components/wallet/table/cells/Actions.tsx +21 -15
- package/src/components/wallet/table/cells/Cells.tsx +6 -6
- package/src/components/wallet/table/cells/ChainName.tsx +2 -1
- package/src/components/wallet/table/cells/State.tsx +4 -3
- package/src/components/wallet/table/cells/Wallet.tsx +2 -1
- package/src/components/wallet/table/cells/index.ts +6 -6
- package/src/components/wallet/table/cells/lib/index.ts +1 -1
- package/src/components/wallet/table/hooks/index.ts +1 -1
- package/src/components/wallet/table/hooks/useActiveProviderDialogState.tsx +1 -1
- package/src/components/wallet/table/index.ts +4 -4
- package/src/hooks/index.ts +2 -2
- package/src/hooks/useDetectWallets.tsx +2 -1
- package/src/hooks/useEnabledWallets.tsx +1 -1
- package/src/index.ts +3 -3
- package/dist/browser/index.js +0 -542
- package/dist/browser/index.js.map +0 -1
- package/dist/neutral/index.js +0 -542
- package/dist/neutral/index.js.map +0 -1
- package/dist/node/index.js +0 -553
- package/dist/node/index.js.map +0 -1
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"sources":["../../src/classes/EnabledWallets.ts","../../src/components/ConnectedAccountsFlexbox.tsx","../../src/hooks/useDetectWallets.tsx","../../src/hooks/useEnabledWallets.tsx","../../src/components/wallet/dialogs/connect/CheckboxFormControl.tsx","../../src/components/wallet/dialogs/connect/Dialog.tsx","../../src/components/wallet/dialogs/connect/LinkedProvidersFlexbox.tsx","../../src/img/index.ts","../../src/components/wallet/dialogs/connect/Permissions.tsx","../../src/components/wallet/dialogs/revoke/Dialog.tsx","../../src/components/wallet/table/cells/Accounts.tsx","../../src/components/wallet/table/cells/Actions.tsx","../../src/components/wallet/table/cells/ChainName.tsx","../../src/components/wallet/table/cells/State.tsx","../../src/components/wallet/table/cells/Wallet.tsx","../../src/components/wallet/table/cells/Cells.tsx","../../src/components/wallet/table/ConnectedWalletsTable.tsx","../../src/components/wallet/lib/TableHeadData.ts","../../src/components/wallet/table/ConnectedWalletsTableRow.tsx","../../src/components/wallet/table/hooks/useActiveProviderDialogState.tsx"],"sourcesContent":["import { DiscoveredWallets, EIP6963Connector } from '@xylabs/react-crypto'\n\nconst DEFAULT_LOCAL_STORAGE_KEY = 'XYO|EnabledWallets'\n\n/**\n * State for storing wallets and their enabled/disabled status by name\n */\nexport interface EnabledEthWalletsState {\n [rdns: string]: {\n enabled: boolean\n wallet: EIP6963Connector\n }\n}\n\n/**\n * State for storing only enabled/disabled status of a wallet by name\n */\nexport interface EnabledWalletsSavedState {\n [rdns: string]: boolean\n}\n\nexport type WalletListener = () => void\n\nexport class EnabledEthWalletConnections {\n // control whether or not enabled/disabled preferences are persisted (i.e. in localStorage)\n persistPreferences = true\n\n // Map of wallet names and their enabled/disabled state\n private enabledWallets: EnabledWalletsSavedState = {}\n\n // Map of wallet names, their enabled/disabled state, and their wallet class\n private ethWalletsState: EnabledEthWalletsState = {}\n\n // list of listeners that want to be notified on wallet changes\n private listeners: WalletListener[] = []\n\n // key to use in localStorage when persisting preferences\n private localStorageKey = DEFAULT_LOCAL_STORAGE_KEY\n\n constructor(localStorageKey = DEFAULT_LOCAL_STORAGE_KEY) {\n this.localStorageKey = localStorageKey\n this.reviveSettings()\n }\n\n get wallets() {\n return this.ethWalletsState\n }\n\n disableWallet(rdns: string) {\n this.toggleEnabledWallet(rdns, false)\n }\n\n enableWallet(rdns: string) {\n this.toggleEnabledWallet(rdns, true)\n }\n\n /**\n * Given a new set of wallets, set their enabled state based off previous preferences\n */\n resetWallets(wallets: DiscoveredWallets) {\n const newWallets: EnabledEthWalletsState = {}\n\n const addWallet = ([walletName, wallet]: [string, EIP6963Connector]) => {\n newWallets[walletName] = {\n // preserve the existing enabled state\n enabled: walletName in this.enabledWallets ? this.enabledWallets[walletName] : true,\n wallet,\n }\n }\n\n // eslint-disable-next-line unicorn/no-array-for-each\n Object.entries(wallets).forEach(addWallet.bind(this))\n this.ethWalletsState = newWallets\n this.emitChange()\n }\n\n subscribe(listener: WalletListener) {\n this.listeners = [...this.listeners, listener]\n return () => {\n this.listeners = this.listeners.filter((existingListener) => existingListener !== listener)\n }\n }\n\n toggleEnabledWallet(rdns: string, enabled: boolean) {\n if (rdns && this.ethWalletsState[rdns]) {\n this.ethWalletsState[rdns].enabled = enabled\n this.ethWalletsState = { ...this.ethWalletsState }\n this.emitChange()\n }\n }\n\n private emitChange() {\n for (const listener of this.listeners) {\n listener()\n }\n\n this.persistSettings()\n }\n\n private isPersistance(method: () => void) {\n if (this.persistPreferences) {\n method()\n }\n }\n\n private persistSettings() {\n this.isPersistance(() => {\n // convert wallet enabled selections into serializable state\n // eslint-disable-next-line unicorn/no-array-reduce\n const enabledWallets = Object.entries(this.ethWalletsState).reduce((acc, [rdns, { enabled }]) => {\n acc[rdns] = enabled\n return acc\n }, {} as EnabledWalletsSavedState)\n\n localStorage.setItem(this.localStorageKey, JSON.stringify(enabledWallets))\n })\n }\n\n private reviveSettings() {\n this.isPersistance(() => {\n const existingEntries = localStorage.getItem(this.localStorageKey)\n try {\n const entries = existingEntries ? JSON.parse(existingEntries) : {}\n this.enabledWallets = entries\n } catch (e) {\n console.warn(`Error parsing saved enabled wallet entries: ${(e as Error).message}`)\n }\n })\n }\n}\n","import { Typography, useTheme } from '@mui/material'\nimport { FlexBoxProps, FlexCol } from '@xylabs/react-flexbox'\nimport { forwardRef } from 'react'\n\nimport { useDetectedWallets } from '../hooks/index.js'\nimport { ConnectedWalletsTable } from './wallet/index.js'\n\nexport interface ConnectedAccountsFlexboxProps extends FlexBoxProps {\n ignoreConnectDialog?: boolean\n // A callback that is invoked when the option to ignore the dialog is checked\n onIgnoreConnectDialog?: (checked: boolean) => void\n}\n\nexport const ConnectedAccountsFlexbox = forwardRef<HTMLDivElement, ConnectedAccountsFlexboxProps>(\n ({ ignoreConnectDialog, onIgnoreConnectDialog, ...props }, ref) => {\n const theme = useTheme()\n\n const { totalConnectedAccounts, sortedWallets } = useDetectedWallets()\n\n return (\n <FlexCol alignItems=\"stretch\" justifyContent=\"start\" gap={2} ref={ref} {...props}>\n <FlexCol alignItems=\"start\">\n <Typography variant={'h2'} sx={{ mb: 0.5 }}>\n Detected Web3 Wallets\n </Typography>\n {totalConnectedAccounts ?\n <Typography variant={'subtitle1'} color={theme.palette.secondary.main} sx={{ opacity: 0.5 }}>\n Total Connected Accounts: {totalConnectedAccounts}\n </Typography>\n : null}\n </FlexCol>\n <ConnectedWalletsTable wallets={sortedWallets} ignoreConnectDialog={ignoreConnectDialog} onIgnoreConnectDialog={onIgnoreConnectDialog} />\n </FlexCol>\n )\n },\n)\n\nConnectedAccountsFlexbox.displayName = 'ConnectedAccountsFlexbox'\n","import { AccountsChangedEventName, DiscoveredWallets, EIP6963Connector, useWalletDiscovery } from '@xylabs/react-crypto'\nimport { useEffect, useMemo, useState } from 'react'\n\nconst sortWallets = (wallets: DiscoveredWallets) =>\n // eslint-disable-next-line unicorn/no-array-reduce\n Object.values(wallets).reduce((acc, wallet) => {\n wallet.allowedAccounts.length > 0 ? acc.unshift(wallet) : acc.push(wallet)\n return acc\n }, [] as EIP6963Connector[])\n\nexport const useDetectedWallets = () => {\n const wallets = useWalletDiscovery()\n const [refresh, setRefresh] = useState(0)\n const [sortedWallets, setSortedWallets] = useState<EIP6963Connector[]>([])\n\n useEffect(() => {\n setSortedWallets(sortWallets(wallets))\n }, [wallets, refresh])\n\n /**\n * Rely on custom events from the wallet base class to know when accounts are changed.\n * This approach prevents the need to loop through all wallets and set up individual listeners.\n */\n useEffect(() => {\n const listener: (event: CustomEventInit) => void = () => {\n setRefresh((refresh) => refresh + 1)\n }\n window.addEventListener(AccountsChangedEventName, listener)\n\n return () => {\n window.removeEventListener(AccountsChangedEventName, listener)\n }\n }, [wallets])\n\n const totalConnectedAccounts = useMemo(\n () => Object.values(sortedWallets).reduce((acc, wallet) => acc + wallet.allowedAccounts.length, 0),\n [sortedWallets],\n )\n\n return { sortedWallets, totalConnectedAccounts }\n}\n","import { useWalletDiscovery } from '@xylabs/react-crypto'\nimport { useMemo, useSyncExternalStore } from 'react'\n\nimport { EnabledEthWalletConnections, EnabledEthWalletsState, EnabledWalletsSavedState } from '../classes/index.js'\n\nlet enabledEthWallets: EnabledEthWalletConnections | undefined\n\n/**\n * Takes the discovered wallets and tracks their enabled state globally\n */\nexport const useEnabledWalletsInner = (enabledWalletsRdns?: EnabledWalletsSavedState) => {\n const discoveredWallets = useWalletDiscovery()\n\n // when we discover new wallets, build their enabled state\n const wallets = useMemo(() => {\n if (enabledEthWallets === undefined) enabledEthWallets = new EnabledEthWalletConnections()\n enabledEthWallets.resetWallets(discoveredWallets)\n for (const [rdns, enabled] of Object.entries(enabledWalletsRdns ?? {})) enabledEthWallets?.toggleEnabledWallet(rdns, enabled)\n return enabledEthWallets\n }, [discoveredWallets, enabledWalletsRdns])\n\n return useSyncExternalStore(wallets.subscribe.bind(wallets), () => wallets.wallets)\n}\n\n/**\n * Expose an interface for enabling and disabling wallets\n */\nexport const useEnabledWallets = (enabledWalletsRdns?: EnabledWalletsSavedState) => {\n const wallets = useEnabledWalletsInner(enabledWalletsRdns)\n const enabledWallets = useMemo(\n () =>\n // eslint-disable-next-line unicorn/no-array-reduce\n Object.entries(wallets).reduce((acc, [walletName, wallet]) => {\n if (wallet.enabled) acc[walletName] = wallet\n return acc\n }, {} as EnabledEthWalletsState),\n [wallets],\n )\n\n return {\n disableWallet: enabledEthWallets?.disableWallet.bind(enabledEthWallets),\n enableWallet: enabledEthWallets?.enableWallet.bind(enabledEthWallets),\n enabledWallets,\n wallets,\n }\n}\n","import { Checkbox, FormControl, FormControlProps, FormLabel } from '@mui/material'\n\nexport interface CheckboxFormControlProps extends FormControlProps {\n onCheckChanged?: (checked: boolean) => void\n}\n\nexport const CheckboxFormControl: React.FC<CheckboxFormControlProps> = ({ onCheckChanged, ...props }) => {\n return (\n <FormControl {...props}>\n <FormLabel>\n <Checkbox onChange={(_, checked) => onCheckChanged?.(checked)} />\n Do not show this again.\n </FormLabel>\n </FormControl>\n )\n}\n","import { Button, Dialog, DialogActions, DialogContent, DialogProps, DialogTitle } from '@mui/material'\n\nimport { ActiveProvider } from '../../lib/index.js'\nimport { CheckboxFormControl } from './CheckboxFormControl.js'\nimport { LinkedProvidersFlexbox } from './LinkedProvidersFlexbox.js'\nimport { WalletPermissionsFlexbox } from './Permissions.js'\n\nexport interface ConnectWalletDialogProps extends DialogProps {\n activeProvider?: ActiveProvider\n onIgnoreConnectDialog?: (checked: boolean) => void\n}\n\nexport const ConnectWalletDialog: React.FC<ConnectWalletDialogProps> = ({ activeProvider, onIgnoreConnectDialog, ...props }) => {\n const { icon, providerName } = activeProvider ?? {}\n\n const onConnect = async () => {\n try {\n await activeProvider?.connectWallet?.()\n props.onClose?.({}, 'escapeKeyDown')\n } catch (e) {\n console.warn(`Error connecting to wallet: ${(e as Error).message}`)\n }\n }\n\n return (\n <Dialog PaperProps={{ sx: { display: 'flex', gap: 4 } }} {...props}>\n <DialogTitle sx={{ textAlign: 'center' }}>XYO Wants To Access The Blockchain on Your Behalf</DialogTitle>\n <DialogContent sx={{ display: 'flex', flexDirection: 'column', gap: 4 }}>\n <LinkedProvidersFlexbox icon={icon} providerName={providerName} />\n <WalletPermissionsFlexbox />\n <CheckboxFormControl onCheckChanged={onIgnoreConnectDialog} />\n </DialogContent>\n <DialogActions>\n <Button variant=\"outlined\" onClick={() => props.onClose?.({}, 'escapeKeyDown')}>\n Close\n </Button>\n <Button variant=\"contained\" onClick={onConnect}>\n Connect\n </Button>\n </DialogActions>\n </Dialog>\n )\n}\n","import { SyncAlt } from '@mui/icons-material'\nimport { Typography } from '@mui/material'\nimport { ConstrainedImage } from '@xylabs/react-crypto'\nimport { FlexBoxProps, FlexCol, FlexRow } from '@xylabs/react-flexbox'\n\nimport { xyoColorLogo } from '../../../../img/index.js'\n\nexport interface LinkedProvidersFlexboxProps extends FlexBoxProps {\n icon?: string\n providerName?: string\n}\n\nexport const LinkedProvidersFlexbox: React.FC<LinkedProvidersFlexboxProps> = ({ icon, providerName, ...props }) => {\n return (\n <FlexRow gap={4} justifyContent=\"space-evenly\" {...props}>\n <FlexCol gap={0.5}>\n <img alt=\"XYO Logo\" src={xyoColorLogo} style={{ height: '48px' }} />\n <Typography variant=\"subtitle1\">XYO App</Typography>\n </FlexCol>\n <SyncAlt fontSize={'large'} />\n <FlexCol gap={0.5}>\n <ConstrainedImage constrainedValue={'48px'} src={icon} alt={providerName} style={{ height: '48px', maxWidth: '48px' }} />\n <Typography variant=\"subtitle1\">{providerName}</Typography>\n </FlexCol>\n </FlexRow>\n )\n}\n","export { default as xyoColorLogo } from './xyo-color-logo.svg'\nexport { default as xyoColorLogoText } from './xyo-color-logo-text-only.svg'\n","import { Link, Typography } from '@mui/material'\nimport { FlexBoxProps, FlexCol } from '@xylabs/react-flexbox'\n\nexport interface WalletPermissionsFlexBoxProps extends FlexBoxProps {}\n\nexport const WalletPermissionsFlexbox: React.FC<WalletPermissionsFlexBoxProps> = (props) => {\n return (\n <FlexCol gap={4} {...props}>\n <Typography fontWeight=\"bold\" sx={{ textAlign: 'center' }}>\n This will allow XYO to:\n </Typography>\n <ul>\n <li>View your wallet account(s) and address(es)</li>\n <li>Read-only access to browse the public blockchain(s) you select</li>\n </ul>\n <Typography variant=\"subtitle1\" sx={{ textAlign: 'center' }}>\n 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\n more on XYO's sovereign data philosophy{' '}\n <Link\n href=\"https://cointelegraph.com/innovation-circle/decentralization-and-sovereignty-debunking-our-approach-to-digital-sovereignty\"\n sx={{ fontWeight: 'bold' }}\n target=\"_blank\"\n >\n here\n </Link>\n .\n </Typography>\n </FlexCol>\n )\n}\n","import { Button, Dialog, DialogActions, DialogContent, DialogProps, DialogTitle, Typography } from '@mui/material'\nimport { ConstrainedImage } from '@xylabs/react-crypto'\nimport { FlexRow } from '@xylabs/react-flexbox'\n\nimport { ActiveProvider } from '../../lib/index.js'\n\nexport interface RevokeWalletConnectionDialogProps extends DialogProps {\n activeProvider?: ActiveProvider\n}\n\nexport const RevokeWalletConnectionDialog: React.FC<RevokeWalletConnectionDialogProps> = ({ activeProvider, ...props }) => {\n return (\n <Dialog {...props}>\n <FlexRow gap={2} justifyContent=\"start\" pl={2}>\n <ConstrainedImage src={activeProvider?.icon} constrainedValue={'24px'} />\n <DialogTitle sx={{ pl: 0 }}>Revoke {activeProvider?.providerName} Access</DialogTitle>\n </FlexRow>\n <DialogContent>\n <Typography>\n Revoking access to your wallet must be done from the wallet's browser extension. Wallets grant access to specific domains please\n consult {activeProvider?.providerName}'s documentation on how to revoke access to this website:\n </Typography>\n <Typography>{window.location.origin}</Typography>\n </DialogContent>\n <DialogActions>\n <Button variant=\"contained\" onClick={() => props.onClose?.({}, 'escapeKeyDown')}>\n Close\n </Button>\n </DialogActions>\n </Dialog>\n )\n}\n","import { TableCell, Tooltip, Typography } from '@mui/material'\n\nimport { ConnectedWalletTableCellProps } from './lib/index.js'\n\nexport const ConnectedWalletsAccountsTableCell: React.FC<ConnectedWalletTableCellProps> = ({\n additionalAccounts,\n currentAccount,\n totalAccounts,\n tableCellProps,\n}) => {\n return (\n <TableCell {...tableCellProps}>\n <Tooltip\n sx={{ cursor: totalAccounts > 0 ? 'pointer' : 'auto' }}\n title={[...(currentAccount ?? []), ...(additionalAccounts ?? [])].map((address, index) => (\n <p key={index}>{address}</p>\n ))}\n >\n <Typography>{totalAccounts}</Typography>\n </Tooltip>\n </TableCell>\n )\n}\n","import { Check, InfoOutlined } from '@mui/icons-material'\nimport { Button, IconButton, TableCell, Typography } from '@mui/material'\nimport { FlexRow } from '@xylabs/react-flexbox'\n\nimport { ConnectedWalletTableCellProps } from './lib/index.js'\n\nexport const ConnectedWalletsActionsTableCell: React.FC<ConnectedWalletTableCellProps> = ({ connected, onConnect, onRevoke, tableCellProps }) => {\n return (\n <TableCell {...tableCellProps}>\n <FlexRow gap={2} justifyContent=\"start\">\n {connected ?\n <Typography sx={{ display: 'inline-flex', gap: 0.5 }}>\n <Check />\n Connected\n </Typography>\n : <Button variant={'contained'} onClick={onConnect}>\n Connect\n </Button>\n }\n {connected ?\n <IconButton onClick={onRevoke}>\n <InfoOutlined />\n </IconButton>\n : null}\n </FlexRow>\n </TableCell>\n )\n}\n","import { TableCell } from '@mui/material'\n\nimport { ConnectedWalletTableCellProps } from './lib/index.js'\n\nexport const ConnectedWalletsChainNameTableCell: React.FC<ConnectedWalletTableCellProps> = ({ chainName, tableCellProps }) => {\n return <TableCell {...tableCellProps}>{chainName}</TableCell>\n}\n","import { Switch, TableCell } from '@mui/material'\nimport { ChangeEvent, useMemo } from 'react'\n\nimport { useEnabledWallets } from '../../../../hooks/index.js'\nimport { ConnectedWalletTableCellProps } from './lib/index.js'\n\nexport const ConnectedWalletState: React.FC<ConnectedWalletTableCellProps> = ({ connected, walletRdns, tableCellProps }) => {\n const { disableWallet, enableWallet, wallets } = useEnabledWallets()\n\n const enabled = useMemo(() => (walletRdns ? wallets[walletRdns].enabled : false), [wallets, walletRdns])\n\n const handleClick = (event: ChangeEvent<HTMLInputElement>) => {\n const checked = event.target?.checked\n if (walletRdns) {\n checked ? enableWallet?.(walletRdns) : disableWallet?.(walletRdns)\n }\n }\n return (\n <TableCell {...tableCellProps}>\n <Switch disabled={!connected} checked={connected && enabled} onChange={handleClick} />\n </TableCell>\n )\n}\n","import { TableCell, useTheme } from '@mui/material'\nimport { ConstrainedImage } from '@xylabs/react-crypto'\nimport { FlexRow } from '@xylabs/react-flexbox'\n\nimport { ConnectedWalletTableCellProps } from './lib/index.js'\n\nexport const ConnectedWalletsWalletTableCell: React.FC<ConnectedWalletTableCellProps> = ({ icon, walletName, tableCellProps }) => {\n const theme = useTheme()\n\n return (\n <TableCell {...tableCellProps}>\n <FlexRow gap={2} justifyContent=\"start\">\n <ConstrainedImage constrainedValue={theme.spacing(4)} src={icon} />\n {walletName}\n </FlexRow>\n </TableCell>\n )\n}\n","import { ComponentType } from 'react'\n\nimport { ConnectedWalletsAccountsTableCell } from './Accounts.js'\nimport { ConnectedWalletsActionsTableCell } from './Actions.js'\nimport { ConnectedWalletsChainNameTableCell } from './ChainName.js'\nimport { ConnectedWalletTableCellProps } from './lib/index.js'\nimport { ConnectedWalletState } from './State.js'\nimport { ConnectedWalletsWalletTableCell } from './Wallet.js'\n\nexport const ConnectedWalletTableCells: ComponentType<ConnectedWalletTableCellProps>[] = [\n ConnectedWalletsWalletTableCell,\n ConnectedWalletsChainNameTableCell,\n ConnectedWalletsAccountsTableCell,\n ConnectedWalletsActionsTableCell,\n ConnectedWalletState,\n]\n","import { Table, TableBody, TableCell, TableHead, TableProps, TableRow } from '@mui/material'\nimport { EIP6963Connector } from '@xylabs/react-crypto'\nimport { useState } from 'react'\n\nimport { ConnectWalletDialog, RevokeWalletConnectionDialog } from '../dialogs/index.js'\nimport { ActiveProvider, WalletsTableHeadCells } from '../lib/index.js'\nimport { WalletConnectionsTableRow } from './ConnectedWalletsTableRow.js'\nimport { useActiveProviderDialogState } from './hooks/index.js'\n\nexport interface ConnectedWalletsTableProps extends TableProps {\n ignoreConnectDialog?: boolean\n onIgnoreConnectDialog?: (checked: boolean) => void\n wallets?: EIP6963Connector[]\n}\n\nexport const ConnectedWalletsTable: React.FC<ConnectedWalletsTableProps> = ({ ignoreConnectDialog, onIgnoreConnectDialog, wallets, ...props }) => {\n const [activeProvider, setActiveProvider] = useState<ActiveProvider>()\n const [showConnect, onSetActiveProviderConnect, onConnectClose] = useActiveProviderDialogState(setActiveProvider)\n const [showRevoke, onSetActiveProviderRevoke, onRevokeClose] = useActiveProviderDialogState(setActiveProvider)\n\n return (\n <>\n <Table {...props}>\n <TableHead>\n <TableRow>\n {WalletsTableHeadCells.map(({ disablePadding, id, label, align, width }) => (\n <TableCell align={align} key={id} padding={disablePadding ? 'none' : 'normal'} width={width ?? 'auto'}>\n {label}\n </TableCell>\n ))}\n </TableRow>\n </TableHead>\n <TableBody>\n {(wallets ?? []).map((wallet) => (\n <WalletConnectionsTableRow\n ignoreConnectDialog={ignoreConnectDialog}\n key={wallet.providerInfo?.rdns}\n onConnectClick={onSetActiveProviderConnect}\n onRevoke={onSetActiveProviderRevoke}\n wallet={wallet}\n />\n ))}\n </TableBody>\n </Table>\n <RevokeWalletConnectionDialog open={showRevoke} onClose={onRevokeClose} activeProvider={activeProvider} />\n <ConnectWalletDialog\n activeProvider={activeProvider}\n onClose={onConnectClose}\n open={showConnect}\n onIgnoreConnectDialog={onIgnoreConnectDialog}\n />\n </>\n )\n}\n","import { TableHeadCell } from '@xyo-network/react-table'\n\nexport const WalletsTableHeadCells: TableHeadCell[] = [\n {\n disablePadding: false,\n id: 'wallet',\n label: 'Wallet',\n numeric: false,\n showOnMobile: true,\n },\n {\n disablePadding: false,\n id: 'chain',\n label: 'Chain',\n numeric: false,\n showOnMobile: true,\n },\n {\n disablePadding: false,\n id: 'accounts',\n label: 'Accounts',\n numeric: true,\n showOnMobile: true,\n },\n {\n disablePadding: false,\n id: 'actions',\n label: 'Actions',\n numeric: false,\n showOnMobile: true,\n },\n {\n disablePadding: false,\n id: 'enabled',\n label: 'Enabled',\n numeric: false,\n showOnMobile: true,\n },\n]\n","import { TableRow, TableRowProps } from '@mui/material'\nimport { EthWalletConnectorBase, useEthWallet } from '@xylabs/react-crypto'\nimport { useCallback, useMemo } from 'react'\n\nimport { ActiveProvider } from '../lib/index.js'\nimport { ConnectedWalletTableCells } from './cells/index.js'\n\nexport interface WalletConnectionsTableRowProps extends TableRowProps {\n ignoreConnectDialog?: boolean\n onConnectClick?: (activeProvider: ActiveProvider) => void\n onRevoke?: (activeProvider: ActiveProvider) => void\n wallet: EthWalletConnectorBase\n}\n\nexport const WalletConnectionsTableRow: React.FC<WalletConnectionsTableRowProps> = ({\n ignoreConnectDialog,\n onConnectClick,\n onRevoke,\n wallet,\n ...props\n}) => {\n const { currentAccount: currentAccountFromWallet, additionalAccounts, chainName, connectWallet, providerInfo } = useEthWallet(wallet)\n\n const currentAccount = currentAccountFromWallet?.toString() ? [currentAccountFromWallet.toString()] : []\n const totalAccounts = (additionalAccounts?.length ?? 0) + (currentAccount?.length ?? 0)\n const connected = !!(currentAccount?.length ?? 0 > 0)\n const { icon, name, rdns } = useMemo(() => providerInfo ?? { icon: undefined, name: undefined, rdns: undefined }, [providerInfo])\n\n const activeProvider = useMemo<ActiveProvider>(\n () => ({\n connectWallet,\n icon,\n providerName: name,\n }),\n [connectWallet, icon, name],\n )\n\n const onRevokeLocal = useCallback(() => {\n onRevoke?.(activeProvider)\n }, [activeProvider, onRevoke])\n\n const onConnectLocal = useCallback(async () => {\n if (ignoreConnectDialog) {\n await connectWallet?.()\n } else {\n onConnectClick?.(activeProvider)\n }\n }, [activeProvider, connectWallet, ignoreConnectDialog, onConnectClick])\n\n return (\n <TableRow {...props}>\n {Object.values(ConnectedWalletTableCells).map((Cell, index) => (\n <Cell\n key={index}\n additionalAccounts={additionalAccounts}\n chainName={chainName}\n connected={connected}\n currentAccount={currentAccount}\n icon={icon}\n onConnect={onConnectLocal}\n onRevoke={onRevokeLocal}\n totalAccounts={totalAccounts}\n walletName={name}\n walletRdns={rdns}\n />\n ))}\n </TableRow>\n )\n}\n","import { Dispatch, SetStateAction, useState } from 'react'\n\nimport { ActiveProvider } from '../../lib/index.js'\n\nexport const useActiveProviderDialogState = (\n setActiveProvider: Dispatch<SetStateAction<ActiveProvider | undefined>>,\n): [boolean, (activeProvider: ActiveProvider) => void, () => void] => {\n const [show, setShow] = useState(false)\n const onSetActiveProvider = (activeProvider: ActiveProvider) => {\n setShow(true)\n setActiveProvider(activeProvider)\n }\n\n const onClose = () => {\n setShow(false)\n setActiveProvider({})\n }\n\n return [show, onSetActiveProvider, onClose]\n}\n"],"mappings":";AAEA,IAAM,4BAA4B;AAqB3B,IAAM,8BAAN,MAAkC;AAAA;AAAA,EAEvC,qBAAqB;AAAA;AAAA,EAGb,iBAA2C,CAAC;AAAA;AAAA,EAG5C,kBAA0C,CAAC;AAAA;AAAA,EAG3C,YAA8B,CAAC;AAAA;AAAA,EAG/B,kBAAkB;AAAA,EAE1B,YAAY,kBAAkB,2BAA2B;AACvD,SAAK,kBAAkB;AACvB,SAAK,eAAe;AAAA,EACtB;AAAA,EAEA,IAAI,UAAU;AACZ,WAAO,KAAK;AAAA,EACd;AAAA,EAEA,cAAc,MAAc;AAC1B,SAAK,oBAAoB,MAAM,KAAK;AAAA,EACtC;AAAA,EAEA,aAAa,MAAc;AACzB,SAAK,oBAAoB,MAAM,IAAI;AAAA,EACrC;AAAA;AAAA;AAAA;AAAA,EAKA,aAAa,SAA4B;AACvC,UAAM,aAAqC,CAAC;AAE5C,UAAM,YAAY,CAAC,CAAC,YAAY,MAAM,MAAkC;AACtE,iBAAW,UAAU,IAAI;AAAA;AAAA,QAEvB,SAAS,cAAc,KAAK,iBAAiB,KAAK,eAAe,UAAU,IAAI;AAAA,QAC/E;AAAA,MACF;AAAA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,sBAAW,CAAC,GAAG,IAAI,CAAC,WACpB,gBAAAA;AAAA,QAAC;AAAA;AAAA,UACC;AAAA,UAEA,gBAAgB;AAAA,UAChB,UAAU;AAAA,UACV;AAAA;AAAA,QAHK,OAAO,cAAc;AAAA,MAI5B,CACD,GACH;AAAA,OACF;AAAA,IACA,gBAAAA,MAAC,gCAA6B,MAAM,YAAY,SAAS,eAAe,gBAAgC;AAAA,IACxG,gBAAAA;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,SAAS;AAAA,QACT,MAAM;AAAA,QACN;AAAA;AAAA,IACF;AAAA,KACF;AAEJ;;;Af/BU,gBAAAK,OAIE,QAAAC,aAJF;AATH,IAAM,2BAA2B;AAAA,EACtC,CAAC,EAAE,qBAAqB,uBAAuB,GAAG,MAAM,GAAG,QAAQ;AACjE,UAAM,QAAQC,UAAS;AAEvB,UAAM,EAAE,wBAAwB,cAAc,IAAI,mBAAmB;AAErE,WACE,gBAAAD,MAACE,UAAA,EAAQ,YAAW,WAAU,gBAAe,SAAQ,KAAK,GAAG,KAAW,GAAG,OACzE;AAAA,sBAAAF,MAACE,UAAA,EAAQ,YAAW,SAClB;AAAA,wBAAAH,MAACI,aAAA,EAAW,SAAS,MAAM,IAAI,EAAE,IAAI,IAAI,GAAG,mCAE5C;AAAA,QACC,yBACC,gBAAAH,MAACG,aAAA,EAAW,SAAS,aAAa,OAAO,MAAM,QAAQ,UAAU,MAAM,IAAI,EAAE,SAAS,IAAI,GAAG;AAAA;AAAA,UAChE;AAAA,WAC7B,IACA;AAAA,SACJ;AAAA,MACA,gBAAAJ,MAAC,yBAAsB,SAAS,eAAe,qBAA0C,uBAA8C;AAAA,OACzI;AAAA,EAEJ;AACF;AAEA,yBAAyB,cAAc;","names":["Typography","useTheme","FlexCol","refresh","useWalletDiscovery","useMemo","useWalletDiscovery","useMemo","default","jsx","jsxs","default","Typography","FlexCol","jsx","jsxs","jsx","jsxs","Button","Dialog","DialogActions","DialogContent","DialogTitle","Typography","ConstrainedImage","FlexRow","jsx","jsxs","Typography","jsx","Button","TableCell","Typography","FlexRow","jsx","jsxs","TableCell","jsx","TableCell","useMemo","jsx","useMemo","TableCell","TableCell","ConstrainedImage","FlexRow","jsx","jsxs","TableCell","TableRow","useState","useMemo","jsx","useMemo","useState","jsx","jsxs","useState","TableRow","TableCell","jsx","jsxs","useTheme","FlexCol","Typography"]}
|
package/dist/node/index.js
DELETED
@@ -1,553 +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 == null ? void 0 : 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 == null ? void 0 : enabledEthWallets.disableWallet.bind(enabledEthWallets),
|
155
|
-
enableWallet: enabledEthWallets == null ? void 0 : 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 == null ? void 0 : 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
|
-
var _a, _b;
|
234
|
-
try {
|
235
|
-
await ((_a = activeProvider == null ? void 0 : activeProvider.connectWallet) == null ? void 0 : _a.call(activeProvider));
|
236
|
-
(_b = props.onClose) == null ? void 0 : _b.call(props, {}, "escapeKeyDown");
|
237
|
-
} catch (e) {
|
238
|
-
console.warn(`Error connecting to wallet: ${e.message}`);
|
239
|
-
}
|
240
|
-
};
|
241
|
-
return /* @__PURE__ */ jsxs4(Dialog, { PaperProps: { sx: { display: "flex", gap: 4 } }, ...props, children: [
|
242
|
-
/* @__PURE__ */ jsx4(DialogTitle, { sx: { textAlign: "center" }, children: "XYO Wants To Access The Blockchain on Your Behalf" }),
|
243
|
-
/* @__PURE__ */ jsxs4(DialogContent, { sx: { display: "flex", flexDirection: "column", gap: 4 }, children: [
|
244
|
-
/* @__PURE__ */ jsx4(LinkedProvidersFlexbox, { icon, providerName }),
|
245
|
-
/* @__PURE__ */ jsx4(WalletPermissionsFlexbox, {}),
|
246
|
-
/* @__PURE__ */ jsx4(CheckboxFormControl, { onCheckChanged: onIgnoreConnectDialog })
|
247
|
-
] }),
|
248
|
-
/* @__PURE__ */ jsxs4(DialogActions, { children: [
|
249
|
-
/* @__PURE__ */ jsx4(Button, { variant: "outlined", onClick: () => {
|
250
|
-
var _a;
|
251
|
-
return (_a = props.onClose) == null ? void 0 : _a.call(props, {}, "escapeKeyDown");
|
252
|
-
}, children: "Close" }),
|
253
|
-
/* @__PURE__ */ jsx4(Button, { variant: "contained", onClick: onConnect, children: "Connect" })
|
254
|
-
] })
|
255
|
-
] });
|
256
|
-
};
|
257
|
-
|
258
|
-
// src/components/wallet/dialogs/revoke/Dialog.tsx
|
259
|
-
import { Button as Button2, Dialog as Dialog2, DialogActions as DialogActions2, DialogContent as DialogContent2, DialogTitle as DialogTitle2, Typography as Typography3 } from "@mui/material";
|
260
|
-
import { ConstrainedImage as ConstrainedImage2 } from "@xylabs/react-crypto";
|
261
|
-
import { FlexRow as FlexRow2 } from "@xylabs/react-flexbox";
|
262
|
-
import { jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
|
263
|
-
var RevokeWalletConnectionDialog = ({ activeProvider, ...props }) => {
|
264
|
-
return /* @__PURE__ */ jsxs5(Dialog2, { ...props, children: [
|
265
|
-
/* @__PURE__ */ jsxs5(FlexRow2, { gap: 2, justifyContent: "start", pl: 2, children: [
|
266
|
-
/* @__PURE__ */ jsx5(ConstrainedImage2, { src: activeProvider == null ? void 0 : activeProvider.icon, constrainedValue: "24px" }),
|
267
|
-
/* @__PURE__ */ jsxs5(DialogTitle2, { sx: { pl: 0 }, children: [
|
268
|
-
"Revoke ",
|
269
|
-
activeProvider == null ? void 0 : activeProvider.providerName,
|
270
|
-
" Access"
|
271
|
-
] })
|
272
|
-
] }),
|
273
|
-
/* @__PURE__ */ jsxs5(DialogContent2, { children: [
|
274
|
-
/* @__PURE__ */ jsxs5(Typography3, { children: [
|
275
|
-
"Revoking access to your wallet must be done from the wallet's browser extension. Wallets grant access to specific domains please consult ",
|
276
|
-
activeProvider == null ? void 0 : activeProvider.providerName,
|
277
|
-
"'s documentation on how to revoke access to this website:"
|
278
|
-
] }),
|
279
|
-
/* @__PURE__ */ jsx5(Typography3, { children: window.location.origin })
|
280
|
-
] }),
|
281
|
-
/* @__PURE__ */ jsx5(DialogActions2, { children: /* @__PURE__ */ jsx5(Button2, { variant: "contained", onClick: () => {
|
282
|
-
var _a;
|
283
|
-
return (_a = props.onClose) == null ? void 0 : _a.call(props, {}, "escapeKeyDown");
|
284
|
-
}, children: "Close" }) })
|
285
|
-
] });
|
286
|
-
};
|
287
|
-
|
288
|
-
// src/components/wallet/table/cells/Accounts.tsx
|
289
|
-
import { TableCell, Tooltip, Typography as Typography4 } from "@mui/material";
|
290
|
-
import { jsx as jsx6 } from "react/jsx-runtime";
|
291
|
-
var ConnectedWalletsAccountsTableCell = ({
|
292
|
-
additionalAccounts,
|
293
|
-
currentAccount,
|
294
|
-
totalAccounts,
|
295
|
-
tableCellProps
|
296
|
-
}) => {
|
297
|
-
return /* @__PURE__ */ jsx6(TableCell, { ...tableCellProps, children: /* @__PURE__ */ jsx6(
|
298
|
-
Tooltip,
|
299
|
-
{
|
300
|
-
sx: { cursor: totalAccounts > 0 ? "pointer" : "auto" },
|
301
|
-
title: [...currentAccount ?? [], ...additionalAccounts ?? []].map((address, index) => /* @__PURE__ */ jsx6("p", { children: address }, index)),
|
302
|
-
children: /* @__PURE__ */ jsx6(Typography4, { children: totalAccounts })
|
303
|
-
}
|
304
|
-
) });
|
305
|
-
};
|
306
|
-
|
307
|
-
// src/components/wallet/table/cells/Actions.tsx
|
308
|
-
import { Check, InfoOutlined } from "@mui/icons-material";
|
309
|
-
import { Button as Button3, IconButton, TableCell as TableCell2, Typography as Typography5 } from "@mui/material";
|
310
|
-
import { FlexRow as FlexRow3 } from "@xylabs/react-flexbox";
|
311
|
-
import { jsx as jsx7, jsxs as jsxs6 } from "react/jsx-runtime";
|
312
|
-
var ConnectedWalletsActionsTableCell = ({ connected, onConnect, onRevoke, tableCellProps }) => {
|
313
|
-
return /* @__PURE__ */ jsx7(TableCell2, { ...tableCellProps, children: /* @__PURE__ */ jsxs6(FlexRow3, { gap: 2, justifyContent: "start", children: [
|
314
|
-
connected ? /* @__PURE__ */ jsxs6(Typography5, { sx: { display: "inline-flex", gap: 0.5 }, children: [
|
315
|
-
/* @__PURE__ */ jsx7(Check, {}),
|
316
|
-
"Connected"
|
317
|
-
] }) : /* @__PURE__ */ jsx7(Button3, { variant: "contained", onClick: onConnect, children: "Connect" }),
|
318
|
-
connected ? /* @__PURE__ */ jsx7(IconButton, { onClick: onRevoke, children: /* @__PURE__ */ jsx7(InfoOutlined, {}) }) : null
|
319
|
-
] }) });
|
320
|
-
};
|
321
|
-
|
322
|
-
// src/components/wallet/table/cells/ChainName.tsx
|
323
|
-
import { TableCell as TableCell3 } from "@mui/material";
|
324
|
-
import { jsx as jsx8 } from "react/jsx-runtime";
|
325
|
-
var ConnectedWalletsChainNameTableCell = ({ chainName, tableCellProps }) => {
|
326
|
-
return /* @__PURE__ */ jsx8(TableCell3, { ...tableCellProps, children: chainName });
|
327
|
-
};
|
328
|
-
|
329
|
-
// src/components/wallet/table/cells/State.tsx
|
330
|
-
import { Switch, TableCell as TableCell4 } from "@mui/material";
|
331
|
-
import { useMemo as useMemo3 } from "react";
|
332
|
-
import { jsx as jsx9 } from "react/jsx-runtime";
|
333
|
-
var ConnectedWalletState = ({ connected, walletRdns, tableCellProps }) => {
|
334
|
-
const { disableWallet, enableWallet, wallets } = useEnabledWallets();
|
335
|
-
const enabled = useMemo3(() => walletRdns ? wallets[walletRdns].enabled : false, [wallets, walletRdns]);
|
336
|
-
const handleClick = (event) => {
|
337
|
-
var _a;
|
338
|
-
const checked = (_a = event.target) == null ? void 0 : _a.checked;
|
339
|
-
if (walletRdns) {
|
340
|
-
checked ? enableWallet == null ? void 0 : enableWallet(walletRdns) : disableWallet == null ? void 0 : disableWallet(walletRdns);
|
341
|
-
}
|
342
|
-
};
|
343
|
-
return /* @__PURE__ */ jsx9(TableCell4, { ...tableCellProps, children: /* @__PURE__ */ jsx9(Switch, { disabled: !connected, checked: connected && enabled, onChange: handleClick }) });
|
344
|
-
};
|
345
|
-
|
346
|
-
// src/components/wallet/table/cells/Wallet.tsx
|
347
|
-
import { TableCell as TableCell5, useTheme } from "@mui/material";
|
348
|
-
import { ConstrainedImage as ConstrainedImage3 } from "@xylabs/react-crypto";
|
349
|
-
import { FlexRow as FlexRow4 } from "@xylabs/react-flexbox";
|
350
|
-
import { jsx as jsx10, jsxs as jsxs7 } from "react/jsx-runtime";
|
351
|
-
var ConnectedWalletsWalletTableCell = ({ icon, walletName, tableCellProps }) => {
|
352
|
-
const theme = useTheme();
|
353
|
-
return /* @__PURE__ */ jsx10(TableCell5, { ...tableCellProps, children: /* @__PURE__ */ jsxs7(FlexRow4, { gap: 2, justifyContent: "start", children: [
|
354
|
-
/* @__PURE__ */ jsx10(ConstrainedImage3, { constrainedValue: theme.spacing(4), src: icon }),
|
355
|
-
walletName
|
356
|
-
] }) });
|
357
|
-
};
|
358
|
-
|
359
|
-
// src/components/wallet/table/cells/Cells.tsx
|
360
|
-
var ConnectedWalletTableCells = [
|
361
|
-
ConnectedWalletsWalletTableCell,
|
362
|
-
ConnectedWalletsChainNameTableCell,
|
363
|
-
ConnectedWalletsAccountsTableCell,
|
364
|
-
ConnectedWalletsActionsTableCell,
|
365
|
-
ConnectedWalletState
|
366
|
-
];
|
367
|
-
|
368
|
-
// src/components/wallet/table/ConnectedWalletsTable.tsx
|
369
|
-
import { Table, TableBody, TableCell as TableCell6, TableHead, TableRow as TableRow2 } from "@mui/material";
|
370
|
-
import { useState as useState3 } from "react";
|
371
|
-
|
372
|
-
// src/components/wallet/lib/TableHeadData.ts
|
373
|
-
var WalletsTableHeadCells = [
|
374
|
-
{
|
375
|
-
disablePadding: false,
|
376
|
-
id: "wallet",
|
377
|
-
label: "Wallet",
|
378
|
-
numeric: false,
|
379
|
-
showOnMobile: true
|
380
|
-
},
|
381
|
-
{
|
382
|
-
disablePadding: false,
|
383
|
-
id: "chain",
|
384
|
-
label: "Chain",
|
385
|
-
numeric: false,
|
386
|
-
showOnMobile: true
|
387
|
-
},
|
388
|
-
{
|
389
|
-
disablePadding: false,
|
390
|
-
id: "accounts",
|
391
|
-
label: "Accounts",
|
392
|
-
numeric: true,
|
393
|
-
showOnMobile: true
|
394
|
-
},
|
395
|
-
{
|
396
|
-
disablePadding: false,
|
397
|
-
id: "actions",
|
398
|
-
label: "Actions",
|
399
|
-
numeric: false,
|
400
|
-
showOnMobile: true
|
401
|
-
},
|
402
|
-
{
|
403
|
-
disablePadding: false,
|
404
|
-
id: "enabled",
|
405
|
-
label: "Enabled",
|
406
|
-
numeric: false,
|
407
|
-
showOnMobile: true
|
408
|
-
}
|
409
|
-
];
|
410
|
-
|
411
|
-
// src/components/wallet/table/ConnectedWalletsTableRow.tsx
|
412
|
-
import { TableRow } from "@mui/material";
|
413
|
-
import { useEthWallet } from "@xylabs/react-crypto";
|
414
|
-
import { useCallback, useMemo as useMemo4 } from "react";
|
415
|
-
import { jsx as jsx11 } from "react/jsx-runtime";
|
416
|
-
var WalletConnectionsTableRow = ({
|
417
|
-
ignoreConnectDialog,
|
418
|
-
onConnectClick,
|
419
|
-
onRevoke,
|
420
|
-
wallet,
|
421
|
-
...props
|
422
|
-
}) => {
|
423
|
-
const { currentAccount: currentAccountFromWallet, additionalAccounts, chainName, connectWallet, providerInfo } = useEthWallet(wallet);
|
424
|
-
const currentAccount = (currentAccountFromWallet == null ? void 0 : currentAccountFromWallet.toString()) ? [currentAccountFromWallet.toString()] : [];
|
425
|
-
const totalAccounts = ((additionalAccounts == null ? void 0 : additionalAccounts.length) ?? 0) + ((currentAccount == null ? void 0 : currentAccount.length) ?? 0);
|
426
|
-
const connected = !!((currentAccount == null ? void 0 : currentAccount.length) ?? 0 > 0);
|
427
|
-
const { icon, name, rdns } = useMemo4(() => providerInfo ?? { icon: void 0, name: void 0, rdns: void 0 }, [providerInfo]);
|
428
|
-
const activeProvider = useMemo4(
|
429
|
-
() => ({
|
430
|
-
connectWallet,
|
431
|
-
icon,
|
432
|
-
providerName: name
|
433
|
-
}),
|
434
|
-
[connectWallet, icon, name]
|
435
|
-
);
|
436
|
-
const onRevokeLocal = useCallback(() => {
|
437
|
-
onRevoke == null ? void 0 : onRevoke(activeProvider);
|
438
|
-
}, [activeProvider, onRevoke]);
|
439
|
-
const onConnectLocal = useCallback(async () => {
|
440
|
-
if (ignoreConnectDialog) {
|
441
|
-
await (connectWallet == null ? void 0 : connectWallet());
|
442
|
-
} else {
|
443
|
-
onConnectClick == null ? void 0 : onConnectClick(activeProvider);
|
444
|
-
}
|
445
|
-
}, [activeProvider, connectWallet, ignoreConnectDialog, onConnectClick]);
|
446
|
-
return /* @__PURE__ */ jsx11(TableRow, { ...props, children: Object.values(ConnectedWalletTableCells).map((Cell, index) => /* @__PURE__ */ jsx11(
|
447
|
-
Cell,
|
448
|
-
{
|
449
|
-
additionalAccounts,
|
450
|
-
chainName,
|
451
|
-
connected,
|
452
|
-
currentAccount,
|
453
|
-
icon,
|
454
|
-
onConnect: onConnectLocal,
|
455
|
-
onRevoke: onRevokeLocal,
|
456
|
-
totalAccounts,
|
457
|
-
walletName: name,
|
458
|
-
walletRdns: rdns
|
459
|
-
},
|
460
|
-
index
|
461
|
-
)) });
|
462
|
-
};
|
463
|
-
|
464
|
-
// src/components/wallet/table/hooks/useActiveProviderDialogState.tsx
|
465
|
-
import { useState as useState2 } from "react";
|
466
|
-
var useActiveProviderDialogState = (setActiveProvider) => {
|
467
|
-
const [show, setShow] = useState2(false);
|
468
|
-
const onSetActiveProvider = (activeProvider) => {
|
469
|
-
setShow(true);
|
470
|
-
setActiveProvider(activeProvider);
|
471
|
-
};
|
472
|
-
const onClose = () => {
|
473
|
-
setShow(false);
|
474
|
-
setActiveProvider({});
|
475
|
-
};
|
476
|
-
return [show, onSetActiveProvider, onClose];
|
477
|
-
};
|
478
|
-
|
479
|
-
// src/components/wallet/table/ConnectedWalletsTable.tsx
|
480
|
-
import { Fragment, jsx as jsx12, jsxs as jsxs8 } from "react/jsx-runtime";
|
481
|
-
var ConnectedWalletsTable = ({ ignoreConnectDialog, onIgnoreConnectDialog, wallets, ...props }) => {
|
482
|
-
const [activeProvider, setActiveProvider] = useState3();
|
483
|
-
const [showConnect, onSetActiveProviderConnect, onConnectClose] = useActiveProviderDialogState(setActiveProvider);
|
484
|
-
const [showRevoke, onSetActiveProviderRevoke, onRevokeClose] = useActiveProviderDialogState(setActiveProvider);
|
485
|
-
return /* @__PURE__ */ jsxs8(Fragment, { children: [
|
486
|
-
/* @__PURE__ */ jsxs8(Table, { ...props, children: [
|
487
|
-
/* @__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)) }) }),
|
488
|
-
/* @__PURE__ */ jsx12(TableBody, { children: (wallets ?? []).map((wallet) => {
|
489
|
-
var _a;
|
490
|
-
return /* @__PURE__ */ jsx12(
|
491
|
-
WalletConnectionsTableRow,
|
492
|
-
{
|
493
|
-
ignoreConnectDialog,
|
494
|
-
onConnectClick: onSetActiveProviderConnect,
|
495
|
-
onRevoke: onSetActiveProviderRevoke,
|
496
|
-
wallet
|
497
|
-
},
|
498
|
-
(_a = wallet.providerInfo) == null ? void 0 : _a.rdns
|
499
|
-
);
|
500
|
-
}) })
|
501
|
-
] }),
|
502
|
-
/* @__PURE__ */ jsx12(RevokeWalletConnectionDialog, { open: showRevoke, onClose: onRevokeClose, activeProvider }),
|
503
|
-
/* @__PURE__ */ jsx12(
|
504
|
-
ConnectWalletDialog,
|
505
|
-
{
|
506
|
-
activeProvider,
|
507
|
-
onClose: onConnectClose,
|
508
|
-
open: showConnect,
|
509
|
-
onIgnoreConnectDialog
|
510
|
-
}
|
511
|
-
)
|
512
|
-
] });
|
513
|
-
};
|
514
|
-
|
515
|
-
// src/components/ConnectedAccountsFlexbox.tsx
|
516
|
-
import { jsx as jsx13, jsxs as jsxs9 } from "react/jsx-runtime";
|
517
|
-
var ConnectedAccountsFlexbox = forwardRef(
|
518
|
-
({ ignoreConnectDialog, onIgnoreConnectDialog, ...props }, ref) => {
|
519
|
-
const theme = useTheme2();
|
520
|
-
const { totalConnectedAccounts, sortedWallets } = useDetectedWallets();
|
521
|
-
return /* @__PURE__ */ jsxs9(FlexCol3, { alignItems: "stretch", justifyContent: "start", gap: 2, ref, ...props, children: [
|
522
|
-
/* @__PURE__ */ jsxs9(FlexCol3, { alignItems: "start", children: [
|
523
|
-
/* @__PURE__ */ jsx13(Typography6, { variant: "h2", sx: { mb: 0.5 }, children: "Detected Web3 Wallets" }),
|
524
|
-
totalConnectedAccounts ? /* @__PURE__ */ jsxs9(Typography6, { variant: "subtitle1", color: theme.palette.secondary.main, sx: { opacity: 0.5 }, children: [
|
525
|
-
"Total Connected Accounts: ",
|
526
|
-
totalConnectedAccounts
|
527
|
-
] }) : null
|
528
|
-
] }),
|
529
|
-
/* @__PURE__ */ jsx13(ConnectedWalletsTable, { wallets: sortedWallets, ignoreConnectDialog, onIgnoreConnectDialog })
|
530
|
-
] });
|
531
|
-
}
|
532
|
-
);
|
533
|
-
ConnectedAccountsFlexbox.displayName = "ConnectedAccountsFlexbox";
|
534
|
-
export {
|
535
|
-
CheckboxFormControl,
|
536
|
-
ConnectWalletDialog,
|
537
|
-
ConnectedAccountsFlexbox,
|
538
|
-
ConnectedWalletState,
|
539
|
-
ConnectedWalletTableCells,
|
540
|
-
ConnectedWalletsAccountsTableCell,
|
541
|
-
ConnectedWalletsActionsTableCell,
|
542
|
-
ConnectedWalletsChainNameTableCell,
|
543
|
-
ConnectedWalletsTable,
|
544
|
-
ConnectedWalletsWalletTableCell,
|
545
|
-
EnabledEthWalletConnections,
|
546
|
-
RevokeWalletConnectionDialog,
|
547
|
-
WalletConnectionsTableRow,
|
548
|
-
useActiveProviderDialogState,
|
549
|
-
useDetectedWallets,
|
550
|
-
useEnabledWallets,
|
551
|
-
useEnabledWalletsInner
|
552
|
-
};
|
553
|
-
//# sourceMappingURL=index.js.map
|