@abstraxn/signer-react 3.3.9 → 4.0.0

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 (114) hide show
  1. package/CHANGELOG.md +44 -0
  2. package/dist/src/ConnectButton.css.d.ts +2 -0
  3. package/dist/src/ConnectButton.css.js +1 -0
  4. package/dist/src/ConnectButton.d.ts +0 -1
  5. package/dist/src/ConnectButton.js +7 -6
  6. package/dist/src/ExternalWalletButtons.css.d.ts +2 -0
  7. package/dist/src/ExternalWalletButtons.css.js +1 -0
  8. package/dist/src/ExternalWalletButtons.d.ts +4 -1
  9. package/dist/src/ExternalWalletButtons.js +6 -1
  10. package/dist/src/WalletModal.css +2 -0
  11. package/dist/src/WalletModal.css.d.ts +2 -0
  12. package/dist/src/WalletModal.css.js +1 -0
  13. package/dist/src/WalletModal.d.ts +2 -2
  14. package/dist/src/WalletModal.js +113 -59
  15. package/dist/src/components/AbstraxnLogo.d.ts +17 -0
  16. package/dist/src/components/AbstraxnLogo.js +29 -0
  17. package/dist/src/components/AbstraxnProvider/AbstraxnProviderInner.js +406 -338
  18. package/dist/src/components/AbstraxnProvider/useAbstraxnProviderBase.d.ts +7 -0
  19. package/dist/src/components/AbstraxnProvider/useAbstraxnProviderBase.js +9 -0
  20. package/dist/src/components/AbstraxnProvider/useWalletInitialization.js +41 -6
  21. package/dist/src/components/OnboardingUI/OnboardingUI.css +99 -4
  22. package/dist/src/components/OnboardingUI/OnboardingUI.css.d.ts +2 -0
  23. package/dist/src/components/OnboardingUI/OnboardingUI.css.js +1 -0
  24. package/dist/src/components/OnboardingUI/OnboardingUIReact.d.ts +0 -1
  25. package/dist/src/components/OnboardingUI/OnboardingUIReact.js +46 -19
  26. package/dist/src/components/OnboardingUI/OnboardingUIWeb.d.ts +24 -1
  27. package/dist/src/components/OnboardingUI/OnboardingUIWeb.js +348 -160
  28. package/dist/src/components/OnboardingUI/components/Divider.d.ts +7 -0
  29. package/dist/src/components/OnboardingUI/components/Divider.js +9 -0
  30. package/dist/src/components/OnboardingUI/components/EmailForm.d.ts +0 -1
  31. package/dist/src/components/OnboardingUI/components/EmailForm.js +1 -2
  32. package/dist/src/components/OnboardingUI/components/MfaForm.d.ts +0 -1
  33. package/dist/src/components/OnboardingUI/components/MfaForm.js +2 -3
  34. package/dist/src/components/OnboardingUI/components/Modal.d.ts +0 -1
  35. package/dist/src/components/OnboardingUI/components/Modal.js +12 -4
  36. package/dist/src/components/OnboardingUI/components/OtpForm.d.ts +0 -1
  37. package/dist/src/components/OnboardingUI/components/OtpForm.js +2 -3
  38. package/dist/src/components/OnboardingUI/components/PasskeyButton.d.ts +0 -1
  39. package/dist/src/components/OnboardingUI/components/PasskeyButton.js +2 -2
  40. package/dist/src/components/OnboardingUI/components/SocialButtons.d.ts +0 -1
  41. package/dist/src/components/OnboardingUI/components/SocialButtons.js +3 -3
  42. package/dist/src/components/OnboardingUI/onboardingShadowContainer.d.ts +9 -0
  43. package/dist/src/components/OnboardingUI/onboardingShadowContainer.js +36 -0
  44. package/dist/src/components/ShadowHost/ShadowHost.d.ts +18 -0
  45. package/dist/src/components/ShadowHost/ShadowHost.js +123 -0
  46. package/dist/src/components/ShadowHost/ShadowHostContext.d.ts +10 -0
  47. package/dist/src/components/ShadowHost/ShadowHostContext.js +14 -0
  48. package/dist/src/components/ShadowHost/index.d.ts +2 -0
  49. package/dist/src/components/ShadowHost/index.js +3 -0
  50. package/dist/src/components/WalletModal/components/ChainSelector.css +9 -0
  51. package/dist/src/components/WalletModal/components/ChainSelector.css.d.ts +2 -0
  52. package/dist/src/components/WalletModal/components/ChainSelector.css.js +1 -0
  53. package/dist/src/components/WalletModal/components/ChainSelector.d.ts +0 -1
  54. package/dist/src/components/WalletModal/components/ChainSelector.js +78 -23
  55. package/dist/src/components/WalletModal/components/CodeInput.d.ts +12 -0
  56. package/dist/src/components/WalletModal/components/CodeInput.js +39 -0
  57. package/dist/src/components/WalletModal/components/ExportKeyModal.css.d.ts +2 -0
  58. package/dist/src/components/WalletModal/components/ExportKeyModal.css.js +1 -0
  59. package/dist/src/components/WalletModal/components/ExportKeyModal.d.ts +0 -2
  60. package/dist/src/components/WalletModal/components/ExportKeyModal.js +2 -4
  61. package/dist/src/components/WalletModal/components/ExportWarningModal.css.d.ts +2 -0
  62. package/dist/src/components/WalletModal/components/ExportWarningModal.css.js +1 -0
  63. package/dist/src/components/WalletModal/components/ExportWarningModal.d.ts +0 -2
  64. package/dist/src/components/WalletModal/components/ExportWarningModal.js +2 -4
  65. package/dist/src/components/WalletModal/components/ManageWalletModal.css +27 -1
  66. package/dist/src/components/WalletModal/components/ManageWalletModal.css.d.ts +2 -0
  67. package/dist/src/components/WalletModal/components/ManageWalletModal.css.js +1 -0
  68. package/dist/src/components/WalletModal/components/ManageWalletModal.d.ts +0 -1
  69. package/dist/src/components/WalletModal/components/ManageWalletModal.js +66 -148
  70. package/dist/src/components/WalletModal/components/MfaVerifyModal.d.ts +15 -0
  71. package/dist/src/components/WalletModal/components/MfaVerifyModal.js +98 -0
  72. package/dist/src/components/WalletModal/components/PreviewTransactionModal.css +2 -12
  73. package/dist/src/components/WalletModal/components/PreviewTransactionModal.css.d.ts +2 -0
  74. package/dist/src/components/WalletModal/components/PreviewTransactionModal.css.js +1 -0
  75. package/dist/src/components/WalletModal/components/PreviewTransactionModal.d.ts +0 -1
  76. package/dist/src/components/WalletModal/components/PreviewTransactionModal.js +0 -1
  77. package/dist/src/components/WalletModal/components/ReceiveModal.css.d.ts +2 -0
  78. package/dist/src/components/WalletModal/components/ReceiveModal.css.js +1 -0
  79. package/dist/src/components/WalletModal/components/ReceiveModal.d.ts +0 -1
  80. package/dist/src/components/WalletModal/components/ReceiveModal.js +2 -2
  81. package/dist/src/components/WalletModal/components/SendModal.css.d.ts +2 -0
  82. package/dist/src/components/WalletModal/components/SendModal.css.js +1 -0
  83. package/dist/src/components/WalletModal/components/SendModal.d.ts +5 -2
  84. package/dist/src/components/WalletModal/components/SendModal.js +25 -82
  85. package/dist/src/components/WalletModal/components/SignMfaModalHost.d.ts +1 -0
  86. package/dist/src/components/WalletModal/components/SignMfaModalHost.js +50 -0
  87. package/dist/src/components/WalletModal/components/SuccessModal.css.d.ts +2 -0
  88. package/dist/src/components/WalletModal/components/SuccessModal.css.js +1 -0
  89. package/dist/src/components/WalletModal/components/SuccessModal.d.ts +0 -1
  90. package/dist/src/components/WalletModal/components/SuccessModal.js +0 -1
  91. package/dist/src/components/WalletModal/components/TokenSelectorModal.css.d.ts +2 -0
  92. package/dist/src/components/WalletModal/components/TokenSelectorModal.css.js +1 -0
  93. package/dist/src/components/WalletModal/components/TokenSelectorModal.d.ts +0 -1
  94. package/dist/src/components/WalletModal/components/TokenSelectorModal.js +0 -1
  95. package/dist/src/components/WalletModal/components/UserAvatar.js +2 -1
  96. package/dist/src/components/WalletModal/components/index.d.ts +3 -0
  97. package/dist/src/components/WalletModal/components/index.js +2 -0
  98. package/dist/src/components/WalletModal/hooks/useSendTransaction.js +18 -6
  99. package/dist/src/components/icons.d.ts +2 -0
  100. package/dist/src/components/icons.js +4 -0
  101. package/dist/src/hooks.d.ts +81 -20
  102. package/dist/src/hooks.js +194 -36
  103. package/dist/src/index.d.ts +2 -2
  104. package/dist/src/index.js +2 -2
  105. package/dist/src/signMfaBridge.d.ts +7 -0
  106. package/dist/src/signMfaBridge.js +20 -0
  107. package/dist/src/types.d.ts +4 -0
  108. package/dist/src/utils/shadowFocus.d.ts +8 -0
  109. package/dist/src/utils/shadowFocus.js +15 -0
  110. package/dist/src/utils/shadowRegistry.d.ts +23 -0
  111. package/dist/src/utils/shadowRegistry.js +36 -0
  112. package/dist/src/walletConnectMobile.d.ts +9 -5
  113. package/dist/src/walletConnectMobile.js +152 -51
  114. package/package.json +9 -4
@@ -113,15 +113,5 @@
113
113
  background: #f3f4f6;
114
114
  }
115
115
 
116
- .wallet-modal-loading-spinner {
117
- animation: spin 1s linear infinite;
118
- }
119
-
120
- @keyframes spin {
121
- from {
122
- transform: rotate(0deg);
123
- }
124
- to {
125
- transform: rotate(360deg);
126
- }
127
- }
116
+ /* .wallet-modal-loading-spinner and @keyframes spin are defined once in WalletModal.css,
117
+ always bundled alongside this file's CSS in the same shadow root. */
@@ -0,0 +1,2 @@
1
+ declare const cssText: string;
2
+ export default cssText;
@@ -0,0 +1 @@
1
+ export default "/* Preview Transaction Modal Styles */\n.wallet-modal-preview-content {\n padding: 20px 0;\n display: flex;\n flex-direction: column;\n gap: 24px;\n}\n\n.wallet-modal-preview-section {\n display: flex;\n flex-direction: column;\n gap: 16px;\n padding: 20px;\n border-radius: 12px;\n border: 1px solid;\n}\n\n.wallet-modal-theme-dark .wallet-modal-preview-section {\n background: #2a2a2a;\n border-color: #3a3a3a;\n}\n\n.wallet-modal-theme-light .wallet-modal-preview-section {\n background: #f9fafb;\n border-color: #e5e7eb;\n}\n\n.wallet-modal-preview-item {\n display: flex;\n flex-direction: column;\n gap: 4px;\n}\n\n.wallet-modal-preview-label {\n font-size: 12px;\n opacity: 0.7;\n text-align: left;\n}\n\n.wallet-modal-preview-value {\n font-size: 14px;\n font-weight: 500;\n word-break: break-all;\n text-align: left;\n}\n\n.wallet-modal-theme-dark .wallet-modal-preview-label,\n.wallet-modal-theme-dark .wallet-modal-preview-value {\n color: #ffffff;\n}\n\n.wallet-modal-theme-light .wallet-modal-preview-label,\n.wallet-modal-theme-light .wallet-modal-preview-value {\n color: #111827;\n}\n\n.wallet-modal-preview-actions {\n display: flex;\n flex-direction: column;\n gap: 12px;\n}\n\n.wallet-modal-preview-btn {\n width: 100%;\n padding: 14px 24px;\n border-radius: 12px;\n border: none;\n font-size: 16px;\n font-weight: 600;\n cursor: pointer;\n transition: all 0.2s;\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 8px;\n}\n\n.wallet-modal-preview-btn:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n.wallet-modal-preview-btn-primary {\n background: var(--abstraxn-primary);\n color: var(--abstraxn-primary-text);\n}\n\n.wallet-modal-preview-btn-primary:hover:not(:disabled) {\n background: var(--abstraxn-primary-hover);\n transform: translateY(-1px);\n}\n\n.wallet-modal-preview-btn-secondary {\n background: transparent;\n border: 1px solid;\n}\n\n.wallet-modal-theme-dark .wallet-modal-preview-btn-secondary {\n border-color: #3a3a3a;\n color: #ffffff;\n}\n\n.wallet-modal-theme-light .wallet-modal-preview-btn-secondary {\n border-color: #e5e7eb;\n color: #111827;\n}\n\n.wallet-modal-theme-dark .wallet-modal-preview-btn-secondary:hover:not(:disabled) {\n background: #3a3a3a;\n}\n\n.wallet-modal-theme-light .wallet-modal-preview-btn-secondary:hover:not(:disabled) {\n background: #f3f4f6;\n}\n\n/* .wallet-modal-loading-spinner and @keyframes spin are defined once in WalletModal.css,\n always bundled alongside this file's CSS in the same shadow root. */\n";
@@ -2,7 +2,6 @@
2
2
  * Preview Transaction Modal Component
3
3
  */
4
4
  import type { ChainData } from '../../../chains';
5
- import './PreviewTransactionModal.css';
6
5
  export interface PreviewTransactionModalProps {
7
6
  isOpen: boolean;
8
7
  onClose: () => void;
@@ -1,6 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  import { formatAddress } from '../utils/formatUtils';
3
- import './PreviewTransactionModal.css';
4
3
  export function PreviewTransactionModal({ isOpen, onClose, onConfirm, recipientAddress, amount, displayAddress, currentChain, isSending, theme = 'dark', }) {
5
4
  if (!isOpen)
6
5
  return null;
@@ -0,0 +1,2 @@
1
+ declare const cssText: string;
2
+ export default cssText;
@@ -0,0 +1 @@
1
+ export default "/* Receive Funds modal - styled to match the provided design screenshot */\n\n/* Modal padding */\n.wallet-modal-content.wallet-modal-receive {\n padding: 20px;\n gap: 0;\n}\n\n/* Header */\n.wallet-modal-content.wallet-modal-receive .wallet-modal-receive-header {\n}\n\n.wallet-modal-content.wallet-modal-receive .wallet-modal-receive-title {\n font-size: 18px;\n font-weight: 600;\n margin: 0;\n flex: 1;\n text-align: center;\n}\n\n/* Content */\n.wallet-modal-receive-content {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 18px;\n padding: 0;\n margin-top: 12px;\n}\n\n/* QR */\n.wallet-modal-receive-qr-card {\n position: relative;\n}\n\n.wallet-modal-receive-qr {\n width: 100%;\n padding: 18px;\n background: #ffffff;\n border-radius: 18px;\n border: 1px solid #e5e7eb;\n display: flex;\n align-items: center;\n justify-content: center;\n box-shadow: 0 10px 25px -15px rgba(0, 0, 0, 0.25);\n}\n\n.wallet-modal-receive-qr-badge {\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n pointer-events: none;\n}\n\n.wallet-modal-receive-qr-badge-inner {\n width: 56px;\n height: 56px;\n border-radius: 16px;\n background: #ffffff;\n border: 1px solid #e5e7eb;\n display: flex;\n align-items: center;\n justify-content: center;\n color: #2563eb;\n}\n\n/* Address \"input\" row */\n.wallet-modal-receive-address-row {\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 12px;\n padding: 14px 16px;\n border-radius: 12px;\n border: 1px solid;\n cursor: pointer;\n transition: all 0.2s ease;\n}\n\n.wallet-modal-receive-address-text {\n flex: 1;\n text-align: left;\n font-size: 15px;\n font-weight: 600;\n font-family: 'GeistMono', 'SF Mono', 'Monaco', 'Roboto Mono', monospace;\n}\n\n.wallet-modal-receive-copy-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n}\n\n.wallet-modal-theme-light .wallet-modal-receive-address-row {\n background: #ffffff;\n border-color: #e5e7eb;\n color: #111827;\n}\n\n.wallet-modal-theme-light .wallet-modal-receive-address-row:hover {\n background: #f9fafb;\n}\n\n.wallet-modal-theme-dark .wallet-modal-receive-address-row {\n background: #1a1a1a;\n border-color: #3a3a3a;\n color: #ffffff;\n}\n\n.wallet-modal-theme-dark .wallet-modal-receive-address-row:hover {\n background: #202020;\n}\n\n.wallet-modal-receive-address-row.copied {\n border-color: rgba(16, 185, 129, 0.55);\n box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18);\n}\n\n/* Helper text */\n.wallet-modal-receive-helper {\n font-size: 12px;\n text-align: center;\n margin: 0;\n}\n\n.wallet-modal-theme-light .wallet-modal-receive-helper {\n color: #6b7280;\n}\n\n.wallet-modal-theme-dark .wallet-modal-receive-helper {\n color: #9ca3af;\n}\n";
@@ -1,4 +1,3 @@
1
- import './ReceiveModal.css';
2
1
  export interface ReceiveModalProps {
3
2
  isOpen: boolean;
4
3
  onClose: () => void;
@@ -5,7 +5,7 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
5
5
  import { useState, useCallback } from 'react';
6
6
  import { QRCode } from '../../QRCode';
7
7
  import { formatAddress } from '../utils/formatUtils';
8
- import './ReceiveModal.css';
8
+ import { CloseIcon } from '../../icons';
9
9
  export function ReceiveModal({ isOpen, onClose, address, theme = 'dark', }) {
10
10
  const [copied, setCopied] = useState(false);
11
11
  const handleCopy = useCallback(() => {
@@ -17,6 +17,6 @@ export function ReceiveModal({ isOpen, onClose, address, theme = 'dark', }) {
17
17
  }, [address]);
18
18
  if (!isOpen)
19
19
  return null;
20
- return (_jsx("div", { className: `wallet-modal-overlay wallet-modal-theme-${theme}`, onClick: onClose, children: _jsxs("div", { className: `wallet-modal-content wallet-modal-theme-${theme} wallet-modal-receive`, onClick: (e) => e.stopPropagation(), children: [_jsxs("div", { className: "wallet-modal-receive-header", children: [_jsx("button", { className: "wallet-modal-back", onClick: onClose, children: _jsx("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", children: _jsx("path", { d: "M12.5 15L7.5 10L12.5 5", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }) }), _jsx("h2", { className: "wallet-modal-receive-title", children: "Receive Funds" }), _jsx("button", { className: "wallet-modal-close", onClick: onClose, "aria-label": "Close", children: _jsx("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", children: _jsx("path", { d: "M15 5L5 15M5 5L15 15", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }) })] }), _jsx("div", { className: "wallet-modal-receive-content", children: address && (_jsxs(_Fragment, { children: [_jsxs("div", { className: "wallet-modal-receive-qr-card", children: [_jsx("div", { className: "wallet-modal-receive-qr", children: _jsx(QRCode, { value: address, size: 260 }) }), _jsx("div", { className: "wallet-modal-receive-qr-badge", "aria-hidden": "true", children: _jsx("div", { className: "wallet-modal-receive-qr-badge-inner", children: _jsxs("svg", { width: "26", height: "26", viewBox: "0 0 24 24", fill: "none", children: [_jsx("path", { d: "M4 7.5C4 6.67157 4.67157 6 5.5 6H18.5C19.3284 6 20 6.67157 20 7.5V16.5C20 17.3284 19.3284 18 18.5 18H5.5C4.67157 18 4 17.3284 4 16.5V7.5Z", stroke: "currentColor", strokeWidth: "2", strokeLinejoin: "round" }), _jsx("path", { d: "M5.5 7.5L12 12L18.5 7.5", stroke: "currentColor", strokeWidth: "2", strokeLinejoin: "round", strokeLinecap: "round" })] }) }) })] }), _jsxs("button", { type: "button", className: `wallet-modal-receive-address-row wallet-modal-theme-${theme} ${copied ? 'copied' : ''}`, onClick: handleCopy, "aria-label": "Copy wallet address", children: [_jsx("span", { className: "wallet-modal-receive-address-text", children: formatAddress(address) }), _jsx("span", { className: "wallet-modal-receive-copy-icon", "aria-hidden": "true", children: copied ? (_jsx("svg", { width: "18", height: "18", viewBox: "0 0 16 16", fill: "none", children: _jsx("path", { d: "M13.5 4L6 11.5L2.5 8", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) })) : (_jsx("svg", { width: "18", height: "18", viewBox: "0 0 16 16", fill: "none", children: _jsx("path", { d: "M5.5 4.5H3.5C2.67157 4.5 2 5.17157 2 6V12.5C2 13.3284 2.67157 14 3.5 14H10C10.8284 14 11.5 13.3284 11.5 12.5V10.5M5.5 4.5C5.5 3.67157 6.17157 3 7 3H10.5C11.3284 3 12 3.67157 12 4.5V8M5.5 4.5C5.5 5.32843 6.17157 6 7 6H10.5", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) })) })] }), _jsx("p", { className: "wallet-modal-receive-helper", children: "Copy the address to send funds to this wallet" })] })) })] }) }));
20
+ return (_jsx("div", { className: `wallet-modal-overlay wallet-modal-theme-${theme}`, onClick: onClose, children: _jsxs("div", { className: `wallet-modal-content wallet-modal-theme-${theme} wallet-modal-receive`, onClick: (e) => e.stopPropagation(), children: [_jsxs("div", { className: "wallet-modal-receive-header", children: [_jsx("button", { className: "wallet-modal-back", onClick: onClose, children: _jsx("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", children: _jsx("path", { d: "M12.5 15L7.5 10L12.5 5", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }) }), _jsx("h2", { className: "wallet-modal-receive-title", children: "Receive Funds" }), _jsx("button", { className: "wallet-modal-close", onClick: onClose, "aria-label": "Close", children: _jsx(CloseIcon, { size: 20 }) })] }), _jsx("div", { className: "wallet-modal-receive-content", children: address && (_jsxs(_Fragment, { children: [_jsxs("div", { className: "wallet-modal-receive-qr-card", children: [_jsx("div", { className: "wallet-modal-receive-qr", children: _jsx(QRCode, { value: address, size: 260 }) }), _jsx("div", { className: "wallet-modal-receive-qr-badge", "aria-hidden": "true", children: _jsx("div", { className: "wallet-modal-receive-qr-badge-inner", children: _jsxs("svg", { width: "26", height: "26", viewBox: "0 0 24 24", fill: "none", children: [_jsx("path", { d: "M4 7.5C4 6.67157 4.67157 6 5.5 6H18.5C19.3284 6 20 6.67157 20 7.5V16.5C20 17.3284 19.3284 18 18.5 18H5.5C4.67157 18 4 17.3284 4 16.5V7.5Z", stroke: "currentColor", strokeWidth: "2", strokeLinejoin: "round" }), _jsx("path", { d: "M5.5 7.5L12 12L18.5 7.5", stroke: "currentColor", strokeWidth: "2", strokeLinejoin: "round", strokeLinecap: "round" })] }) }) })] }), _jsxs("button", { type: "button", className: `wallet-modal-receive-address-row wallet-modal-theme-${theme} ${copied ? 'copied' : ''}`, onClick: handleCopy, "aria-label": "Copy wallet address", children: [_jsx("span", { className: "wallet-modal-receive-address-text", children: formatAddress(address) }), _jsx("span", { className: "wallet-modal-receive-copy-icon", "aria-hidden": "true", children: copied ? (_jsx("svg", { width: "18", height: "18", viewBox: "0 0 16 16", fill: "none", children: _jsx("path", { d: "M13.5 4L6 11.5L2.5 8", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) })) : (_jsx("svg", { width: "18", height: "18", viewBox: "0 0 16 16", fill: "none", children: _jsx("path", { d: "M5.5 4.5H3.5C2.67157 4.5 2 5.17157 2 6V12.5C2 13.3284 2.67157 14 3.5 14H10C10.8284 14 11.5 13.3284 11.5 12.5V10.5M5.5 4.5C5.5 3.67157 6.17157 3 7 3H10.5C11.3284 3 12 3.67157 12 4.5V8M5.5 4.5C5.5 5.32843 6.17157 6 7 6H10.5", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) })) })] }), _jsx("p", { className: "wallet-modal-receive-helper", children: "Copy the address to send funds to this wallet" })] })) })] }) }));
21
21
  }
22
22
  //# sourceMappingURL=ReceiveModal.js.map
@@ -0,0 +1,2 @@
1
+ declare const cssText: string;
2
+ export default cssText;
@@ -0,0 +1 @@
1
+ export default "/* Send Modal Styles - Clean minimal design */\n\n/* Override modal padding for send modal */\n.wallet-modal-content.wallet-modal-send {\n padding: 20px;\n gap: 0;\n}\n\n/* Header */\n.wallet-modal-send-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 0;\n}\n\n.wallet-modal-send-title {\n font-size: 18px;\n font-weight: 600;\n margin: 0;\n color: #111827;\n}\n\n.wallet-modal-theme-dark .wallet-modal-send-title {\n color: #ffffff;\n}\n\n\n/* Content */\n.wallet-modal-send-content {\n display: flex;\n flex-direction: column;\n gap: 16px;\n padding: 0;\n margin-top: 16px;\n}\n\n.wallet-modal-send-field {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n\n.wallet-modal-send-label {\n font-size: 14px;\n font-weight: 500;\n color: #374151;\n text-align: left;\n}\n\n.wallet-modal-theme-dark .wallet-modal-send-label {\n color: #9ca3af;\n}\n\n/* Token Card */\n.wallet-modal-send-token-card {\n display: flex;\n align-items: center;\n gap: 12px;\n width: 100%;\n padding: 12px;\n border-radius: 12px;\n border: 1px solid #e5e7eb;\n background: #ffffff;\n cursor: pointer;\n transition: all 0.2s;\n text-align: left;\n}\n\n.wallet-modal-send-token-card:hover {\n border-color: #3b82f6;\n}\n\n.wallet-modal-theme-dark .wallet-modal-send-token-card {\n border-color: #3a3a3a;\n background: #1a1a1a;\n}\n\n.wallet-modal-theme-dark .wallet-modal-send-token-card:hover {\n border-color: #3b82f6;\n}\n\n.wallet-modal-send-token-icon {\n width: 40px;\n height: 40px;\n flex-shrink: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.wallet-modal-send-token-icon img {\n width: 100%;\n height: 100%;\n border-radius: 50%;\n object-fit: cover;\n}\n\n.wallet-modal-send-token-icon-placeholder {\n width: 100%;\n height: 100%;\n border-radius: 50%;\n background: #e5e7eb;\n display: flex;\n align-items: center;\n justify-content: center;\n font-weight: 600;\n font-size: 16px;\n color: #6b7280;\n}\n\n.wallet-modal-theme-dark .wallet-modal-send-token-icon-placeholder {\n background: #2a2a2a;\n color: #9ca3af;\n}\n\n.wallet-modal-send-token-details {\n display: flex;\n flex-direction: column;\n gap: 2px;\n}\n\n.wallet-modal-send-token-name {\n font-size: 16px;\n font-weight: 600;\n color: #111827;\n}\n\n.wallet-modal-theme-dark .wallet-modal-send-token-name {\n color: #ffffff;\n}\n\n.wallet-modal-send-token-balance {\n font-size: 13px;\n color: #6b7280;\n}\n\n.wallet-modal-theme-dark .wallet-modal-send-token-balance {\n color: #9ca3af;\n}\n\n/* Input Fields */\n.wallet-modal-send-input {\n width: 100%;\n padding: 12px 14px;\n border-radius: 12px;\n border: 1px solid #e5e7eb;\n background: #ffffff;\n font-size: 15px;\n outline: none;\n transition: all 0.2s;\n box-sizing: border-box;\n color: #111827;\n}\n\n.wallet-modal-send-input::placeholder {\n color: #9ca3af;\n}\n\n.wallet-modal-send-input:focus {\n border-color: #3b82f6;\n}\n\n.wallet-modal-send-input.error {\n border-color: #ef4444;\n}\n\n.wallet-modal-theme-dark .wallet-modal-send-input {\n border-color: #3a3a3a;\n background: #1a1a1a;\n color: #ffffff;\n}\n\n.wallet-modal-theme-dark .wallet-modal-send-input::placeholder {\n color: #6b7280;\n}\n\n.wallet-modal-theme-dark .wallet-modal-send-input:focus {\n border-color: #3b82f6;\n}\n\n/* Amount Box */\n.wallet-modal-send-amount-box {\n display: flex;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n padding: 12px 14px;\n border-radius: 12px;\n border: 1px solid #e5e7eb;\n background: #ffffff;\n box-sizing: border-box;\n transition: all 0.2s;\n}\n\n.wallet-modal-send-amount-box:focus-within {\n border-color: #3b82f6;\n}\n\n.wallet-modal-send-amount-box.error {\n border-color: #ef4444;\n}\n\n.wallet-modal-theme-dark .wallet-modal-send-amount-box {\n border-color: #3a3a3a;\n background: #1a1a1a;\n}\n\n.wallet-modal-theme-dark .wallet-modal-send-amount-box:focus-within {\n border-color: #3b82f6;\n}\n\n.wallet-modal-send-amount-input {\n flex: 1;\n border: none;\n background: transparent;\n font-size: 15px;\n outline: none;\n min-width: 0;\n color: #111827;\n padding: 0;\n}\n\n.wallet-modal-send-amount-input::placeholder {\n color: #9ca3af;\n}\n\n.wallet-modal-theme-dark .wallet-modal-send-amount-input {\n color: #ffffff;\n}\n\n.wallet-modal-theme-dark .wallet-modal-send-amount-input::placeholder {\n color: #6b7280;\n}\n\n.wallet-modal-send-amount-symbol {\n font-size: 15px;\n font-weight: 500;\n color: #6b7280;\n flex-shrink: 0;\n margin-left: 8px;\n}\n\n.wallet-modal-theme-dark .wallet-modal-send-amount-symbol {\n color: #9ca3af;\n}\n\n/* Error Message */\n.wallet-modal-send-error {\n font-size: 12px;\n color: #ef4444;\n text-align: left;\n}\n\n/* Send Button */\n.wallet-modal-send-btn {\n width: 100%;\n padding: 14px 24px;\n border-radius: 12px;\n border: none;\n font-size: 16px;\n font-weight: 600;\n cursor: pointer;\n transition: all 0.2s;\n background: #3b82f6;\n color: #ffffff;\n margin-top: 8px;\n}\n\n.wallet-modal-send-btn:hover:not(.disabled) {\n background: #2563eb;\n}\n\n.wallet-modal-send-btn.disabled {\n opacity: 0.5;\n cursor: not-allowed;\n}\n";
@@ -1,5 +1,5 @@
1
1
  import type { ChainData } from "../../../chains";
2
- import "./SendModal.css";
2
+ import { type TokenData } from "./TokenSelectorModal";
3
3
  export interface SendModalProps {
4
4
  isOpen: boolean;
5
5
  onClose: () => void;
@@ -8,9 +8,12 @@ export interface SendModalProps {
8
8
  availableBalance: bigint | null;
9
9
  externalWalletBalance: bigint | null;
10
10
  walletBalance: bigint | null;
11
+ /** Live token list (native + non-native) from useTokenBalances()/useSolanaTokenBalances(), passed down by WalletModal so both surfaces share one fetch. */
12
+ liveTokens: TokenData[];
13
+ liveTokensLoading?: boolean;
11
14
  sendTransaction?: (tx: any) => Promise<{
12
15
  hash: string;
13
16
  }>;
14
17
  theme?: "light" | "dark";
15
18
  }
16
- export declare function SendModal({ isOpen, onClose, currentChain, displayAddress, availableBalance, externalWalletBalance, walletBalance, sendTransaction, theme, }: SendModalProps): import("react/jsx-runtime").JSX.Element | null;
19
+ export declare function SendModal({ isOpen, onClose, currentChain, displayAddress, availableBalance, externalWalletBalance, walletBalance, liveTokens, liveTokensLoading, sendTransaction, theme, }: SendModalProps): import("react/jsx-runtime").JSX.Element | null;
@@ -10,8 +10,8 @@ import { useAddressValidation } from "../hooks/useAddressValidation";
10
10
  import { useAmountValidation } from "../hooks/useAmountValidation";
11
11
  import { useSendTransaction } from "../hooks/useSendTransaction";
12
12
  import { formatBalanceValue } from "../utils/formatUtils";
13
- import "./SendModal.css";
14
- export function SendModal({ isOpen, onClose, currentChain, displayAddress, availableBalance, externalWalletBalance, walletBalance, sendTransaction, theme = "dark", }) {
13
+ import { CloseIcon } from "../../icons";
14
+ export function SendModal({ isOpen, onClose, currentChain, displayAddress, availableBalance, externalWalletBalance, walletBalance, liveTokens, liveTokensLoading, sendTransaction, theme = "dark", }) {
15
15
  const [recipientAddress, setRecipientAddress] = useState("");
16
16
  const [amount, setAmount] = useState("");
17
17
  const [addressError, setAddressError] = useState("");
@@ -20,88 +20,31 @@ export function SendModal({ isOpen, onClose, currentChain, displayAddress, avail
20
20
  const [showTokenSelector, setShowTokenSelector] = useState(false);
21
21
  const [selectedToken, setSelectedToken] = useState(null);
22
22
  const balance = externalWalletBalance || walletBalance || availableBalance;
23
- // Get available tokens for the current chain
23
+ // Available tokens for the current chain: prefer the live list (native + non-native,
24
+ // real balances) passed down from WalletModal; fall back to a single native-only
25
+ // entry while it's still loading or if the chain isn't Turnkey-covered and no RPC
26
+ // fallback entry has landed yet.
24
27
  const availableTokens = useMemo(() => {
25
28
  if (!currentChain)
26
29
  return [];
27
- const nativeToken = {
28
- address: "0x0",
29
- symbol: currentChain.nativeCurrency.symbol,
30
- name: currentChain.nativeCurrency.name,
31
- decimals: currentChain.nativeCurrency.decimals,
32
- iconUrl: currentChain.iconUrl,
33
- balance: balance || 0n,
34
- isNative: true,
35
- };
36
- // Example tokens for Ethereum (you can expand this for other chains)
37
- const tokensByChain = {
38
- 1: [
39
- // Ethereum Mainnet
40
- nativeToken,
41
- {
42
- address: "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
43
- symbol: "WETH",
44
- name: "Wrapped Ether",
45
- decimals: 18,
46
- iconUrl: "https://raw.githubusercontent.com/spothq/cryptocurrency-icons/master/128/color/eth.png",
47
- balance: 0n,
48
- },
49
- {
50
- address: "0xdAC17F958D2ee523a2206206994597C13D831ec7",
51
- symbol: "USDT",
52
- name: "Tether USD",
53
- decimals: 6,
54
- iconUrl: "https://raw.githubusercontent.com/spothq/cryptocurrency-icons/master/128/color/usdt.png",
55
- balance: 0n,
56
- },
57
- {
58
- address: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
59
- symbol: "USDC",
60
- name: "USD Coin",
61
- decimals: 6,
62
- iconUrl: "https://raw.githubusercontent.com/spothq/cryptocurrency-icons/master/128/color/usdc.png",
63
- balance: 0n,
64
- },
65
- {
66
- address: "0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599",
67
- symbol: "WBTC",
68
- name: "Wrapped Bitcoin",
69
- decimals: 8,
70
- iconUrl: "https://raw.githubusercontent.com/spothq/cryptocurrency-icons/master/128/color/btc.png",
71
- balance: 0n,
72
- },
73
- ],
74
- 137: [
75
- // Polygon Mainnet
76
- nativeToken,
77
- {
78
- address: "0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270",
79
- symbol: "WMATIC",
80
- name: "Wrapped Matic",
81
- decimals: 18,
82
- iconUrl: "https://raw.githubusercontent.com/spothq/cryptocurrency-icons/master/128/color/matic.png",
83
- balance: 0n,
84
- },
85
- {
86
- address: "0xc2132D05D31c914a87C6611C10748AEb04B58e8F",
87
- symbol: "USDT",
88
- name: "Tether USD",
89
- decimals: 6,
90
- iconUrl: "https://raw.githubusercontent.com/spothq/cryptocurrency-icons/master/128/color/usdt.png",
91
- balance: 0n,
92
- },
93
- {
94
- address: "0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174",
95
- symbol: "USDC",
96
- name: "USD Coin",
97
- decimals: 6,
98
- iconUrl: "https://raw.githubusercontent.com/spothq/cryptocurrency-icons/master/128/color/usdc.png",
99
- balance: 0n,
100
- },
101
- ],
102
- };
103
- return tokensByChain[currentChain.id] || [nativeToken];
104
- }, [currentChain, balance]);
30
+ if (liveTokens.length > 0) {
31
+ return liveTokens;
32
+ }
33
+ if (liveTokensLoading) {
34
+ return [];
35
+ }
36
+ return [
37
+ {
38
+ address: "0x0",
39
+ symbol: currentChain.nativeCurrency.symbol,
40
+ name: currentChain.nativeCurrency.name,
41
+ decimals: currentChain.nativeCurrency.decimals,
42
+ iconUrl: currentChain.iconUrl,
43
+ balance: balance || 0n,
44
+ isNative: true,
45
+ },
46
+ ];
47
+ }, [currentChain, liveTokens, liveTokensLoading, balance]);
105
48
  // Initialize selected token when chain changes
106
49
  useEffect(() => {
107
50
  if (currentChain && availableTokens.length > 0) {
@@ -214,6 +157,6 @@ export function SendModal({ isOpen, onClose, currentChain, displayAddress, avail
214
157
  if (showTokenSelector) {
215
158
  return (_jsx(TokenSelectorModal, { isOpen: true, onClose: () => setShowTokenSelector(false), onTokenSelect: handleTokenSelect, currentChain: currentChain, tokens: availableTokens, selectedToken: selectedToken || undefined, theme: theme }));
216
159
  }
217
- return (_jsx("div", { className: `wallet-modal-overlay wallet-modal-theme-${theme}`, onClick: onClose, children: _jsxs("div", { className: `wallet-modal-content wallet-modal-theme-${theme} wallet-modal-send`, onClick: (e) => e.stopPropagation(), children: [_jsxs("div", { className: "wallet-modal-send-header", children: [_jsx("button", { className: "wallet-modal-back", onClick: onClose, "aria-label": "Go back", children: _jsx("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", "aria-hidden": "true", children: _jsx("path", { d: "M12.5 15L7.5 10L12.5 5", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }) }), _jsx("h2", { className: "wallet-modal-send-title", children: "Send Funds" }), _jsx("button", { className: "wallet-modal-close", onClick: onClose, "aria-label": "Close", children: _jsx("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", "aria-hidden": "true", children: _jsx("path", { d: "M15 5L5 15M5 5L15 15", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }) })] }), _jsxs("div", { className: "wallet-modal-send-content", children: [_jsxs("div", { className: "wallet-modal-send-field", children: [_jsx("label", { className: "wallet-modal-send-label", children: "Token" }), _jsxs("button", { className: "wallet-modal-send-token-card", onClick: () => setShowTokenSelector(true), type: "button", children: [_jsx("div", { className: "wallet-modal-send-token-icon", children: selectedToken?.iconUrl ? (_jsx("img", { src: selectedToken.iconUrl, alt: selectedToken.name })) : (_jsx("div", { className: "wallet-modal-send-token-icon-placeholder", children: selectedToken?.symbol?.charAt(0) || "?" })) }), _jsxs("div", { className: "wallet-modal-send-token-details", children: [_jsx("span", { className: "wallet-modal-send-token-name", children: selectedToken?.name || "Ether" }), _jsxs("span", { className: "wallet-modal-send-token-balance", children: [availableBalanceValue, " ", symbol] })] })] })] }), _jsxs("div", { className: "wallet-modal-send-field", children: [_jsx("label", { className: "wallet-modal-send-label", children: "Send to" }), _jsx("input", { type: "text", className: `wallet-modal-send-input ${addressError ? "error" : ""}`, placeholder: "0x... or ENS name", value: recipientAddress, onChange: (e) => handleRecipientAddressChange(e.target.value) }), addressError && (_jsx("div", { className: "wallet-modal-send-error", children: addressError }))] }), _jsxs("div", { className: "wallet-modal-send-field", children: [_jsx("label", { className: "wallet-modal-send-label", children: "Amount" }), _jsxs("div", { className: `wallet-modal-send-amount-box ${amountError ? "error" : ""}`, children: [_jsx("input", { type: "text", className: "wallet-modal-send-amount-input", placeholder: "0", value: amount, onChange: (e) => handleAmountChange(e.target.value) }), _jsx("span", { className: "wallet-modal-send-amount-symbol", children: symbol })] }), amountError && (_jsx("div", { className: "wallet-modal-send-error", children: amountError }))] }), _jsx("button", { className: `wallet-modal-send-btn ${!isFormValid ? "disabled" : ""}`, onClick: handlePreviewTransaction, disabled: !isFormValid, children: "Send" })] })] }) }));
160
+ return (_jsx("div", { className: `wallet-modal-overlay wallet-modal-theme-${theme}`, onClick: onClose, children: _jsxs("div", { className: `wallet-modal-content wallet-modal-theme-${theme} wallet-modal-send`, onClick: (e) => e.stopPropagation(), children: [_jsxs("div", { className: "wallet-modal-send-header", children: [_jsx("button", { className: "wallet-modal-back", onClick: onClose, "aria-label": "Go back", children: _jsx("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", "aria-hidden": "true", children: _jsx("path", { d: "M12.5 15L7.5 10L12.5 5", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }) }), _jsx("h2", { className: "wallet-modal-send-title", children: "Send Funds" }), _jsx("button", { className: "wallet-modal-close", onClick: onClose, "aria-label": "Close", children: _jsx(CloseIcon, { size: 20 }) })] }), _jsxs("div", { className: "wallet-modal-send-content", children: [_jsxs("div", { className: "wallet-modal-send-field", children: [_jsx("label", { className: "wallet-modal-send-label", children: "Token" }), _jsxs("button", { className: "wallet-modal-send-token-card", onClick: () => setShowTokenSelector(true), type: "button", children: [_jsx("div", { className: "wallet-modal-send-token-icon", children: selectedToken?.iconUrl ? (_jsx("img", { src: selectedToken.iconUrl, alt: selectedToken.name })) : (_jsx("div", { className: "wallet-modal-send-token-icon-placeholder", children: selectedToken?.symbol?.charAt(0) || "?" })) }), _jsxs("div", { className: "wallet-modal-send-token-details", children: [_jsx("span", { className: "wallet-modal-send-token-name", children: selectedToken?.name || "Ether" }), _jsxs("span", { className: "wallet-modal-send-token-balance", children: [availableBalanceValue, " ", symbol] })] })] })] }), _jsxs("div", { className: "wallet-modal-send-field", children: [_jsx("label", { className: "wallet-modal-send-label", children: "Send to" }), _jsx("input", { type: "text", className: `wallet-modal-send-input ${addressError ? "error" : ""}`, placeholder: "0x... or ENS name", value: recipientAddress, onChange: (e) => handleRecipientAddressChange(e.target.value) }), addressError && (_jsx("div", { className: "wallet-modal-send-error", children: addressError }))] }), _jsxs("div", { className: "wallet-modal-send-field", children: [_jsx("label", { className: "wallet-modal-send-label", children: "Amount" }), _jsxs("div", { className: `wallet-modal-send-amount-box ${amountError ? "error" : ""}`, children: [_jsx("input", { type: "text", className: "wallet-modal-send-amount-input", placeholder: "0", value: amount, onChange: (e) => handleAmountChange(e.target.value) }), _jsx("span", { className: "wallet-modal-send-amount-symbol", children: symbol })] }), amountError && (_jsx("div", { className: "wallet-modal-send-error", children: amountError }))] }), _jsx("button", { className: `wallet-modal-send-btn ${!isFormValid ? "disabled" : ""}`, onClick: handlePreviewTransaction, disabled: !isFormValid, children: "Send" })] })] }) }));
218
161
  }
219
162
  //# sourceMappingURL=SendModal.js.map
@@ -0,0 +1 @@
1
+ export declare function SignMfaModalHost(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,50 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ /**
3
+ * Host that registers the sign-MFA code requester with the bridge and
4
+ * opens the shared MfaVerifyModal when a signing hook needs step-up.
5
+ */
6
+ import { useCallback, useEffect, useRef, useState } from "react";
7
+ import { useAbstraxnWallet } from "../../AbstraxnProvider/useAbstraxnWallet";
8
+ import { registerSignMfaCodeRequester } from "../../../signMfaBridge";
9
+ import { MfaVerifyModal } from "./MfaVerifyModal";
10
+ export function SignMfaModalHost() {
11
+ const { uiConfig } = useAbstraxnWallet();
12
+ const theme = uiConfig?.theme === "dark" ? "dark" : "light";
13
+ const [open, setOpen] = useState(false);
14
+ const pendingRef = useRef(null);
15
+ const clearPending = useCallback((error) => {
16
+ const pending = pendingRef.current;
17
+ pendingRef.current = null;
18
+ setOpen(false);
19
+ if (pending && error) {
20
+ pending.reject(error);
21
+ }
22
+ }, []);
23
+ useEffect(() => {
24
+ const unregister = registerSignMfaCodeRequester(() => new Promise((resolve, reject) => {
25
+ if (pendingRef.current) {
26
+ pendingRef.current.reject(new Error("MFA step-up was replaced by a newer signing request."));
27
+ }
28
+ pendingRef.current = { resolve, reject };
29
+ setOpen(true);
30
+ }));
31
+ return () => {
32
+ unregister();
33
+ if (pendingRef.current) {
34
+ pendingRef.current.reject(new Error("MFA step-up cancelled because the provider unmounted."));
35
+ pendingRef.current = null;
36
+ }
37
+ };
38
+ }, []);
39
+ const handleSubmit = useCallback((code) => {
40
+ const pending = pendingRef.current;
41
+ pendingRef.current = null;
42
+ setOpen(false);
43
+ pending?.resolve(code);
44
+ }, []);
45
+ const handleCancel = useCallback(() => {
46
+ clearPending(new Error("MFA step-up was cancelled."));
47
+ }, [clearPending]);
48
+ return (_jsx(MfaVerifyModal, { isOpen: open, theme: theme, portal: true, title: "Approve signing", description: "Enter your authentication code to approve this signing request.", submitLabel: "Continue", onSubmit: handleSubmit, onCancel: handleCancel }));
49
+ }
50
+ //# sourceMappingURL=SignMfaModalHost.js.map
@@ -0,0 +1,2 @@
1
+ declare const cssText: string;
2
+ export default cssText;
@@ -0,0 +1 @@
1
+ export default "/* Success Modal Styles */\n.wallet-modal-success-content {\n padding: 40px 20px;\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 20px;\n text-align: center;\n}\n\n.wallet-modal-success-icon {\n width: 64px;\n height: 64px;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.wallet-modal-content .wallet-modal-success-title {\n font-size: 24px;\n font-weight: 500;\n margin: 0;\n}\n\n.wallet-modal-content.wallet-modal-theme-dark .wallet-modal-success-title {\n color: #ffffff;\n}\n\n.wallet-modal-content.wallet-modal-theme-light .wallet-modal-success-title {\n color: #111827;\n}\n\n.wallet-modal-success-message {\n font-size: 14px;\n opacity: 0.7;\n margin: 0;\n}\n\n.wallet-modal-theme-dark .wallet-modal-success-message {\n color: #9ca3af;\n}\n\n.wallet-modal-theme-light .wallet-modal-success-message {\n color: #6b7280;\n}\n\n.wallet-modal-success-link {\n font-size: 14px;\n text-decoration: none;\n padding: 8px 16px;\n border-radius: 8px;\n transition: all 0.2s;\n}\n\n.wallet-modal-theme-dark .wallet-modal-success-link {\n color: #a855f7;\n background: rgba(147, 51, 234, 0.1);\n}\n\n.wallet-modal-theme-light .wallet-modal-success-link {\n color: #9333ea;\n background: rgba(147, 51, 234, 0.1);\n}\n\n.wallet-modal-success-link:hover {\n background: rgba(147, 51, 234, 0.2);\n}\n\n.wallet-modal-success-btn {\n width: 100%;\n padding: 14px 24px;\n border-radius: 12px;\n border: none;\n font-size: 16px;\n font-weight: 600;\n cursor: pointer;\n transition: all 0.2s;\n background: var(--abstraxn-primary);\n color: var(--abstraxn-primary-text);\n}\n\n.wallet-modal-success-btn:hover {\n background: var(--abstraxn-primary-hover);\n transform: translateY(-1px);\n}\n";
@@ -2,7 +2,6 @@
2
2
  * Success Modal Component
3
3
  */
4
4
  import type { ChainData } from '../../../chains';
5
- import './SuccessModal.css';
6
5
  export interface SuccessModalProps {
7
6
  isOpen: boolean;
8
7
  onClose: () => void;
@@ -1,5 +1,4 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import './SuccessModal.css';
3
2
  export function SuccessModal({ isOpen, onClose, txHash, currentChain, theme = 'dark', }) {
4
3
  if (!isOpen)
5
4
  return null;
@@ -0,0 +1,2 @@
1
+ declare const cssText: string;
2
+ export default cssText;
@@ -0,0 +1 @@
1
+ export default "/* Token Selector Modal Styles */\n\n.wallet-modal-token-selector {\n max-width: 420px;\n width: 100%;\n max-height: 85vh;\n display: flex;\n flex-direction: column;\n}\n\n.wallet-modal-token-selector-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 0;\n border-bottom: 1px solid;\n gap: 16px;\n}\n\n.wallet-modal-theme-dark .wallet-modal-token-selector-header {\n border-color: #2a2a2a;\n}\n\n.wallet-modal-theme-light .wallet-modal-token-selector-header {\n border-color: #e5e7eb;\n}\n\n.wallet-modal-content .wallet-modal-token-selector-title {\n font-size: 18px;\n font-weight: 500;\n margin: 0;\n flex: 1;\n text-align: center;\n}\n\n.wallet-modal-content.wallet-modal-theme-dark .wallet-modal-token-selector-title {\n color: #ffffff;\n}\n\n.wallet-modal-content.wallet-modal-theme-light .wallet-modal-token-selector-title {\n color: #111827;\n}\n\n.wallet-modal-token-selector-search {\n position: relative;\n display: flex;\n align-items: center;\n gap: 12px;\n border-bottom: 1px solid;\n}\n\n.wallet-modal-theme-dark .wallet-modal-token-selector-search {\n border-color: #2a2a2a;\n}\n\n.wallet-modal-theme-light .wallet-modal-token-selector-search {\n border-color: #e5e7eb;\n}\n\n.wallet-modal-token-selector-search-icon {\n flex-shrink: 0;\n opacity: 0.5;\n}\n\n.wallet-modal-theme-dark .wallet-modal-token-selector-search-icon {\n color: #9ca3af;\n}\n\n.wallet-modal-theme-light .wallet-modal-token-selector-search-icon {\n color: #6b7280;\n}\n\n.wallet-modal-token-selector-search-input {\n flex: 1;\n border: none;\n background: transparent;\n outline: none;\n font-size: 14px;\n padding: 8px 0;\n}\n\n.wallet-modal-theme-dark .wallet-modal-token-selector-search-input {\n color: #ffffff;\n}\n\n.wallet-modal-theme-light .wallet-modal-token-selector-search-input {\n color: #111827;\n}\n\n.wallet-modal-token-selector-search-input::placeholder {\n opacity: 0.5;\n}\n\n.wallet-modal-theme-dark .wallet-modal-token-selector-search-input::placeholder {\n color: #9ca3af;\n}\n\n.wallet-modal-theme-light .wallet-modal-token-selector-search-input::placeholder {\n color: #6b7280;\n}\n\n.wallet-modal-token-selector-list {\n flex: 1;\n overflow-y: auto;\n padding: 8px 0;\n}\n\n.wallet-modal-token-selector-empty {\n padding: 40px 0;\n text-align: center;\n opacity: 0.6;\n}\n\n.wallet-modal-theme-dark .wallet-modal-token-selector-empty {\n color: #9ca3af;\n}\n\n.wallet-modal-theme-light .wallet-modal-token-selector-empty {\n color: #6b7280;\n}\n\n.wallet-modal-token-selector-item {\n width: 100%;\n padding: 12px 0;\n background: transparent;\n border: none;\n cursor: pointer;\n transition: all 0.2s;\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 12px;\n text-align: left;\n}\n\n.wallet-modal-theme-dark .wallet-modal-token-selector-item {\n color: #ffffff;\n}\n\n.wallet-modal-theme-light .wallet-modal-token-selector-item {\n color: #111827;\n}\n\n.wallet-modal-theme-dark .wallet-modal-token-selector-item:hover {\n background: rgba(255, 255, 255, 0.05);\n}\n\n.wallet-modal-theme-light .wallet-modal-token-selector-item:hover {\n background: rgba(0, 0, 0, 0.03);\n}\n\n.wallet-modal-token-selector-item.selected {\n background: rgba(147, 51, 234, 0.1);\n}\n\n.wallet-modal-token-selector-item-info {\n display: flex;\n align-items: center;\n gap: 12px;\n flex: 1;\n min-width: 0;\n}\n\n.wallet-modal-token-selector-item-icon {\n width: 40px;\n height: 40px;\n flex-shrink: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.wallet-modal-token-selector-item-icon-img {\n width: 100%;\n height: 100%;\n border-radius: 50%;\n object-fit: cover;\n}\n\n.wallet-modal-token-selector-item-icon-placeholder {\n width: 100%;\n height: 100%;\n border-radius: 50%;\n display: flex;\n align-items: center;\n justify-content: center;\n font-weight: 700;\n font-size: 16px;\n text-transform: uppercase;\n}\n\n.wallet-modal-theme-dark .wallet-modal-token-selector-item-icon-placeholder {\n background: #2a2a2a;\n color: #9ca3af;\n}\n\n.wallet-modal-theme-light .wallet-modal-token-selector-item-icon-placeholder {\n background: #f1f5f9;\n color: #64748b;\n}\n\n.wallet-modal-token-selector-item-details {\n display: flex;\n flex-direction: column;\n gap: 4px;\n flex: 1;\n min-width: 0;\n}\n\n.wallet-modal-token-selector-item-name {\n font-size: 15px;\n font-weight: 600;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.wallet-modal-theme-dark .wallet-modal-token-selector-item-name {\n color: #ffffff;\n}\n\n.wallet-modal-theme-light .wallet-modal-token-selector-item-name {\n color: #111827;\n}\n\n.wallet-modal-token-selector-item-balance {\n font-size: 13px;\n opacity: 0.7;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.wallet-modal-theme-dark .wallet-modal-token-selector-item-balance {\n color: #9ca3af;\n}\n\n.wallet-modal-theme-light .wallet-modal-token-selector-item-balance {\n color: #6b7280;\n}\n";
@@ -1,5 +1,4 @@
1
1
  import type { ChainData } from "../../../chains";
2
- import "./TokenSelectorModal.css";
3
2
  export interface TokenData {
4
3
  address: string;
5
4
  symbol: string;
@@ -3,7 +3,6 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  * Token Selector Modal Component
4
4
  */
5
5
  import { useState, useEffect, useMemo } from "react";
6
- import "./TokenSelectorModal.css";
7
6
  export function TokenSelectorModal({ isOpen, onClose, onTokenSelect, tokens, selectedToken, theme = "dark", }) {
8
7
  const [searchQuery, setSearchQuery] = useState("");
9
8
  // Reset state when opened
@@ -1,4 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { GoogleIcon } from '../../icons';
2
3
  export function UserAvatar({ user, isExternalWalletConnected }) {
3
4
  const authProvider = (user?.authProvider || '').toLowerCase();
4
5
  // External wallet
@@ -7,7 +8,7 @@ export function UserAvatar({ user, isExternalWalletConnected }) {
7
8
  }
8
9
  // Google
9
10
  if (authProvider === 'google') {
10
- return (_jsxs("svg", { width: "32", height: "32", viewBox: "0 0 24 24", fill: "none", children: [_jsx("path", { d: "M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z", fill: "#4285F4" }), _jsx("path", { d: "M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z", fill: "#34A853" }), _jsx("path", { d: "M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z", fill: "#FBBC05" }), _jsx("path", { d: "M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z", fill: "#EA4335" })] }));
11
+ return _jsx(GoogleIcon, { size: 32 });
11
12
  }
12
13
  // Discord
13
14
  if (authProvider === 'discord') {
@@ -11,6 +11,8 @@ export { ExportWarningModal } from './ExportWarningModal';
11
11
  export { ExportKeyModal } from './ExportKeyModal';
12
12
  export { UserAvatar } from './UserAvatar';
13
13
  export { TokenSelectorModal } from './TokenSelectorModal';
14
+ export { MfaVerifyModal } from './MfaVerifyModal';
15
+ export { SignMfaModalHost } from './SignMfaModalHost';
14
16
  export type { ChainSelectorProps } from './ChainSelector';
15
17
  export type { SendModalProps } from './SendModal';
16
18
  export type { ReceiveModalProps } from './ReceiveModal';
@@ -21,3 +23,4 @@ export type { ExportWarningModalProps } from './ExportWarningModal';
21
23
  export type { ExportKeyModalProps } from './ExportKeyModal';
22
24
  export type { UserAvatarProps } from './UserAvatar';
23
25
  export type { TokenSelectorModalProps, TokenData } from './TokenSelectorModal';
26
+ export type { MfaVerifyModalProps } from './MfaVerifyModal';
@@ -11,4 +11,6 @@ export { ExportWarningModal } from './ExportWarningModal';
11
11
  export { ExportKeyModal } from './ExportKeyModal';
12
12
  export { UserAvatar } from './UserAvatar';
13
13
  export { TokenSelectorModal } from './TokenSelectorModal';
14
+ export { MfaVerifyModal } from './MfaVerifyModal';
15
+ export { SignMfaModalHost } from './SignMfaModalHost';
14
16
  //# sourceMappingURL=index.js.map
@@ -88,18 +88,30 @@ export function useSendTransaction({ sendTransaction, currentChain, fromAddress,
88
88
  value: valueWei,
89
89
  });
90
90
  const gasFees = await getGasPrice();
91
+ // Prefer legacy gasPrice when available. Ethermint/Cosmos EVM chains
92
+ // (e.g. BlockMaze) often advertise low EIP-1559 tips that fail the
93
+ // node's minimum-global-fee check, while eth_gasPrice matches the floor.
94
+ // Passing both fee styles makes viem serialize EIP-1559 and ignore gasPrice.
95
+ const gas = gasFees.gasPrice !== undefined
96
+ ? { gasLimit, gasPrice: gasFees.gasPrice }
97
+ : gasFees.maxFeePerGas !== undefined &&
98
+ gasFees.maxPriorityFeePerGas !== undefined
99
+ ? {
100
+ gasLimit,
101
+ maxFeePerGas: gasFees.maxFeePerGas,
102
+ maxPriorityFeePerGas: gasFees.maxPriorityFeePerGas,
103
+ }
104
+ : null;
105
+ if (!gas) {
106
+ throw new Error('Unable to determine gas price from the network');
107
+ }
91
108
  const result = await signAndSendTxn({
92
109
  from: fromAddress,
93
110
  to: recipientAddress,
94
111
  value: valueWei,
95
112
  data: '0x',
96
113
  chainId: currentChain.id,
97
- gas: {
98
- gasLimit: gasLimit,
99
- maxFeePerGas: gasFees.maxFeePerGas,
100
- maxPriorityFeePerGas: gasFees.maxPriorityFeePerGas,
101
- gasPrice: gasFees.gasPrice,
102
- },
114
+ gas,
103
115
  });
104
116
  setTxHash(result.hash);
105
117
  onSuccess?.(result.hash);
@@ -20,4 +20,6 @@ export declare function FiMail(props: IconProps): React.ReactElement<unknown, st
20
20
  export declare function FiLink(props: IconProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
21
21
  export declare function FiInfo(props: IconProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
22
22
  export declare function BiShieldQuarter(props: IconProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
23
+ export declare function CloseIcon(props: IconProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
24
+ export declare function GoogleIcon(props: IconProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
23
25
  export {};
@@ -32,4 +32,8 @@ export function FiMail(props) { return GenIcon({ "tag": "svg", "attr": { "viewBo
32
32
  export function FiLink(props) { return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24", "fill": "none", "stroke": "currentColor", "strokeWidth": "2", "strokeLinecap": "round", "strokeLinejoin": "round" }, "child": [{ "tag": "path", "attr": { "d": "M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71" }, "child": [] }, { "tag": "path", "attr": { "d": "M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71" }, "child": [] }] })(props); }
33
33
  export function FiInfo(props) { return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24", "fill": "none", "stroke": "currentColor", "strokeWidth": "2", "strokeLinecap": "round", "strokeLinejoin": "round" }, "child": [{ "tag": "circle", "attr": { "cx": "12", "cy": "12", "r": "10" }, "child": [] }, { "tag": "line", "attr": { "x1": "12", "y1": "16", "x2": "12", "y2": "12" }, "child": [] }, { "tag": "line", "attr": { "x1": "12", "y1": "8", "x2": "12.01", "y2": "8" }, "child": [] }] })(props); }
34
34
  export function BiShieldQuarter(props) { return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24" }, "child": [{ "tag": "path", "attr": { "d": "M20.995 6.9a.998.998 0 0 0-.548-.795l-8-4a1 1 0 0 0-.895 0l-8 4a1.002 1.002 0 0 0-.547.795c-.011.107-.961 10.767 8.589 15.014a.987.987 0 0 0 .812 0c9.55-4.247 8.6-14.906 8.589-15.014zM12 19.897V12H5.51a15.473 15.473 0 0 1-.544-4.365L12 4.118V12h6.46c-.759 2.74-2.498 5.979-6.46 7.897z" }, "child": [] }] })(props); }
35
+ // Shared close icon: matches the stroke-based X already used by SendModal/ReceiveModal/ExportKeyModal/ExportWarningModal/WalletModal.tsx/Modal.tsx
36
+ export function CloseIcon(props) { return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24", "fill": "none", "stroke": "currentColor", "strokeWidth": "2", "strokeLinecap": "round", "strokeLinejoin": "round" }, "child": [{ "tag": "path", "attr": { "d": "M18 6L6 18M6 6L18 18" }, "child": [] }] })(props); }
37
+ // Shared Google icon: matches the 24x24 4-path logo already used by SocialButtons.tsx/UserAvatar.tsx
38
+ export function GoogleIcon(props) { return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24", "fill": "currentColor" }, "child": [{ "tag": "path", "attr": { "fill": "#4285F4", "d": "M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z" }, "child": [] }, { "tag": "path", "attr": { "fill": "#34A853", "d": "M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z" }, "child": [] }, { "tag": "path", "attr": { "fill": "#FBBC05", "d": "M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z" }, "child": [] }, { "tag": "path", "attr": { "fill": "#EA4335", "d": "M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z" }, "child": [] }] })(props); }
35
39
  //# sourceMappingURL=icons.js.map