@dynamic-labs/sdk-react-core 1.1.0-alpha.7 → 1.1.0-alpha.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (159) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/package.cjs +2 -2
  3. package/package.js +2 -2
  4. package/package.json +12 -11
  5. package/src/index.cjs +4 -2
  6. package/src/index.js +2 -1
  7. package/src/lib/Main.cjs +4 -5
  8. package/src/lib/Main.js +4 -5
  9. package/src/lib/components/ChainCard/ChainCard.d.ts +2 -2
  10. package/src/lib/components/SelectWalletChainLayout/SelectWalletChainLayout.cjs +5 -1
  11. package/src/lib/components/SelectWalletChainLayout/SelectWalletChainLayout.js +5 -1
  12. package/src/lib/components/Toggle/Toggle.cjs +14 -0
  13. package/src/lib/components/Toggle/Toggle.d.ts +7 -0
  14. package/src/lib/components/Toggle/Toggle.js +10 -0
  15. package/src/lib/components/Toggle/index.d.ts +1 -0
  16. package/src/lib/context/DynamicContext/DynamicContext.cjs +42 -34
  17. package/src/lib/context/DynamicContext/DynamicContext.js +43 -35
  18. package/src/lib/context/DynamicContext/hooks/index.d.ts +1 -1
  19. package/src/lib/context/DynamicContext/hooks/useSetShowLinkNewWalletModal/index.d.ts +1 -0
  20. package/src/lib/context/DynamicContext/hooks/useSetShowLinkNewWalletModal/useSetShowLinkNewWalletModal.cjs +48 -0
  21. package/src/lib/context/DynamicContext/hooks/{useSetShowAuthFlowWithInit/useSetShowAuthFlowWithInit.d.ts → useSetShowLinkNewWalletModal/useSetShowLinkNewWalletModal.d.ts} +4 -7
  22. package/src/lib/context/DynamicContext/hooks/useSetShowLinkNewWalletModal/useSetShowLinkNewWalletModal.js +44 -0
  23. package/src/lib/context/DynamicContext/hooks/useShowAuthFlow/index.d.ts +1 -0
  24. package/src/lib/context/DynamicContext/hooks/useShowAuthFlow/useShowAuthFlow.cjs +59 -0
  25. package/src/lib/context/DynamicContext/hooks/useShowAuthFlow/useShowAuthFlow.d.ts +37 -0
  26. package/src/lib/context/DynamicContext/hooks/useShowAuthFlow/useShowAuthFlow.js +55 -0
  27. package/src/lib/context/DynamicContext/hooks/useTieCallbacksToEvents/useTieCallbacksToEvents.cjs +1 -0
  28. package/src/lib/context/DynamicContext/hooks/useTieCallbacksToEvents/useTieCallbacksToEvents.js +1 -0
  29. package/src/lib/context/DynamicContext/types/index.d.ts +11 -7
  30. package/src/lib/context/DynamicContext/useDynamicContext.cjs +8 -2
  31. package/src/lib/context/DynamicContext/useDynamicContext.d.ts +4 -1
  32. package/src/lib/context/DynamicContext/useDynamicContext.js +8 -2
  33. package/src/lib/context/FundingContext/FundingContext.cjs +4 -1
  34. package/src/lib/context/FundingContext/FundingContext.js +4 -1
  35. package/src/lib/context/SocialRedirectContext/SocialRedirectContext.cjs +1 -1
  36. package/src/lib/context/SocialRedirectContext/SocialRedirectContext.js +1 -1
  37. package/src/lib/context/ViewContext/ViewContext.d.ts +1 -1
  38. package/src/lib/events/dynamicEvents.d.ts +3 -0
  39. package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/WalletExtensionOrAppContinueButton/WalletExtensionOrAppContinueButton.cjs +2 -2
  40. package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/WalletExtensionOrAppContinueButton/WalletExtensionOrAppContinueButton.js +2 -2
  41. package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/WalletListHelpContent.cjs +5 -5
  42. package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/WalletListHelpContent.js +5 -5
  43. package/src/lib/locale/en/translation.cjs +18 -2
  44. package/src/lib/locale/en/translation.d.ts +17 -1
  45. package/src/lib/locale/en/translation.js +18 -2
  46. package/src/lib/shared/assets/alt-key.cjs +54 -0
  47. package/src/lib/shared/assets/alt-key.js +30 -0
  48. package/src/lib/shared/assets/index.d.ts +1 -0
  49. package/src/lib/shared/types/index.d.ts +3 -0
  50. package/src/lib/styles/index.shadow.cjs +1 -1
  51. package/src/lib/styles/index.shadow.js +1 -1
  52. package/src/lib/utils/functions/isSelectedWalletAlreadyConnected/isSelectedWalletAlreadyConnected.cjs +2 -4
  53. package/src/lib/utils/functions/isSelectedWalletAlreadyConnected/isSelectedWalletAlreadyConnected.js +2 -4
  54. package/src/lib/utils/functions/walletListBuilder/utils/filterConnectedWallets/filterConnectedWallets.cjs +13 -2
  55. package/src/lib/utils/functions/walletListBuilder/utils/filterConnectedWallets/filterConnectedWallets.js +13 -2
  56. package/src/lib/utils/functions/walletListBuilder/walletListBuilder.cjs +3 -3
  57. package/src/lib/utils/functions/walletListBuilder/walletListBuilder.js +4 -4
  58. package/src/lib/utils/hooks/authenticationHooks/useSignConnectOnlyUser/useSignConnectOnlyUser.cjs +1 -1
  59. package/src/lib/utils/hooks/authenticationHooks/useSignConnectOnlyUser/useSignConnectOnlyUser.js +1 -1
  60. package/src/lib/utils/hooks/index.d.ts +1 -0
  61. package/src/lib/utils/hooks/multiWallet/useMultiWallet/useMultiWallet.cjs +3 -2
  62. package/src/lib/utils/hooks/multiWallet/useMultiWallet/useMultiWallet.d.ts +6 -1
  63. package/src/lib/utils/hooks/multiWallet/useMultiWallet/useMultiWallet.js +3 -2
  64. package/src/lib/utils/hooks/useAuthLayoutChecks/useAuthLayoutChecks.cjs +2 -1
  65. package/src/lib/utils/hooks/useAuthLayoutChecks/useAuthLayoutChecks.js +2 -1
  66. package/src/lib/utils/hooks/useClearWalletConnectSessions/useClearWalletConnectSessions.cjs +3 -3
  67. package/src/lib/utils/hooks/useClearWalletConnectSessions/useClearWalletConnectSessions.js +3 -3
  68. package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.cjs +1 -1
  69. package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.d.ts +2 -2
  70. package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.js +1 -1
  71. package/src/lib/utils/hooks/useCreateDynamicEmbeddedWalletMutation/useCreateDynamicEmbeddedWalletMutation.cjs +2 -2
  72. package/src/lib/utils/hooks/useCreateDynamicEmbeddedWalletMutation/useCreateDynamicEmbeddedWalletMutation.js +2 -2
  73. package/src/lib/utils/hooks/useEmbeddedReveal/useEmbeddedReveal.cjs +23 -13
  74. package/src/lib/utils/hooks/useEmbeddedReveal/useEmbeddedReveal.d.ts +1 -1
  75. package/src/lib/utils/hooks/useEmbeddedReveal/useEmbeddedReveal.js +23 -13
  76. package/src/lib/utils/hooks/useEmbeddedWallet/useEmbeddedWallet.cjs +9 -6
  77. package/src/lib/utils/hooks/useEmbeddedWallet/useEmbeddedWallet.js +9 -6
  78. package/src/lib/utils/hooks/useHandleUnlinkWallet/useHandleUnlinkWallet.cjs +5 -3
  79. package/src/lib/utils/hooks/useHandleUnlinkWallet/useHandleUnlinkWallet.js +5 -3
  80. package/src/lib/utils/hooks/usePasskeyRecovery/usePasskeyRecovery.cjs +6 -8
  81. package/src/lib/utils/hooks/usePasskeyRecovery/usePasskeyRecovery.js +6 -8
  82. package/src/lib/utils/hooks/useSocialAuth/useSocialAuth.cjs +1 -1
  83. package/src/lib/utils/hooks/useSocialAuth/useSocialAuth.js +1 -1
  84. package/src/lib/utils/hooks/useUserUpdateRequest/useUpdateUserWithModal/useUpdateUserWithModal.cjs +8 -5
  85. package/src/lib/utils/hooks/useUserUpdateRequest/useUpdateUserWithModal/useUpdateUserWithModal.js +8 -5
  86. package/src/lib/utils/hooks/useVerifyWallet/useVerifyWallet.cjs +2 -2
  87. package/src/lib/utils/hooks/useVerifyWallet/useVerifyWallet.js +2 -2
  88. package/src/lib/utils/hooks/useWalletConnectorNetwork/index.d.ts +1 -0
  89. package/src/lib/utils/hooks/useWalletConnectorNetwork/useWalletConnectorNetwork.cjs +42 -0
  90. package/src/lib/utils/hooks/useWalletConnectorNetwork/useWalletConnectorNetwork.d.ts +18 -0
  91. package/src/lib/utils/hooks/useWalletConnectorNetwork/useWalletConnectorNetwork.js +38 -0
  92. package/src/lib/utils/hooks/useWalletConnectors/useWalletConnectors.cjs +2 -2
  93. package/src/lib/utils/hooks/useWalletConnectors/useWalletConnectors.js +2 -2
  94. package/src/lib/utils/hooks/useWalletConnectors/utils/findWallet/findWallet.cjs +5 -2
  95. package/src/lib/utils/hooks/useWalletConnectors/utils/findWallet/findWallet.js +5 -2
  96. package/src/lib/views/BridgeNextWalletConnectionView/BridgeNextWalletConnectionView.cjs +1 -1
  97. package/src/lib/views/BridgeNextWalletConnectionView/BridgeNextWalletConnectionView.js +1 -1
  98. package/src/lib/views/BridgeSummaryView/BridgeSummaryView.cjs +1 -1
  99. package/src/lib/views/BridgeSummaryView/BridgeSummaryView.js +1 -1
  100. package/src/lib/views/BridgeWelcomeView/BridgeWelcomeView.cjs +1 -1
  101. package/src/lib/views/BridgeWelcomeView/BridgeWelcomeView.js +1 -1
  102. package/src/lib/views/EmailVerification/EmailVerification.cjs +1 -1
  103. package/src/lib/views/EmailVerification/EmailVerification.js +1 -1
  104. package/src/lib/views/EmbeddedReveal/EmbeddedRevealView/EmbeddedRevealView.cjs +20 -18
  105. package/src/lib/views/EmbeddedReveal/EmbeddedRevealView/EmbeddedRevealView.js +20 -18
  106. package/src/lib/views/EmbeddedReveal/utils/turnkeyExport/turnkeyExport.cjs +55 -30
  107. package/src/lib/views/EmbeddedReveal/utils/turnkeyExport/turnkeyExport.d.ts +7 -1
  108. package/src/lib/views/EmbeddedReveal/utils/turnkeyExport/turnkeyExport.js +55 -31
  109. package/src/lib/views/LoginView/LoginView.cjs +60 -7
  110. package/src/lib/views/LoginView/LoginView.js +60 -7
  111. package/src/lib/views/MergeUserAccountsView/MergeUserAccountsView.cjs +1 -1
  112. package/src/lib/views/MergeUserAccountsView/MergeUserAccountsView.js +1 -1
  113. package/src/lib/views/NetworkNotSupported/NetworkNotSupported.cjs +3 -4
  114. package/src/lib/views/NetworkNotSupported/NetworkNotSupported.js +3 -4
  115. package/src/lib/views/NetworkNotSupportedSwitchManual/NetworkNotSupportedSwitchManual.cjs +3 -6
  116. package/src/lib/views/NetworkNotSupportedSwitchManual/NetworkNotSupportedSwitchManual.js +3 -6
  117. package/src/lib/views/Passkey/PasskeyRecovery/InitRecovery/PasskeyInitRecovery.cjs +1 -1
  118. package/src/lib/views/Passkey/PasskeyRecovery/InitRecovery/PasskeyInitRecovery.js +1 -1
  119. package/src/lib/views/QrCodeView/QRCode.cjs +2 -3
  120. package/src/lib/views/QrCodeView/QRCode.js +2 -3
  121. package/src/lib/views/WalletGroupView/WalletGroupView.cjs +72 -1
  122. package/src/lib/views/WalletGroupView/WalletGroupView.js +73 -2
  123. package/src/lib/views/WalletGroupView/components/HardwareWalletToggle/HardwareWalletToggle.cjs +74 -0
  124. package/src/lib/views/WalletGroupView/components/HardwareWalletToggle/HardwareWalletToggle.d.ts +7 -0
  125. package/src/lib/views/WalletGroupView/components/HardwareWalletToggle/HardwareWalletToggle.js +70 -0
  126. package/src/lib/views/WalletGroupView/components/HardwareWalletToggle/index.d.ts +1 -0
  127. package/src/lib/views/WalletGroupView/components/WalletGroupItem/WalletGroupItem.cjs +2 -4
  128. package/src/lib/views/WalletGroupView/components/WalletGroupItem/WalletGroupItem.d.ts +2 -1
  129. package/src/lib/views/WalletGroupView/components/WalletGroupItem/WalletGroupItem.js +2 -4
  130. package/src/lib/views/WalletUsedView/WalletUsedView.cjs +5 -5
  131. package/src/lib/views/WalletUsedView/WalletUsedView.js +5 -5
  132. package/src/lib/views/viewToComponentMap.cjs +1 -0
  133. package/src/lib/views/viewToComponentMap.js +1 -0
  134. package/src/lib/widgets/DynamicBridgeWidget/views/EditProfileView/EditProfileView.cjs +6 -3
  135. package/src/lib/widgets/DynamicBridgeWidget/views/EditProfileView/EditProfileView.js +6 -3
  136. package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveBitcoinWalletAddresses/ActiveBitcoinWalletAddresses.cjs +76 -0
  137. package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveBitcoinWalletAddresses/ActiveBitcoinWalletAddresses.d.ts +9 -0
  138. package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveBitcoinWalletAddresses/ActiveBitcoinWalletAddresses.js +72 -0
  139. package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveBitcoinWalletAddresses/index.d.ts +1 -0
  140. package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletAddress/ActiveWalletAddress.cjs +67 -0
  141. package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletAddress/ActiveWalletAddress.d.ts +9 -0
  142. package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletAddress/ActiveWalletAddress.js +63 -0
  143. package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletAddress/index.d.ts +1 -0
  144. package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletInformation.cjs +9 -8
  145. package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletInformation.js +9 -8
  146. package/src/lib/widgets/DynamicWidget/hooks/useFetchBalance/useFetchBalance.cjs +66 -21
  147. package/src/lib/widgets/DynamicWidget/hooks/useFetchBalance/useFetchBalance.d.ts +1 -1
  148. package/src/lib/widgets/DynamicWidget/hooks/useFetchBalance/useFetchBalance.js +67 -22
  149. package/src/lib/widgets/DynamicWidget/prompts/QrCodeModalView/QrCodeModalView.cjs +2 -2
  150. package/src/lib/widgets/DynamicWidget/prompts/QrCodeModalView/QrCodeModalView.js +2 -2
  151. package/src/lib/widgets/DynamicWidget/views/EditProfileView/EditProfileView.cjs +7 -3
  152. package/src/lib/widgets/DynamicWidget/views/EditProfileView/EditProfileView.js +7 -3
  153. package/src/lib/widgets/DynamicWidget/views/WalletSettingsView/WalletSettingsView.cjs +8 -6
  154. package/src/lib/widgets/DynamicWidget/views/WalletSettingsView/WalletSettingsView.js +8 -6
  155. package/src/lib/widgets/DynamicWidget/views/WalletsView/WalletsView.cjs +2 -2
  156. package/src/lib/widgets/DynamicWidget/views/WalletsView/WalletsView.js +2 -2
  157. package/src/lib/context/DynamicContext/hooks/useSetShowAuthFlowWithInit/index.d.ts +0 -1
  158. package/src/lib/context/DynamicContext/hooks/useSetShowAuthFlowWithInit/useSetShowAuthFlowWithInit.cjs +0 -33
  159. package/src/lib/context/DynamicContext/hooks/useSetShowAuthFlowWithInit/useSetShowAuthFlowWithInit.js +0 -29
@@ -1,3 +1,6 @@
1
+ import { Dispatch, SetStateAction } from 'react';
1
2
  import { IDynamicContext } from './types';
2
- export type UseDynamicContext = Pick<IDynamicContext, 'accountSwitchState' | 'authMode' | 'authToken' | 'awaitingSignatureState' | 'getNameService' | 'handleLogOut' | 'handleUnlinkWallet' | 'isAuthenticated' | 'isFullyConnected' | 'isVerificationInProgress' | 'loadingNetwork' | 'locale' | 'loginWithEmail' | 'multiWalletWidgetState' | 'network' | 'networkConfigurations' | 'primaryWallet' | 'qrcodeUri' | 'rpcProviders' | 'sdkHasLoaded' | 'setLogInWithEmail' | 'setMultiWalletWidgetState' | 'setNetwork' | 'setPrimaryWallet' | 'setShowAuthFlow' | 'setShowDynamicUserProfile' | 'setShowQrcodeModal' | 'shadowDOMEnabled' | 'showAuthFlow' | 'showQrcodeModal' | 'user' | 'walletConnector' | 'walletConnectorOptions' | 'bridgeChains' | 'bridgeChainsToConnect' | 'setShowBridgeWidget' | 'sendWagmiSettings' | 'showDynamicUserProfile'>;
3
+ export type UseDynamicContext = Pick<IDynamicContext, 'accountSwitchState' | 'authMode' | 'authToken' | 'awaitingSignatureState' | 'getNameService' | 'handleLogOut' | 'handleUnlinkWallet' | 'isAuthenticated' | 'isFullyConnected' | 'isVerificationInProgress' | 'loadingNetwork' | 'locale' | 'loginWithEmail' | 'multiWalletWidgetState' | 'network' | 'networkConfigurations' | 'primaryWallet' | 'qrcodeUri' | 'rpcProviders' | 'sdkHasLoaded' | 'setLogInWithEmail' | 'setMultiWalletWidgetState' | 'setNetwork' | 'setPrimaryWallet' | 'setShowDynamicUserProfile' | 'setShowQrcodeModal' | 'shadowDOMEnabled' | 'showAuthFlow' | 'showQrcodeModal' | 'user' | 'walletConnector' | 'walletConnectorOptions' | 'bridgeChains' | 'bridgeChainsToConnect' | 'setShowBridgeWidget' | 'sendWagmiSettings' | 'showDynamicUserProfile' | 'setShowLinkNewWalletModal'> & {
4
+ setShowAuthFlow: Dispatch<SetStateAction<boolean>>;
5
+ };
3
6
  export declare const useDynamicContext: () => UseDynamicContext;
@@ -7,7 +7,7 @@ const useDynamicContext = () => {
7
7
  if (context === undefined) {
8
8
  throw new Error('useDynamicContext must be used within a DynamicContextProvider');
9
9
  }
10
- const { accountSwitchState, authMode, authToken, awaitingSignatureState, getNameService, handleLogOut, handleUnlinkWallet, isAuthenticated, isFullyConnected, isVerificationInProgress, loadingNetwork, locale, loginWithEmail, multiWalletWidgetState, network, networkConfigurations, qrcodeUri, rpcProviders, sdkHasLoaded, setLogInWithEmail, setMultiWalletWidgetState, setNetwork, setPrimaryWallet, setShowAuthFlow, setShowDynamicUserProfile, setShowQrcodeModal, shadowDOMEnabled, showAuthFlow, showQrcodeModal, user, walletConnector, walletConnectorOptions, bridgeChains, bridgeChainsToConnect, primaryWallet, setShowBridgeWidget, sendWagmiSettings, showDynamicUserProfile, } = context;
10
+ const { accountSwitchState, authMode, authToken, awaitingSignatureState, getNameService, handleLogOut, handleUnlinkWallet, isAuthenticated, isFullyConnected, isVerificationInProgress, loadingNetwork, locale, loginWithEmail, multiWalletWidgetState, network, networkConfigurations, qrcodeUri, rpcProviders, sdkHasLoaded, setLogInWithEmail, setMultiWalletWidgetState, setNetwork, setPrimaryWallet, setShowAuthFlow, setShowDynamicUserProfile, setShowQrcodeModal, shadowDOMEnabled, showAuthFlow, showQrcodeModal, user, walletConnector, walletConnectorOptions, bridgeChains, bridgeChainsToConnect, primaryWallet, setShowBridgeWidget, sendWagmiSettings, showDynamicUserProfile, setShowLinkNewWalletModal, } = context;
11
11
  return {
12
12
  accountSwitchState,
13
13
  authMode,
@@ -36,9 +36,15 @@ const useDynamicContext = () => {
36
36
  setMultiWalletWidgetState,
37
37
  setNetwork,
38
38
  setPrimaryWallet,
39
- setShowAuthFlow,
39
+ setShowAuthFlow: (value) => setShowAuthFlow(value, {
40
+ emitCancelAuth: true,
41
+ ignoreIfIsEmbeddedWidget: true,
42
+ initializeWalletConnect: true,
43
+ performMultiWalletChecks: true,
44
+ }),
40
45
  setShowBridgeWidget,
41
46
  setShowDynamicUserProfile,
47
+ setShowLinkNewWalletModal,
42
48
  setShowQrcodeModal,
43
49
  shadowDOMEnabled,
44
50
  showAuthFlow,
@@ -6,6 +6,7 @@ var _tslib = require('../../../../_virtual/_tslib.cjs');
6
6
  var jsxRuntime = require('react/jsx-runtime');
7
7
  var React = require('react');
8
8
  var walletConnectorCore = require('@dynamic-labs/wallet-connector-core');
9
+ var bitcoin = require('@dynamic-labs/bitcoin');
9
10
  var api = require('../../data/api.cjs');
10
11
  var useInternalDynamicContext = require('../DynamicContext/useInternalDynamicContext.cjs');
11
12
  require('@dynamic-labs/sdk-api');
@@ -39,13 +40,15 @@ const FundingContextProvider = ({ children, }) => {
39
40
  const chainName = (_c = walletConnectorCore.getChainInfo(primaryWallet.chain)) === null || _c === void 0 ? void 0 : _c.name;
40
41
  if (!chainName)
41
42
  return;
43
+ const bitcoinAddress = bitcoin.isBitcoinConnector(primaryWallet.connector) &&
44
+ (yield primaryWallet.connector.getPaymentAddress());
42
45
  try {
43
46
  const [{ url }] = yield api.getOnrampProviders({
44
47
  chain: chainName,
45
48
  environmentId,
46
49
  networkId: network ? network.toString() : undefined,
47
50
  token,
48
- walletAddress: address ? address : primaryWallet.address,
51
+ walletAddress: address || bitcoinAddress || primaryWallet.address,
49
52
  });
50
53
  if (!url)
51
54
  throw new Error('No onramp url found');
@@ -2,6 +2,7 @@ import { __awaiter } from '../../../../_virtual/_tslib.js';
2
2
  import { jsx } from 'react/jsx-runtime';
3
3
  import { createContext, useContext, useRef, useState, useCallback, useMemo, useEffect } from 'react';
4
4
  import { getChainInfo } from '@dynamic-labs/wallet-connector-core';
5
+ import { isBitcoinConnector } from '@dynamic-labs/bitcoin';
5
6
  import { getOnrampProviders } from '../../data/api.js';
6
7
  import { useInternalDynamicContext } from '../DynamicContext/useInternalDynamicContext.js';
7
8
  import '@dynamic-labs/sdk-api';
@@ -35,13 +36,15 @@ const FundingContextProvider = ({ children, }) => {
35
36
  const chainName = (_c = getChainInfo(primaryWallet.chain)) === null || _c === void 0 ? void 0 : _c.name;
36
37
  if (!chainName)
37
38
  return;
39
+ const bitcoinAddress = isBitcoinConnector(primaryWallet.connector) &&
40
+ (yield primaryWallet.connector.getPaymentAddress());
38
41
  try {
39
42
  const [{ url }] = yield getOnrampProviders({
40
43
  chain: chainName,
41
44
  environmentId,
42
45
  networkId: network ? network.toString() : undefined,
43
46
  token,
44
- walletAddress: address ? address : primaryWallet.address,
47
+ walletAddress: address || bitcoinAddress || primaryWallet.address,
45
48
  });
46
49
  if (!url)
47
50
  throw new Error('No onramp url found');
@@ -97,7 +97,7 @@ const SocialRedirectContextProvider = ({ children, }) => {
97
97
  const handleError = React.useCallback((message) => {
98
98
  logger.logger.error(message);
99
99
  if (isAuthenticated) {
100
- setShowAuthFlow(false);
100
+ setShowAuthFlow(false, { emitCancelAuth: true });
101
101
  setShowDynamicUserProfile(true);
102
102
  }
103
103
  else {
@@ -93,7 +93,7 @@ const SocialRedirectContextProvider = ({ children, }) => {
93
93
  const handleError = useCallback((message) => {
94
94
  logger.error(message);
95
95
  if (isAuthenticated) {
96
- setShowAuthFlow(false);
96
+ setShowAuthFlow(false, { emitCancelAuth: true });
97
97
  setShowDynamicUserProfile(true);
98
98
  }
99
99
  else {
@@ -1,5 +1,5 @@
1
1
  import { Dispatch, FC, PropsWithChildren, SetStateAction } from 'react';
2
- export type ViewType = 'captcha' | 'chainalysis-blocked-wallet' | 'collect-user-data' | 'collect-user-data-login-with-email' | 'login-with-email-or-wallet-full-wallet-list' | 'login-with-email-or-wallet' | 'login-with-wallet-only' | 'login-with-email-verification' | 'network-not-supported' | 'network-not-supported-manual' | 'no-access' | 'no-qr-not-installed' | 'pending-connect' | 'pending-signature-without-back-button' | 'pending-signature' | 'qr-code' | 'update-email' | 'verify-email' | 'wallet-connect-mobile-wallets-list' | 'wallet-list' | 'multi-wallet-wallet-list' | 'wallet-sign' | 'wallet-used' | 'wallet-group' | 'wait-for-email-confirmation-view' | 'email-wallet-otp-verification-view' | 'social-redirect-view' | 'wallet-locked-view' | 'social-wrong-account' | 'gate-blocked-wallet' | 'bridge-welcome' | 'bridge-summary' | 'bridge-next-wallet-connection' | 'account-exists' | 'merge-user-accounts' | 'wallet-cannot-be-transferred' | 'passkey-intro' | 'passkey-recovery-start' | 'passkey-recovery-bundle' | 'passkey-recovery-complete' | 'embedded-reveal-view';
2
+ export type ViewType = 'captcha' | 'chainalysis-blocked-wallet' | 'collect-user-data' | 'collect-user-data-login-with-email' | 'login-with-email-or-wallet-full-wallet-list' | 'login-with-email-or-wallet' | 'login-with-wallet-only' | 'login-with-email-verification' | 'network-not-supported' | 'network-not-supported-manual' | 'no-access' | 'no-qr-not-installed' | 'pending-connect' | 'pending-signature-without-back-button' | 'pending-signature' | 'qr-code' | 'update-email' | 'verify-email' | 'wallet-connect-mobile-wallets-list' | 'wallet-list' | 'multi-wallet-wallet-list' | 'wallet-sign' | 'wallet-used' | 'wallet-group' | 'wait-for-email-confirmation-view' | 'email-wallet-otp-verification-view' | 'social-redirect-view' | 'wallet-locked-view' | 'social-wrong-account' | 'gate-blocked-wallet' | 'bridge-welcome' | 'bridge-summary' | 'bridge-next-wallet-connection' | 'account-exists' | 'merge-user-accounts' | 'wallet-cannot-be-transferred' | 'passkey-intro' | 'passkey-recovery-start' | 'passkey-recovery-bundle' | 'passkey-recovery-complete' | 'embedded-reveal-view' | 'embedded-reveal-account-view';
3
3
  export type ViewContextProps = {
4
4
  setView: Dispatch<SetStateAction<ViewType>>;
5
5
  view: ViewType;
@@ -2,6 +2,9 @@ import EventEmitter from 'eventemitter3';
2
2
  import { Wallet } from '../shared';
3
3
  /** Maps internal event names to their listeners */
4
4
  export type DynamicEvents = {
5
+ /** Triggered when auth is closed before reaching success (due to user cancel or fail) */
6
+ authFlowCancelled: () => void;
7
+ /** Triggered when auth is attempted but fails, like when user rejects connection or the network call fails */
5
8
  emailVerificationResult: (param: boolean, email: string) => void;
6
9
  embeddedWalletCreated: (wallet: Wallet) => void;
7
10
  embeddedWalletFailed: (error: unknown) => void;
@@ -64,10 +64,10 @@ require('../../../../../components/Popper/PopperContext/PopperContext.cjs');
64
64
  const WalletExtensionOrAppContinueButton = ({ wallet, selectedUrl, }) => {
65
65
  const showRefreshOnceInstalledWalletButton = Boolean(selectedUrl.length) && !(wallet === null || wallet === void 0 ? void 0 : wallet.isInstalledOnBrowser);
66
66
  const walletConnectionAfterPageReloadHandler = () => {
67
- if (!(wallet === null || wallet === void 0 ? void 0 : wallet.name)) {
67
+ if (!(wallet === null || wallet === void 0 ? void 0 : wallet.key)) {
68
68
  return;
69
69
  }
70
- localStorage.LocalStorage.setToLS(localStorage$1.NEWTOWEB3_WALLET_EXTENSION_FLAG_KEY, wallet.name);
70
+ localStorage.LocalStorage.setToLS(localStorage$1.NEWTOWEB3_WALLET_EXTENSION_FLAG_KEY, wallet.key);
71
71
  window.location.reload();
72
72
  };
73
73
  return (jsxRuntime.jsxs("div", { className: 'new-to-web3-buttons__container', children: [!utils.isMobile() && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [(wallet === null || wallet === void 0 ? void 0 : wallet.isInstalledOnBrowser) && (jsxRuntime.jsx(NewToWeb3WalletItem.NewToWeb3WalletItem, { wallet: wallet, children: jsxRuntime.jsx(Typography.Typography, { as: 'p', "data-testid": 'desktop-interactive-wallet-item', variant: 'body_normal', weight: 'bold', children: "Continue" }) })), showRefreshOnceInstalledWalletButton && (jsxRuntime.jsx("button", { onClick: walletConnectionAfterPageReloadHandler, children: jsxRuntime.jsx(Typography.Typography, { as: 'p', "data-testid": 'refresh-once-installed-button', variant: 'body_normal', weight: 'bold', children: "Continue once installed" }) }))] })), wallet && utils.isMobile() && (jsxRuntime.jsx(NewToWeb3WalletItem.NewToWeb3WalletItem, { wallet: wallet, children: jsxRuntime.jsx("p", { "data-testid": 'mobile-interactive-wallet-item', children: "Continue once installed" }) }))] }));
@@ -60,10 +60,10 @@ import '../../../../../components/Popper/PopperContext/PopperContext.js';
60
60
  const WalletExtensionOrAppContinueButton = ({ wallet, selectedUrl, }) => {
61
61
  const showRefreshOnceInstalledWalletButton = Boolean(selectedUrl.length) && !(wallet === null || wallet === void 0 ? void 0 : wallet.isInstalledOnBrowser);
62
62
  const walletConnectionAfterPageReloadHandler = () => {
63
- if (!(wallet === null || wallet === void 0 ? void 0 : wallet.name)) {
63
+ if (!(wallet === null || wallet === void 0 ? void 0 : wallet.key)) {
64
64
  return;
65
65
  }
66
- LocalStorage.setToLS(NEWTOWEB3_WALLET_EXTENSION_FLAG_KEY, wallet.name);
66
+ LocalStorage.setToLS(NEWTOWEB3_WALLET_EXTENSION_FLAG_KEY, wallet.key);
67
67
  window.location.reload();
68
68
  };
69
69
  return (jsxs("div", { className: 'new-to-web3-buttons__container', children: [!isMobile() && (jsxs(Fragment, { children: [(wallet === null || wallet === void 0 ? void 0 : wallet.isInstalledOnBrowser) && (jsx(NewToWeb3WalletItem, { wallet: wallet, children: jsx(Typography, { as: 'p', "data-testid": 'desktop-interactive-wallet-item', variant: 'body_normal', weight: 'bold', children: "Continue" }) })), showRefreshOnceInstalledWalletButton && (jsx("button", { onClick: walletConnectionAfterPageReloadHandler, children: jsx(Typography, { as: 'p', "data-testid": 'refresh-once-installed-button', variant: 'body_normal', weight: 'bold', children: "Continue once installed" }) }))] })), wallet && isMobile() && (jsx(NewToWeb3WalletItem, { wallet: wallet, children: jsx("p", { "data-testid": 'mobile-interactive-wallet-item', children: "Continue once installed" }) }))] }));
@@ -4,13 +4,13 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var jsxRuntime = require('react/jsx-runtime');
6
6
  var React = require('react');
7
- var walletConnectorCore = require('@dynamic-labs/wallet-connector-core');
8
7
  var iconic = require('@dynamic-labs/iconic');
9
8
  var walletBook = require('@dynamic-labs/wallet-book');
10
9
  var utils = require('@dynamic-labs/utils');
11
10
  var useInternalDynamicContext = require('../../../../context/DynamicContext/useInternalDynamicContext.cjs');
12
11
  require('@dynamic-labs/sdk-api');
13
12
  require('../../../../shared/logger.cjs');
13
+ require('@dynamic-labs/wallet-connector-core');
14
14
  require('../../../../context/ViewContext/ViewContext.cjs');
15
15
  var puzzle = require('../../../../shared/assets/puzzle.cjs');
16
16
  var index = require('../../../../shared/utils/functions/getValueByKey/index.cjs');
@@ -74,10 +74,10 @@ const WalletListHelpContent = ({ chains, newToWeb3WalletChainMap, }) => {
74
74
  const { walletBook: walletBook$1 } = walletBook.useWalletBookContext();
75
75
  const [selectedUrl, setSelectedUrl] = React.useState('');
76
76
  const chainName = ((_a = chains === null || chains === void 0 ? void 0 : chains.filter((chain) => Boolean(chain.enabled)).find((enabledChain) => enabledChain.name === newToWeb3WalletChainMap.primary_chain)) === null || _a === void 0 ? void 0 : _a.name) || 'evm';
77
- const walletName = index.getValueByKey(newToWeb3WalletChainMap === null || newToWeb3WalletChainMap === void 0 ? void 0 : newToWeb3WalletChainMap.wallets, chainName);
78
- const newToWeb3Wallet = walletConnectorOptions.find((wallet) => { var _a; return walletConnectorCore.normalizeWalletName((_a = wallet.key) !== null && _a !== void 0 ? _a : wallet.name) === walletName; });
77
+ const walletKey = index.getValueByKey(newToWeb3WalletChainMap === null || newToWeb3WalletChainMap === void 0 ? void 0 : newToWeb3WalletChainMap.wallets, chainName);
78
+ const newToWeb3Wallet = walletConnectorOptions.find((wallet) => wallet.key === walletKey);
79
79
  const isCustodialServiceWallet = newToWeb3Wallet === null || newToWeb3Wallet === void 0 ? void 0 : newToWeb3Wallet.walletConnector.canConnectViaCustodialService;
80
- const links = walletBook.getWalletLinks(walletBook$1, walletName);
80
+ const links = walletBook.getWalletLinks(walletBook$1, walletKey);
81
81
  const { currentDesktopUrl, canShowAndroidAppButton, canShowIosAppButton } = parseWalletLinks.parseWalletLinks(links);
82
82
  const walletLinksElements = [
83
83
  {
@@ -102,7 +102,7 @@ const WalletListHelpContent = ({ chains, newToWeb3WalletChainMap, }) => {
102
102
  if (!Object.keys((_b = walletBook$1 === null || walletBook$1 === void 0 ? void 0 : walletBook$1.wallets) !== null && _b !== void 0 ? _b : {}).length) {
103
103
  return jsxRuntime.jsx(Skeleton.Skeleton, { className: 'walletlist-footer-content__container' });
104
104
  }
105
- return (jsxRuntime.jsx("div", { className: 'walletlist-help-content__container', children: jsxRuntime.jsxs(EnterTileAnimation.EnterTileAnimation, { delay: '300ms', children: [jsxRuntime.jsx("div", { className: 'walletlist-help-content__icon', children: jsxRuntime.jsx(walletBook.WalletIcon, { walletKey: walletName, style: { height: pixelToRem.pixelToRem(56), width: pixelToRem.pixelToRem(56) } }) }), jsxRuntime.jsxs("div", { className: 'walletlist-help-content__typography-wrapper', children: [jsxRuntime.jsxs(Typography.Typography, { as: 'p', variant: 'title', weight: 'medium', children: ["We recommend installing", ' ', walletBook.getWalletBookWallet(walletBook$1, walletName).name] }), jsxRuntime.jsx(Typography.Typography, { as: 'label', variant: 'body_normal', weight: 'regular', color: 'secondary', className: 'walletlist-help-content__typography--label', children: "Select your preferred option below:" })] }), jsxRuntime.jsx("div", { className: 'walletlist-help-content__buttons-wrapper', children: walletLinksElements.map((element, i) => element.isEnabled ? (jsxRuntime.jsx("button", { onClick: () => setSelectedUrl(element.url), children: jsxRuntime.jsx(Item.Item, { StartIcon: element.icon, heading: element.content, url: element.url }) }, i)) : undefined) }), isCustodialServiceWallet && (jsxRuntime.jsxs("div", { className: 'walletlist-help-content__custodial-wallet-area', children: [jsxRuntime.jsx(Typography.Typography, { className: 'walletlist-help-content__custodial-wallet-area--title', as: 'p', color: 'secondary', variant: 'body_normal', weight: 'regular', children: "If you don't want to install a wallet, then use:" }), jsxRuntime.jsx(NewToWeb3WalletItem.NewToWeb3WalletItem, { wallet: newToWeb3Wallet })] })), jsxRuntime.jsx(WalletExtensionOrAppContinueButton.WalletExtensionOrAppContinueButton, { selectedUrl: selectedUrl, wallet: newToWeb3Wallet })] }) }));
105
+ return (jsxRuntime.jsx("div", { className: 'walletlist-help-content__container', children: jsxRuntime.jsxs(EnterTileAnimation.EnterTileAnimation, { delay: '300ms', children: [jsxRuntime.jsx("div", { className: 'walletlist-help-content__icon', children: jsxRuntime.jsx(walletBook.WalletIcon, { walletKey: walletKey, style: { height: pixelToRem.pixelToRem(56), width: pixelToRem.pixelToRem(56) } }) }), jsxRuntime.jsxs("div", { className: 'walletlist-help-content__typography-wrapper', children: [jsxRuntime.jsxs(Typography.Typography, { as: 'p', variant: 'title', weight: 'medium', children: ["We recommend installing", ' ', walletBook.getWalletBookWallet(walletBook$1, walletKey).name] }), jsxRuntime.jsx(Typography.Typography, { as: 'label', variant: 'body_normal', weight: 'regular', color: 'secondary', className: 'walletlist-help-content__typography--label', children: "Select your preferred option below:" })] }), jsxRuntime.jsx("div", { className: 'walletlist-help-content__buttons-wrapper', children: walletLinksElements.map((element, i) => element.isEnabled ? (jsxRuntime.jsx("button", { onClick: () => setSelectedUrl(element.url), children: jsxRuntime.jsx(Item.Item, { StartIcon: element.icon, heading: element.content, url: element.url }) }, i)) : undefined) }), isCustodialServiceWallet && (jsxRuntime.jsxs("div", { className: 'walletlist-help-content__custodial-wallet-area', children: [jsxRuntime.jsx(Typography.Typography, { className: 'walletlist-help-content__custodial-wallet-area--title', as: 'p', color: 'secondary', variant: 'body_normal', weight: 'regular', children: "If you don't want to install a wallet, then use:" }), jsxRuntime.jsx(NewToWeb3WalletItem.NewToWeb3WalletItem, { wallet: newToWeb3Wallet })] })), jsxRuntime.jsx(WalletExtensionOrAppContinueButton.WalletExtensionOrAppContinueButton, { selectedUrl: selectedUrl, wallet: newToWeb3Wallet })] }) }));
106
106
  };
107
107
 
108
108
  exports.WalletListHelpContent = WalletListHelpContent;
@@ -1,12 +1,12 @@
1
1
  import { jsx, jsxs } from 'react/jsx-runtime';
2
2
  import { useState } from 'react';
3
- import { normalizeWalletName } from '@dynamic-labs/wallet-connector-core';
4
3
  import { AppleIcon, AndroidIcon } from '@dynamic-labs/iconic';
5
4
  import { useWalletBookContext, getWalletLinks, WalletIcon, getWalletBookWallet } from '@dynamic-labs/wallet-book';
6
5
  import { isMobile } from '@dynamic-labs/utils';
7
6
  import { useInternalDynamicContext } from '../../../../context/DynamicContext/useInternalDynamicContext.js';
8
7
  import '@dynamic-labs/sdk-api';
9
8
  import '../../../../shared/logger.js';
9
+ import '@dynamic-labs/wallet-connector-core';
10
10
  import '../../../../context/ViewContext/ViewContext.js';
11
11
  import { ReactComponent as SvgPuzzle } from '../../../../shared/assets/puzzle.js';
12
12
  import { getValueByKey } from '../../../../shared/utils/functions/getValueByKey/index.js';
@@ -70,10 +70,10 @@ const WalletListHelpContent = ({ chains, newToWeb3WalletChainMap, }) => {
70
70
  const { walletBook } = useWalletBookContext();
71
71
  const [selectedUrl, setSelectedUrl] = useState('');
72
72
  const chainName = ((_a = chains === null || chains === void 0 ? void 0 : chains.filter((chain) => Boolean(chain.enabled)).find((enabledChain) => enabledChain.name === newToWeb3WalletChainMap.primary_chain)) === null || _a === void 0 ? void 0 : _a.name) || 'evm';
73
- const walletName = getValueByKey(newToWeb3WalletChainMap === null || newToWeb3WalletChainMap === void 0 ? void 0 : newToWeb3WalletChainMap.wallets, chainName);
74
- const newToWeb3Wallet = walletConnectorOptions.find((wallet) => { var _a; return normalizeWalletName((_a = wallet.key) !== null && _a !== void 0 ? _a : wallet.name) === walletName; });
73
+ const walletKey = getValueByKey(newToWeb3WalletChainMap === null || newToWeb3WalletChainMap === void 0 ? void 0 : newToWeb3WalletChainMap.wallets, chainName);
74
+ const newToWeb3Wallet = walletConnectorOptions.find((wallet) => wallet.key === walletKey);
75
75
  const isCustodialServiceWallet = newToWeb3Wallet === null || newToWeb3Wallet === void 0 ? void 0 : newToWeb3Wallet.walletConnector.canConnectViaCustodialService;
76
- const links = getWalletLinks(walletBook, walletName);
76
+ const links = getWalletLinks(walletBook, walletKey);
77
77
  const { currentDesktopUrl, canShowAndroidAppButton, canShowIosAppButton } = parseWalletLinks(links);
78
78
  const walletLinksElements = [
79
79
  {
@@ -98,7 +98,7 @@ const WalletListHelpContent = ({ chains, newToWeb3WalletChainMap, }) => {
98
98
  if (!Object.keys((_b = walletBook === null || walletBook === void 0 ? void 0 : walletBook.wallets) !== null && _b !== void 0 ? _b : {}).length) {
99
99
  return jsx(Skeleton, { className: 'walletlist-footer-content__container' });
100
100
  }
101
- return (jsx("div", { className: 'walletlist-help-content__container', children: jsxs(EnterTileAnimation, { delay: '300ms', children: [jsx("div", { className: 'walletlist-help-content__icon', children: jsx(WalletIcon, { walletKey: walletName, style: { height: pixelToRem(56), width: pixelToRem(56) } }) }), jsxs("div", { className: 'walletlist-help-content__typography-wrapper', children: [jsxs(Typography, { as: 'p', variant: 'title', weight: 'medium', children: ["We recommend installing", ' ', getWalletBookWallet(walletBook, walletName).name] }), jsx(Typography, { as: 'label', variant: 'body_normal', weight: 'regular', color: 'secondary', className: 'walletlist-help-content__typography--label', children: "Select your preferred option below:" })] }), jsx("div", { className: 'walletlist-help-content__buttons-wrapper', children: walletLinksElements.map((element, i) => element.isEnabled ? (jsx("button", { onClick: () => setSelectedUrl(element.url), children: jsx(Item, { StartIcon: element.icon, heading: element.content, url: element.url }) }, i)) : undefined) }), isCustodialServiceWallet && (jsxs("div", { className: 'walletlist-help-content__custodial-wallet-area', children: [jsx(Typography, { className: 'walletlist-help-content__custodial-wallet-area--title', as: 'p', color: 'secondary', variant: 'body_normal', weight: 'regular', children: "If you don't want to install a wallet, then use:" }), jsx(NewToWeb3WalletItem, { wallet: newToWeb3Wallet })] })), jsx(WalletExtensionOrAppContinueButton, { selectedUrl: selectedUrl, wallet: newToWeb3Wallet })] }) }));
101
+ return (jsx("div", { className: 'walletlist-help-content__container', children: jsxs(EnterTileAnimation, { delay: '300ms', children: [jsx("div", { className: 'walletlist-help-content__icon', children: jsx(WalletIcon, { walletKey: walletKey, style: { height: pixelToRem(56), width: pixelToRem(56) } }) }), jsxs("div", { className: 'walletlist-help-content__typography-wrapper', children: [jsxs(Typography, { as: 'p', variant: 'title', weight: 'medium', children: ["We recommend installing", ' ', getWalletBookWallet(walletBook, walletKey).name] }), jsx(Typography, { as: 'label', variant: 'body_normal', weight: 'regular', color: 'secondary', className: 'walletlist-help-content__typography--label', children: "Select your preferred option below:" })] }), jsx("div", { className: 'walletlist-help-content__buttons-wrapper', children: walletLinksElements.map((element, i) => element.isEnabled ? (jsx("button", { onClick: () => setSelectedUrl(element.url), children: jsx(Item, { StartIcon: element.icon, heading: element.content, url: element.url }) }, i)) : undefined) }), isCustodialServiceWallet && (jsxs("div", { className: 'walletlist-help-content__custodial-wallet-area', children: [jsx(Typography, { className: 'walletlist-help-content__custodial-wallet-area--title', as: 'p', color: 'secondary', variant: 'body_normal', weight: 'regular', children: "If you don't want to install a wallet, then use:" }), jsx(NewToWeb3WalletItem, { wallet: newToWeb3Wallet })] })), jsx(WalletExtensionOrAppContinueButton, { selectedUrl: selectedUrl, wallet: newToWeb3Wallet })] }) }));
102
102
  };
103
103
 
104
104
  export { WalletListHelpContent };
@@ -23,14 +23,18 @@ const translation = {
23
23
  trail_message_social: 'through {{socialOauth}}',
24
24
  },
25
25
  /**
26
- * @description copy keys for showing an alert when a user is connected to a testnet network
26
+ * @description copy keys for active wallet information (address, network, etc)
27
27
  * @default
28
28
  * {
29
29
  testnet_warning: 'A testnet network has been selected. Please only use testnet funds or they will be lost.',
30
+ ordinals_address: 'Ordinals address',
31
+ payment_address: 'Payment address',
30
32
  }
31
33
  */
32
34
  dyn_active_wallet_info: {
33
35
  testnet_warning: 'A testnet network has been selected. Please only use testnet funds or they will be lost.',
36
+ ordinals_address: 'Ordinals address',
37
+ payment_address: 'Payment address',
34
38
  },
35
39
  /**
36
40
  * @description copy keys for bridge view
@@ -411,7 +415,7 @@ const translation = {
411
415
  },
412
416
  statement_2: {
413
417
  title: 'Do not publicly share your wallet key',
414
- description: 'Your recovery phrase controls your account and assets.',
418
+ description: 'Your {{credential_type}} controls your account and assets.',
415
419
  },
416
420
  checkbox_label: 'I am responsible for safeguarding and using my wallet key information.',
417
421
  reveal_description: 'Make sure to safely back up this information',
@@ -947,6 +951,18 @@ const translation = {
947
951
  gas_not_sponsored: 'The gas fee has increased. Confirm if you still want to complete this transaction.',
948
952
  },
949
953
  },
954
+ /**
955
+ * @description copy keys for Select Chain view
956
+ * @default
957
+ * {
958
+ description: "This wallet supports multiple chains. Select which chain you'd like to connect to",
959
+ using_hardware_wallet_toggle_label: 'Using Ledger with Solana',
960
+ }
961
+ */
962
+ dyn_select_chain: {
963
+ description: "This wallet supports multiple chains. Select which chain you'd like to connect to",
964
+ using_hardware_wallet_toggle_label: 'Using Ledger with Solana',
965
+ },
950
966
  /**
951
967
  * @description copy keys for sign message flow views
952
968
  * @default
@@ -18,14 +18,18 @@ export declare const translation: {
18
18
  trail_message_social: string;
19
19
  };
20
20
  /**
21
- * @description copy keys for showing an alert when a user is connected to a testnet network
21
+ * @description copy keys for active wallet information (address, network, etc)
22
22
  * @default
23
23
  * {
24
24
  testnet_warning: 'A testnet network has been selected. Please only use testnet funds or they will be lost.',
25
+ ordinals_address: 'Ordinals address',
26
+ payment_address: 'Payment address',
25
27
  }
26
28
  */
27
29
  dyn_active_wallet_info: {
28
30
  testnet_warning: string;
31
+ ordinals_address: string;
32
+ payment_address: string;
29
33
  };
30
34
  /**
31
35
  * @description copy keys for bridge view
@@ -942,6 +946,18 @@ export declare const translation: {
942
946
  gas_not_sponsored: string;
943
947
  };
944
948
  };
949
+ /**
950
+ * @description copy keys for Select Chain view
951
+ * @default
952
+ * {
953
+ description: "This wallet supports multiple chains. Select which chain you'd like to connect to",
954
+ using_hardware_wallet_toggle_label: 'Using Ledger with Solana',
955
+ }
956
+ */
957
+ dyn_select_chain: {
958
+ description: string;
959
+ using_hardware_wallet_toggle_label: string;
960
+ };
945
961
  /**
946
962
  * @description copy keys for sign message flow views
947
963
  * @default
@@ -19,14 +19,18 @@ const translation = {
19
19
  trail_message_social: 'through {{socialOauth}}',
20
20
  },
21
21
  /**
22
- * @description copy keys for showing an alert when a user is connected to a testnet network
22
+ * @description copy keys for active wallet information (address, network, etc)
23
23
  * @default
24
24
  * {
25
25
  testnet_warning: 'A testnet network has been selected. Please only use testnet funds or they will be lost.',
26
+ ordinals_address: 'Ordinals address',
27
+ payment_address: 'Payment address',
26
28
  }
27
29
  */
28
30
  dyn_active_wallet_info: {
29
31
  testnet_warning: 'A testnet network has been selected. Please only use testnet funds or they will be lost.',
32
+ ordinals_address: 'Ordinals address',
33
+ payment_address: 'Payment address',
30
34
  },
31
35
  /**
32
36
  * @description copy keys for bridge view
@@ -407,7 +411,7 @@ const translation = {
407
411
  },
408
412
  statement_2: {
409
413
  title: 'Do not publicly share your wallet key',
410
- description: 'Your recovery phrase controls your account and assets.',
414
+ description: 'Your {{credential_type}} controls your account and assets.',
411
415
  },
412
416
  checkbox_label: 'I am responsible for safeguarding and using my wallet key information.',
413
417
  reveal_description: 'Make sure to safely back up this information',
@@ -943,6 +947,18 @@ const translation = {
943
947
  gas_not_sponsored: 'The gas fee has increased. Confirm if you still want to complete this transaction.',
944
948
  },
945
949
  },
950
+ /**
951
+ * @description copy keys for Select Chain view
952
+ * @default
953
+ * {
954
+ description: "This wallet supports multiple chains. Select which chain you'd like to connect to",
955
+ using_hardware_wallet_toggle_label: 'Using Ledger with Solana',
956
+ }
957
+ */
958
+ dyn_select_chain: {
959
+ description: "This wallet supports multiple chains. Select which chain you'd like to connect to",
960
+ using_hardware_wallet_toggle_label: 'Using Ledger with Solana',
961
+ },
946
962
  /**
947
963
  * @description copy keys for sign message flow views
948
964
  * @default
@@ -0,0 +1,54 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var React = require('react');
6
+
7
+ function _interopNamespace(e) {
8
+ if (e && e.__esModule) return e;
9
+ var n = Object.create(null);
10
+ if (e) {
11
+ Object.keys(e).forEach(function (k) {
12
+ if (k !== 'default') {
13
+ var d = Object.getOwnPropertyDescriptor(e, k);
14
+ Object.defineProperty(n, k, d.get ? d : {
15
+ enumerable: true,
16
+ get: function () { return e[k]; }
17
+ });
18
+ }
19
+ });
20
+ }
21
+ n["default"] = e;
22
+ return Object.freeze(n);
23
+ }
24
+
25
+ var React__namespace = /*#__PURE__*/_interopNamespace(React);
26
+
27
+ var _path;
28
+ var _excluded = ["title", "titleId"];
29
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
30
+ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
31
+ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
32
+ var SvgAltKey = function SvgAltKey(_ref) {
33
+ var title = _ref.title,
34
+ titleId = _ref.titleId,
35
+ props = _objectWithoutProperties(_ref, _excluded);
36
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends({
37
+ width: 24,
38
+ height: 24,
39
+ viewBox: "0 0 24 24",
40
+ fill: "none",
41
+ xmlns: "http://www.w3.org/2000/svg",
42
+ "aria-labelledby": titleId
43
+ }, props), title ? /*#__PURE__*/React__namespace.createElement("title", {
44
+ id: titleId
45
+ }, title) : null, _path || (_path = /*#__PURE__*/React__namespace.createElement("path", {
46
+ fillRule: "evenodd",
47
+ clipRule: "evenodd",
48
+ d: "M15 4a5 5 0 0 0-4.786 6.453 1 1 0 0 1-.25.997L4 17.414V20h2v-1a1 1 0 0 1 1-1h1v-1a1 1 0 0 1 1-1h1.586l1.964-1.964a1 1 0 0 1 .997-.25A5 5 0 1 0 15 4ZM8 20v1a1 1 0 0 1-1 1H4a2 2 0 0 1-2-2v-2.586A2 2 0 0 1 2.586 16l5.562-5.562a7 7 0 1 1 5.414 5.414l-1.855 1.855A1 1 0 0 1 11 18h-1v1a1 1 0 0 1-1 1H8Zm6-13a1 1 0 0 1 1-1 3 3 0 0 1 3 3 1 1 0 1 1-2 0 1 1 0 0 0-1-1 1 1 0 0 1-1-1Z",
49
+ fill: "#383C48",
50
+ fillOpacity: 0.4
51
+ })));
52
+ };
53
+
54
+ exports.ReactComponent = SvgAltKey;
@@ -0,0 +1,30 @@
1
+ import * as React from 'react';
2
+
3
+ var _path;
4
+ var _excluded = ["title", "titleId"];
5
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
6
+ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
7
+ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
8
+ var SvgAltKey = function SvgAltKey(_ref) {
9
+ var title = _ref.title,
10
+ titleId = _ref.titleId,
11
+ props = _objectWithoutProperties(_ref, _excluded);
12
+ return /*#__PURE__*/React.createElement("svg", _extends({
13
+ width: 24,
14
+ height: 24,
15
+ viewBox: "0 0 24 24",
16
+ fill: "none",
17
+ xmlns: "http://www.w3.org/2000/svg",
18
+ "aria-labelledby": titleId
19
+ }, props), title ? /*#__PURE__*/React.createElement("title", {
20
+ id: titleId
21
+ }, title) : null, _path || (_path = /*#__PURE__*/React.createElement("path", {
22
+ fillRule: "evenodd",
23
+ clipRule: "evenodd",
24
+ d: "M15 4a5 5 0 0 0-4.786 6.453 1 1 0 0 1-.25.997L4 17.414V20h2v-1a1 1 0 0 1 1-1h1v-1a1 1 0 0 1 1-1h1.586l1.964-1.964a1 1 0 0 1 .997-.25A5 5 0 1 0 15 4ZM8 20v1a1 1 0 0 1-1 1H4a2 2 0 0 1-2-2v-2.586A2 2 0 0 1 2.586 16l5.562-5.562a7 7 0 1 1 5.414 5.414l-1.855 1.855A1 1 0 0 1 11 18h-1v1a1 1 0 0 1-1 1H8Zm6-13a1 1 0 0 1 1-1 3 3 0 0 1 3 3 1 1 0 1 1-2 0 1 1 0 0 0-1-1 1 1 0 0 1-1-1Z",
25
+ fill: "#383C48",
26
+ fillOpacity: 0.4
27
+ })));
28
+ };
29
+
30
+ export { SvgAltKey as ReactComponent };
@@ -65,3 +65,4 @@ export { ReactComponent as AltEmbeddedWalletIcon } from './alt-embedded-wallet.s
65
65
  export { ReactComponent as FaceIdIcon } from './face-id.svg';
66
66
  export { ReactComponent as ExportEmbeddedHero } from './export-embedded-hero.svg';
67
67
  export { ReactComponent as WalletV2Icon } from './wallet-v2.svg';
68
+ export { ReactComponent as AltKeyIcon } from './alt-key.svg';
@@ -177,6 +177,9 @@ export type DynamicEventsCallbacks = {
177
177
  messageToSign: string;
178
178
  signedMessage: string;
179
179
  }) => void;
180
+ /** Called when the auth modal is closed before reaching success (due to user cancel or fail) */
181
+ onAuthFlowCancel?: () => void;
182
+ /** Called whenever the auth modal is closed */
180
183
  onAuthFlowClose?: () => void;
181
184
  onAuthFlowOpen?: () => void;
182
185
  onAuthSuccess?: OnAuthSuccess;