signer-test-sdk-react 0.0.11 → 0.0.13

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 (91) hide show
  1. package/README.md +1 -1
  2. package/dist/src/AbstraxnProvider.d.ts +2 -5
  3. package/dist/src/AbstraxnProvider.js +550 -50
  4. package/dist/src/AbstraxnProvider.js.map +1 -1
  5. package/dist/src/WalletModal.css +1973 -23
  6. package/dist/src/WalletModal.d.ts +2 -1
  7. package/dist/src/WalletModal.js +200 -30
  8. package/dist/src/WalletModal.js.map +1 -1
  9. package/dist/src/chains.d.ts +55 -0
  10. package/dist/src/chains.js +221 -0
  11. package/dist/src/chains.js.map +1 -0
  12. package/dist/src/components/OnboardingUI/OnboardingUIReact.js +24 -3
  13. package/dist/src/components/OnboardingUI/OnboardingUIReact.js.map +1 -1
  14. package/dist/src/components/OnboardingUI/OnboardingUIWeb.d.ts +11 -2
  15. package/dist/src/components/OnboardingUI/OnboardingUIWeb.js +266 -36
  16. package/dist/src/components/OnboardingUI/OnboardingUIWeb.js.map +1 -1
  17. package/dist/src/components/OnboardingUI/components/PasskeyButton.js +1 -1
  18. package/dist/src/components/OnboardingUI/components/PasskeyButton.js.map +1 -1
  19. package/dist/src/components/QRCode.d.ts +13 -0
  20. package/dist/src/components/QRCode.js +6 -0
  21. package/dist/src/components/QRCode.js.map +1 -0
  22. package/dist/src/components/WalletModal/components/ChainSelector.css +180 -0
  23. package/dist/src/components/WalletModal/components/ChainSelector.d.ts +10 -0
  24. package/dist/src/components/WalletModal/components/ChainSelector.js +34 -0
  25. package/dist/src/components/WalletModal/components/ChainSelector.js.map +1 -0
  26. package/dist/src/components/WalletModal/components/ExportKeyModal.css +133 -0
  27. package/dist/src/components/WalletModal/components/ExportKeyModal.d.ts +9 -0
  28. package/dist/src/components/WalletModal/components/ExportKeyModal.js +31 -0
  29. package/dist/src/components/WalletModal/components/ExportKeyModal.js.map +1 -0
  30. package/dist/src/components/WalletModal/components/ExportWarningModal.css +2 -0
  31. package/dist/src/components/WalletModal/components/ExportWarningModal.d.ts +11 -0
  32. package/dist/src/components/WalletModal/components/ExportWarningModal.js +18 -0
  33. package/dist/src/components/WalletModal/components/ExportWarningModal.js.map +1 -0
  34. package/dist/src/components/WalletModal/components/ManageWalletModal.css +160 -0
  35. package/dist/src/components/WalletModal/components/ManageWalletModal.d.ts +12 -0
  36. package/dist/src/components/WalletModal/components/ManageWalletModal.js +21 -0
  37. package/dist/src/components/WalletModal/components/ManageWalletModal.js.map +1 -0
  38. package/dist/src/components/WalletModal/components/PreviewTransactionModal.css +128 -0
  39. package/dist/src/components/WalletModal/components/PreviewTransactionModal.d.ts +17 -0
  40. package/dist/src/components/WalletModal/components/PreviewTransactionModal.js +10 -0
  41. package/dist/src/components/WalletModal/components/PreviewTransactionModal.js.map +1 -0
  42. package/dist/src/components/WalletModal/components/ReceiveModal.css +101 -0
  43. package/dist/src/components/WalletModal/components/ReceiveModal.d.ts +8 -0
  44. package/dist/src/components/WalletModal/components/ReceiveModal.js +22 -0
  45. package/dist/src/components/WalletModal/components/ReceiveModal.js.map +1 -0
  46. package/dist/src/components/WalletModal/components/SendModal.css +234 -0
  47. package/dist/src/components/WalletModal/components/SendModal.d.ts +18 -0
  48. package/dist/src/components/WalletModal/components/SendModal.js +127 -0
  49. package/dist/src/components/WalletModal/components/SendModal.js.map +1 -0
  50. package/dist/src/components/WalletModal/components/SuccessModal.css +86 -0
  51. package/dist/src/components/WalletModal/components/SuccessModal.d.ts +13 -0
  52. package/dist/src/components/WalletModal/components/SuccessModal.js +8 -0
  53. package/dist/src/components/WalletModal/components/SuccessModal.js.map +1 -0
  54. package/dist/src/components/WalletModal/components/UserAvatar.d.ts +9 -0
  55. package/dist/src/components/WalletModal/components/UserAvatar.js +31 -0
  56. package/dist/src/components/WalletModal/components/UserAvatar.js.map +1 -0
  57. package/dist/src/components/WalletModal/components/index.d.ts +21 -0
  58. package/dist/src/components/WalletModal/components/index.js +13 -0
  59. package/dist/src/components/WalletModal/components/index.js.map +1 -0
  60. package/dist/src/components/WalletModal/hooks/index.d.ts +6 -0
  61. package/dist/src/components/WalletModal/hooks/index.js +7 -0
  62. package/dist/src/components/WalletModal/hooks/index.js.map +1 -0
  63. package/dist/src/components/WalletModal/hooks/useAddressValidation.d.ts +4 -0
  64. package/dist/src/components/WalletModal/hooks/useAddressValidation.js +17 -0
  65. package/dist/src/components/WalletModal/hooks/useAddressValidation.js.map +1 -0
  66. package/dist/src/components/WalletModal/hooks/useAmountValidation.d.ts +4 -0
  67. package/dist/src/components/WalletModal/hooks/useAmountValidation.js +29 -0
  68. package/dist/src/components/WalletModal/hooks/useAmountValidation.js.map +1 -0
  69. package/dist/src/components/WalletModal/hooks/useSendTransaction.d.ts +20 -0
  70. package/dist/src/components/WalletModal/hooks/useSendTransaction.js +55 -0
  71. package/dist/src/components/WalletModal/hooks/useSendTransaction.js.map +1 -0
  72. package/dist/src/components/WalletModal/index.d.ts +5 -0
  73. package/dist/src/components/WalletModal/index.js +7 -0
  74. package/dist/src/components/WalletModal/index.js.map +1 -0
  75. package/dist/src/components/WalletModal/utils/addressUtils.d.ts +19 -0
  76. package/dist/src/components/WalletModal/utils/addressUtils.js +62 -0
  77. package/dist/src/components/WalletModal/utils/addressUtils.js.map +1 -0
  78. package/dist/src/components/WalletModal/utils/formatUtils.d.ts +20 -0
  79. package/dist/src/components/WalletModal/utils/formatUtils.js +47 -0
  80. package/dist/src/components/WalletModal/utils/formatUtils.js.map +1 -0
  81. package/dist/src/components/WalletModal/utils/index.d.ts +5 -0
  82. package/dist/src/components/WalletModal/utils/index.js +6 -0
  83. package/dist/src/components/WalletModal/utils/index.js.map +1 -0
  84. package/dist/src/index.d.ts +2 -1
  85. package/dist/src/index.js +1 -0
  86. package/dist/src/index.js.map +1 -1
  87. package/dist/src/types.d.ts +29 -0
  88. package/dist/src/wagmiConfig.js +6 -2
  89. package/dist/src/wagmiConfig.js.map +1 -1
  90. package/dist/tsconfig.tsbuildinfo +1 -1
  91. package/package.json +8 -8
@@ -0,0 +1,10 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { formatAddress } from '../utils/formatUtils';
3
+ import './PreviewTransactionModal.css';
4
+ export function PreviewTransactionModal({ isOpen, onClose, onConfirm, recipientAddress, amount, displayAddress, currentChain, isSending, theme = 'dark', }) {
5
+ if (!isOpen)
6
+ return null;
7
+ const symbol = currentChain?.nativeCurrency.symbol || 'ETH';
8
+ 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-preview`, onClick: (e) => e.stopPropagation(), children: [_jsxs("div", { className: "wallet-modal-receive-header", children: [_jsx("button", { className: "wallet-modal-back", onClick: onClose, disabled: isSending, 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: "Preview Transaction" }), _jsx("div", { style: { width: '40px' } })] }), _jsxs("div", { className: "wallet-modal-preview-content", children: [_jsxs("div", { className: "wallet-modal-preview-section", children: [_jsxs("div", { className: "wallet-modal-preview-item", children: [_jsx("span", { className: "wallet-modal-preview-label", children: "From" }), _jsx("span", { className: "wallet-modal-preview-value", children: formatAddress(displayAddress) })] }), _jsxs("div", { className: "wallet-modal-preview-item", children: [_jsx("span", { className: "wallet-modal-preview-label", children: "To" }), _jsx("span", { className: "wallet-modal-preview-value", children: formatAddress(recipientAddress) })] }), _jsxs("div", { className: "wallet-modal-preview-item", children: [_jsx("span", { className: "wallet-modal-preview-label", children: "Network" }), _jsx("span", { className: "wallet-modal-preview-value", children: currentChain?.displayName || 'Unknown' })] }), _jsxs("div", { className: "wallet-modal-preview-item", children: [_jsx("span", { className: "wallet-modal-preview-label", children: "Amount" }), _jsxs("span", { className: "wallet-modal-preview-value", children: [amount, " ", symbol] })] })] }), _jsxs("div", { className: "wallet-modal-preview-actions", children: [_jsx("button", { className: `wallet-modal-preview-btn wallet-modal-preview-btn-primary wallet-modal-theme-${theme}`, onClick: onConfirm, disabled: isSending, children: isSending ? (_jsxs(_Fragment, { children: [_jsxs("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", className: "wallet-modal-loading-spinner", children: [_jsx("circle", { cx: "8", cy: "8", r: "6", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeDasharray: "37.7", fill: "none", opacity: "0.3" }), _jsx("circle", { cx: "8", cy: "8", r: "6", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeDasharray: "37.7", fill: "none", children: _jsx("animate", { attributeName: "stroke-dashoffset", from: "37.7", to: "0", dur: "1s", repeatCount: "indefinite" }) })] }), _jsx("span", { children: "Sending..." })] })) : ('Confirm & Send') }), _jsx("button", { className: `wallet-modal-preview-btn wallet-modal-preview-btn-secondary wallet-modal-theme-${theme}`, onClick: onClose, disabled: isSending, children: "Cancel" })] })] })] }) }));
9
+ }
10
+ //# sourceMappingURL=PreviewTransactionModal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PreviewTransactionModal.js","sourceRoot":"","sources":["../../../../../src/components/WalletModal/components/PreviewTransactionModal.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,+BAA+B,CAAC;AAcvC,MAAM,UAAU,uBAAuB,CAAC,EACtC,MAAM,EACN,OAAO,EACP,SAAS,EACT,gBAAgB,EAChB,MAAM,EACN,cAAc,EACd,YAAY,EACZ,SAAS,EACT,KAAK,GAAG,MAAM,GACe;IAC7B,IAAI,CAAC,MAAM;QAAE,OAAO,IAAI,CAAC;IAEzB,MAAM,MAAM,GAAG,YAAY,EAAE,cAAc,CAAC,MAAM,IAAI,KAAK,CAAC;IAE5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C,4BAA4B,uBAAc,EAC1D,gBAAM,SAAS,EAAC,4BAA4B,aACzC,MAAM,OAAG,MAAM,IACX,IACH,IACF,EAEN,eAAK,SAAS,EAAC,8BAA8B,aAC3C,iBACE,SAAS,EAAE,gFAAgF,KAAK,EAAE,EAClG,OAAO,EAAE,SAAS,EAClB,QAAQ,EAAE,SAAS,YAElB,SAAS,CAAC,CAAC,CAAC,CACX,8BACE,eACE,KAAK,EAAC,IAAI,EACV,MAAM,EAAC,IAAI,EACX,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,MAAM,EACX,SAAS,EAAC,8BAA8B,aAExC,iBACE,EAAE,EAAC,GAAG,EACN,EAAE,EAAC,GAAG,EACN,CAAC,EAAC,GAAG,EACL,MAAM,EAAC,cAAc,EACrB,WAAW,EAAC,GAAG,EACf,aAAa,EAAC,OAAO,EACrB,eAAe,EAAC,MAAM,EACtB,IAAI,EAAC,MAAM,EACX,OAAO,EAAC,KAAK,GACb,EACF,iBACE,EAAE,EAAC,GAAG,EACN,EAAE,EAAC,GAAG,EACN,CAAC,EAAC,GAAG,EACL,MAAM,EAAC,cAAc,EACrB,WAAW,EAAC,GAAG,EACf,aAAa,EAAC,OAAO,EACrB,eAAe,EAAC,MAAM,EACtB,IAAI,EAAC,MAAM,YAEX,kBACE,aAAa,EAAC,mBAAmB,EACjC,IAAI,EAAC,MAAM,EACX,EAAE,EAAC,GAAG,EACN,GAAG,EAAC,IAAI,EACR,WAAW,EAAC,YAAY,GACxB,GACK,IACL,EACN,wCAAuB,IACtB,CACJ,CAAC,CAAC,CAAC,CACF,gBAAgB,CACjB,GACM,EACT,iBACE,SAAS,EAAE,kFAAkF,KAAK,EAAE,EACpG,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,SAAS,uBAGZ,IACL,IACF,IACF,GACF,CACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1,101 @@
1
+ /* Receive Modal Styles - extracted from WalletModal.css */
2
+ .wallet-modal-receive-content {
3
+ display: flex;
4
+ flex-direction: column;
5
+ align-items: center;
6
+ gap: 24px;
7
+ padding: 20px 0;
8
+ }
9
+
10
+ .wallet-modal-receive-qr {
11
+ padding: 20px;
12
+ background: #ffffff;
13
+ border-radius: 12px;
14
+ display: flex;
15
+ align-items: center;
16
+ justify-content: center;
17
+ }
18
+
19
+ .wallet-modal-receive-address-section {
20
+ width: 100%;
21
+ display: flex;
22
+ flex-direction: column;
23
+ align-items: center;
24
+ gap: 12px;
25
+ }
26
+
27
+ .wallet-modal-receive-address-label {
28
+ font-size: 14px;
29
+ font-weight: 500;
30
+ opacity: 0.7;
31
+ }
32
+
33
+ .wallet-modal-theme-dark .wallet-modal-receive-address-label {
34
+ color: #9ca3af;
35
+ }
36
+
37
+ .wallet-modal-theme-light .wallet-modal-receive-address-label {
38
+ color: #6b7280;
39
+ }
40
+
41
+ .wallet-modal-receive-address-value {
42
+ font-size: 16px;
43
+ font-weight: 600;
44
+ font-family: monospace;
45
+ padding: 12px 20px;
46
+ border-radius: 8px;
47
+ word-break: break-all;
48
+ text-align: center;
49
+ }
50
+
51
+ .wallet-modal-theme-dark .wallet-modal-receive-address-value {
52
+ background: #2a2a2a;
53
+ color: #ffffff;
54
+ }
55
+
56
+ .wallet-modal-theme-light .wallet-modal-receive-address-value {
57
+ background: #f3f4f6;
58
+ color: #111827;
59
+ }
60
+
61
+ .wallet-modal-receive-copy-btn {
62
+ padding: 10px 20px;
63
+ border-radius: 8px;
64
+ border: none;
65
+ font-size: 14px;
66
+ font-weight: 500;
67
+ cursor: pointer;
68
+ transition: all 0.2s;
69
+ display: flex;
70
+ align-items: center;
71
+ gap: 8px;
72
+ }
73
+
74
+ .wallet-modal-theme-dark .wallet-modal-receive-copy-btn {
75
+ background: rgba(147, 51, 234, 0.1);
76
+ color: #a855f7;
77
+ }
78
+
79
+ .wallet-modal-theme-light .wallet-modal-receive-copy-btn {
80
+ background: rgba(147, 51, 234, 0.1);
81
+ color: #9333ea;
82
+ }
83
+
84
+ .wallet-modal-receive-copy-btn:hover {
85
+ background: rgba(147, 51, 234, 0.2);
86
+ }
87
+
88
+ .wallet-modal-receive-note {
89
+ font-size: 12px;
90
+ text-align: center;
91
+ opacity: 0.7;
92
+ margin: 0;
93
+ }
94
+
95
+ .wallet-modal-theme-dark .wallet-modal-receive-note {
96
+ color: #9ca3af;
97
+ }
98
+
99
+ .wallet-modal-theme-light .wallet-modal-receive-note {
100
+ color: #6b7280;
101
+ }
@@ -0,0 +1,8 @@
1
+ import './ReceiveModal.css';
2
+ export interface ReceiveModalProps {
3
+ isOpen: boolean;
4
+ onClose: () => void;
5
+ address: string | null;
6
+ theme?: 'light' | 'dark';
7
+ }
8
+ export declare function ReceiveModal({ isOpen, onClose, address, theme, }: ReceiveModalProps): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,22 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ /**
3
+ * Receive Modal Component
4
+ */
5
+ import { useState, useCallback } from 'react';
6
+ import { QRCode } from '../../QRCode';
7
+ import { formatAddress } from '../utils/formatUtils';
8
+ import './ReceiveModal.css';
9
+ export function ReceiveModal({ isOpen, onClose, address, theme = 'dark', }) {
10
+ const [copied, setCopied] = useState(false);
11
+ const handleCopy = useCallback(() => {
12
+ if (address) {
13
+ navigator.clipboard.writeText(address);
14
+ setCopied(true);
15
+ setTimeout(() => setCopied(false), 2000);
16
+ }
17
+ }, [address]);
18
+ if (!isOpen)
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" }), _jsx("div", { style: { width: '40px' } })] }), _jsx("div", { className: "wallet-modal-receive-content", children: address && (_jsxs(_Fragment, { children: [_jsx("div", { className: "wallet-modal-receive-qr", children: _jsx(QRCode, { value: address, size: 200 }) }), _jsxs("div", { className: "wallet-modal-receive-address-section", children: [_jsx("div", { className: "wallet-modal-receive-address-label", children: "Your Address" }), _jsx("div", { className: "wallet-modal-receive-address-value", children: formatAddress(address) }), _jsx("button", { className: `wallet-modal-receive-copy-btn wallet-modal-theme-${theme}`, onClick: handleCopy, children: copied ? (_jsxs(_Fragment, { children: [_jsx("svg", { width: "16", height: "16", 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("span", { children: "Copied!" })] })) : (_jsxs(_Fragment, { children: [_jsx("svg", { width: "16", height: "16", 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("span", { children: "Copy Address" })] })) })] }), _jsx("p", { className: "wallet-modal-receive-note", children: "Scan this QR code or copy the address to receive funds" })] })) })] }) }));
21
+ }
22
+ //# sourceMappingURL=ReceiveModal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ReceiveModal.js","sourceRoot":"","sources":["../../../../../src/components/WalletModal/components/ReceiveModal.tsx"],"names":[],"mappings":";AAAA;;GAEG;AACH,OAAO,EAAE,Q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letModal.css */
2
+ .wallet-modal-send-content {
3
+ display: flex;
4
+ flex-direction: column;
5
+ gap: 20px;
6
+ padding: 20px 0;
7
+ }
8
+
9
+ .wallet-modal-send-field {
10
+ display: flex;
11
+ flex-direction: column;
12
+ gap: 8px;
13
+ }
14
+
15
+ .wallet-modal-send-label {
16
+ font-size: 14px;
17
+ font-weight: 500;
18
+ text-align: left;
19
+ }
20
+
21
+ .wallet-modal-theme-dark .wallet-modal-send-label {
22
+ color: #9ca3af;
23
+ }
24
+
25
+ .wallet-modal-theme-light .wallet-modal-send-label {
26
+ color: #6b7280;
27
+ }
28
+
29
+ .wallet-modal-send-token-selector-wrapper {
30
+ position: relative;
31
+ width: 100%;
32
+ }
33
+
34
+ .wallet-modal-send-chain-selector {
35
+ width: 100%;
36
+ }
37
+
38
+ .wallet-modal-send-amount-wrapper {
39
+ display: flex;
40
+ align-items: center;
41
+ border-radius: 12px;
42
+ border: 1px solid;
43
+ overflow: hidden;
44
+ background: transparent;
45
+ }
46
+
47
+ .wallet-modal-theme-dark .wallet-modal-send-amount-wrapper {
48
+ border-color: #3a3a3a;
49
+ background: #2a2a2a;
50
+ }
51
+
52
+ .wallet-modal-theme-light .wallet-modal-send-amount-wrapper {
53
+ border-color: #e5e7eb;
54
+ background: #f9fafb;
55
+ }
56
+
57
+ .wallet-modal-send-amount-wrapper.error {
58
+ border-color: #ef4444;
59
+ }
60
+
61
+ .wallet-modal-send-amount-prefix {
62
+ padding: 14px 16px;
63
+ font-size: 15px;
64
+ font-weight: 500;
65
+ flex-shrink: 0;
66
+ border-right: 1px solid;
67
+ }
68
+
69
+ .wallet-modal-theme-dark .wallet-modal-send-amount-prefix {
70
+ color: #ffffff;
71
+ border-color: #3a3a3a;
72
+ }
73
+
74
+ .wallet-modal-theme-light .wallet-modal-send-amount-prefix {
75
+ color: #111827;
76
+ border-color: #e5e7eb;
77
+ }
78
+
79
+ .wallet-modal-send-amount-input {
80
+ flex: 1;
81
+ padding: 14px 16px;
82
+ border: none;
83
+ background: transparent;
84
+ font-size: 16px;
85
+ font-weight: 500;
86
+ outline: none;
87
+ min-width: 0;
88
+ }
89
+
90
+ .wallet-modal-theme-dark .wallet-modal-send-amount-input {
91
+ color: #ffffff;
92
+ }
93
+
94
+ .wallet-modal-theme-light .wallet-modal-send-amount-input {
95
+ color: #111827;
96
+ }
97
+
98
+ .wallet-modal-send-amount-input::placeholder {
99
+ opacity: 0.5;
100
+ }
101
+
102
+ .wallet-modal-send-amount-suffix {
103
+ padding: 14px 16px;
104
+ font-size: 14px;
105
+ flex-shrink: 0;
106
+ opacity: 0.7;
107
+ }
108
+
109
+ .wallet-modal-theme-dark .wallet-modal-send-amount-suffix {
110
+ color: #9ca3af;
111
+ }
112
+
113
+ .wallet-modal-theme-light .wallet-modal-send-amount-suffix {
114
+ color: #6b7280;
115
+ }
116
+
117
+ .wallet-modal-send-balance {
118
+ display: flex;
119
+ align-items: center;
120
+ gap: 8px;
121
+ font-size: 12px;
122
+ margin-top: 4px;
123
+ }
124
+
125
+ .wallet-modal-send-balance-label {
126
+ opacity: 0.7;
127
+ }
128
+
129
+ .wallet-modal-send-balance-value {
130
+ font-weight: 500;
131
+ }
132
+
133
+ .wallet-modal-theme-dark .wallet-modal-send-balance {
134
+ color: #9ca3af;
135
+ }
136
+
137
+ .wallet-modal-theme-light .wallet-modal-send-balance {
138
+ color: #6b7280;
139
+ }
140
+
141
+ .wallet-modal-send-address-input {
142
+ width: 100%;
143
+ padding: 14px 16px;
144
+ border-radius: 12px;
145
+ border: 1px solid;
146
+ background: transparent;
147
+ font-size: 14px;
148
+ font-family: monospace;
149
+ outline: none;
150
+ transition: all 0.2s;
151
+ box-sizing: border-box;
152
+ }
153
+
154
+ .wallet-modal-theme-dark .wallet-modal-send-address-input {
155
+ border-color: #3a3a3a;
156
+ background: #2a2a2a;
157
+ color: #ffffff;
158
+ }
159
+
160
+ .wallet-modal-theme-light .wallet-modal-send-address-input {
161
+ border-color: #e5e7eb;
162
+ background: #f9fafb;
163
+ color: #111827;
164
+ }
165
+
166
+ .wallet-modal-send-address-input.error {
167
+ border-color: #ef4444;
168
+ }
169
+
170
+ .wallet-modal-send-address-input:focus {
171
+ border-color: #9333ea;
172
+ }
173
+
174
+ .wallet-modal-theme-dark .wallet-modal-send-address-input:focus {
175
+ border-color: #a855f7;
176
+ }
177
+
178
+ .wallet-modal-theme-light .wallet-modal-send-address-input:focus {
179
+ border-color: #9333ea;
180
+ }
181
+
182
+ .wallet-modal-send-address-input::placeholder {
183
+ opacity: 0.5;
184
+ }
185
+
186
+ .wallet-modal-send-error {
187
+ font-size: 12px;
188
+ color: #ef4444;
189
+ margin-top: 4px;
190
+ text-align: left;
191
+ }
192
+
193
+ .wallet-modal-send-preview-btn {
194
+ width: 100%;
195
+ padding: 14px 24px;
196
+ border-radius: 12px;
197
+ border: none;
198
+ font-size: 16px;
199
+ font-weight: 600;
200
+ cursor: pointer;
201
+ transition: all 0.2s;
202
+ display: flex;
203
+ align-items: center;
204
+ justify-content: center;
205
+ gap: 8px;
206
+ margin-top: 8px;
207
+ }
208
+
209
+ .wallet-modal-send-preview-btn.disabled {
210
+ opacity: 0.5;
211
+ cursor: not-allowed;
212
+ }
213
+
214
+ .wallet-modal-theme-dark .wallet-modal-send-preview-btn {
215
+ background: linear-gradient(135deg, #9333ea 0%, #7e22ce 100%);
216
+ color: #ffffff;
217
+ }
218
+
219
+ .wallet-modal-theme-light .wallet-modal-send-preview-btn {
220
+ background: linear-gradient(135deg, #9333ea 0%, #7e22ce 100%);
221
+ color: #ffffff;
222
+ }
223
+
224
+ .wallet-modal-theme-dark .wallet-modal-send-preview-btn:hover:not(.disabled) {
225
+ background: linear-gradient(135deg, #a855f7 0%, #9333ea 100%);
226
+ transform: translateY(-1px);
227
+ box-shadow: 0 4px 12px rgba(147, 51, 234, 0.3);
228
+ }
229
+
230
+ .wallet-modal-theme-light .wallet-modal-send-preview-btn:hover:not(.disabled) {
231
+ background: linear-gradient(135deg, #a855f7 0%, #9333ea 100%);
232
+ transform: translateY(-1px);
233
+ box-shadow: 0 4px 12px rgba(147, 51, 234, 0.2);
234
+ }
@@ -0,0 +1,18 @@
1
+ import type { ChainData } from '../../../chains';
2
+ import './SendModal.css';
3
+ export interface SendModalProps {
4
+ isOpen: boolean;
5
+ onClose: () => void;
6
+ currentChain: ChainData | null;
7
+ availableChains: ChainData[];
8
+ displayAddress: string | null;
9
+ availableBalance: bigint | null;
10
+ externalWalletBalance: bigint | null;
11
+ walletBalance: bigint | null;
12
+ sendTransaction?: (tx: any) => Promise<{
13
+ hash: string;
14
+ }>;
15
+ switchChainEnhanced?: (chainId: number) => Promise<void>;
16
+ theme?: 'light' | 'dark';
17
+ }
18
+ export declare function SendModal({ isOpen, onClose, currentChain, availableChains, displayAddress, availableBalance, externalWalletBalance, walletBalance, sendTransaction, switchChainEnhanced, theme, }: SendModalProps): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,127 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ /**
3
+ * Send Modal Component
4
+ */
5
+ import { useState, useCallback, useMemo, useEffect } from 'react';
6
+ import { ChainSelector } from './ChainSelector';
7
+ import { PreviewTransactionModal } from './PreviewTransactionModal';
8
+ import { SuccessModal } from './SuccessModal';
9
+ import { useAddressValidation } from '../hooks/useAddressValidation';
10
+ import { useAmountValidation } from '../hooks/useAmountValidation';
11
+ import { useSendTransaction } from '../hooks/useSendTransaction';
12
+ import { formatBalanceValue } from '../utils/formatUtils';
13
+ import './SendModal.css';
14
+ export function SendModal({ isOpen, onClose, currentChain, availableChains, displayAddress, availableBalance, externalWalletBalance, walletBalance, sendTransaction, switchChainEnhanced, theme = 'dark', }) {
15
+ const [recipientAddress, setRecipientAddress] = useState('');
16
+ const [amount, setAmount] = useState('');
17
+ const [addressError, setAddressError] = useState('');
18
+ const [amountError, setAmountError] = useState('');
19
+ const [showPreview, setShowPreview] = useState(false);
20
+ const balance = externalWalletBalance || walletBalance || availableBalance;
21
+ const { validate: validateAddress } = useAddressValidation(displayAddress, currentChain);
22
+ const { validate: validateAmount } = useAmountValidation(balance, currentChain);
23
+ const { send, isSending, txHash, reset } = useSendTransaction({
24
+ sendTransaction,
25
+ currentChain,
26
+ fromAddress: displayAddress,
27
+ onSuccess: () => {
28
+ setShowPreview(false);
29
+ setTimeout(() => {
30
+ handleReset();
31
+ onClose();
32
+ }, 3000);
33
+ },
34
+ onError: (error) => {
35
+ setAmountError(error.message);
36
+ setShowPreview(false);
37
+ },
38
+ });
39
+ const handleRecipientAddressChange = useCallback((value) => {
40
+ setRecipientAddress(value);
41
+ if (value) {
42
+ const error = validateAddress(value);
43
+ setAddressError(error);
44
+ }
45
+ else {
46
+ setAddressError('');
47
+ }
48
+ }, [validateAddress]);
49
+ const handleAmountChange = useCallback((value) => {
50
+ // Only allow numbers and decimal point
51
+ const sanitized = value.replace(/[^0-9.]/g, '');
52
+ // Prevent multiple decimal points
53
+ const parts = sanitized.split('.');
54
+ const finalValue = parts.length > 2 ? parts[0] + '.' + parts.slice(1).join('') : sanitized;
55
+ setAmount(finalValue);
56
+ if (finalValue) {
57
+ const error = validateAmount(finalValue);
58
+ setAmountError(error);
59
+ }
60
+ else {
61
+ setAmountError('');
62
+ }
63
+ }, [validateAmount]);
64
+ const handlePreviewTransaction = useCallback(() => {
65
+ const addrError = validateAddress(recipientAddress);
66
+ const amtError = validateAmount(amount);
67
+ if (addrError || amtError) {
68
+ setAddressError(addrError);
69
+ setAmountError(amtError);
70
+ return;
71
+ }
72
+ setShowPreview(true);
73
+ }, [recipientAddress, amount, validateAddress, validateAmount]);
74
+ const handleConfirmSend = useCallback(async () => {
75
+ try {
76
+ await send(recipientAddress, amount);
77
+ }
78
+ catch (error) {
79
+ // Error handled in useSendTransaction
80
+ }
81
+ }, [send, recipientAddress, amount]);
82
+ const handleReset = useCallback(() => {
83
+ setRecipientAddress('');
84
+ setAmount('');
85
+ setAddressError('');
86
+ setAmountError('');
87
+ setShowPreview(false);
88
+ reset();
89
+ }, [reset]);
90
+ useEffect(() => {
91
+ if (!isOpen) {
92
+ handleReset();
93
+ }
94
+ }, [isOpen, handleReset]);
95
+ if (!isOpen)
96
+ return null;
97
+ const availableBalanceValue = useMemo(() => {
98
+ if (!balance || !currentChain)
99
+ return '0';
100
+ return formatBalanceValue(balance, currentChain.nativeCurrency.decimals);
101
+ }, [balance, currentChain]);
102
+ const symbol = currentChain?.nativeCurrency.symbol || 'ETH';
103
+ const chainName = currentChain?.displayName || 'Select Chain';
104
+ const isFormValid = !addressError && !amountError && recipientAddress && amount;
105
+ // Show success modal
106
+ if (txHash && !showPreview) {
107
+ return (_jsx(SuccessModal, { isOpen: true, onClose: () => {
108
+ reset();
109
+ onClose();
110
+ }, txHash: txHash, currentChain: currentChain, theme: theme }));
111
+ }
112
+ // Show preview modal
113
+ if (showPreview) {
114
+ return (_jsx(PreviewTransactionModal, { isOpen: true, onClose: () => setShowPreview(false), onConfirm: handleConfirmSend, recipientAddress: recipientAddress, amount: amount, displayAddress: displayAddress, currentChain: currentChain, isSending: isSending, theme: theme }));
115
+ }
116
+ 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-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: "Send" }), _jsx("div", { style: { width: '40px' } })] }), _jsxs("div", { className: "wallet-modal-send-content", children: [_jsxs("div", { className: "wallet-modal-send-field", children: [_jsx("label", { className: "wallet-modal-send-label", children: "Select any token" }), _jsx("div", { className: "wallet-modal-send-token-selector-wrapper", children: _jsx(ChainSelector, { currentChain: currentChain, availableChains: availableChains, onChainSelect: async (chainId) => {
117
+ if (switchChainEnhanced && chainId !== currentChain?.id) {
118
+ try {
119
+ await switchChainEnhanced(chainId);
120
+ }
121
+ catch (error) {
122
+ console.error('Failed to switch chain:', error);
123
+ }
124
+ }
125
+ }, theme: theme, className: "wallet-modal-send-chain-selector" }) })] }), _jsxs("div", { className: "wallet-modal-send-field", children: [_jsxs("div", { className: "wallet-modal-send-amount-wrapper", children: [_jsx("div", { className: "wallet-modal-send-amount-prefix", children: symbol }), _jsx("input", { type: "text", className: `wallet-modal-send-amount-input ${amountError ? 'error' : ''}`, placeholder: "Enter amount", value: amount, onChange: (e) => handleAmountChange(e.target.value) }), _jsx("div", { className: "wallet-modal-send-amount-suffix", children: "$ --" })] }), amountError && _jsx("div", { className: "wallet-modal-send-error", children: amountError }), _jsxs("div", { className: "wallet-modal-send-balance", children: [_jsx("span", { className: "wallet-modal-send-balance-label", children: "Available:" }), _jsxs("span", { className: "wallet-modal-send-balance-value", children: [availableBalanceValue, " ", symbol] })] })] }), _jsxs("div", { className: "wallet-modal-send-field", children: [_jsx("label", { className: "wallet-modal-send-label", children: "Recipient Address" }), _jsx("input", { type: "text", className: `wallet-modal-send-address-input ${addressError ? 'error' : ''}`, placeholder: "Address", value: recipientAddress, onChange: (e) => handleRecipientAddressChange(e.target.value) }), addressError && _jsx("div", { className: "wallet-modal-send-error", children: addressError })] }), _jsx("button", { className: `wallet-modal-send-preview-btn wallet-modal-theme-${theme} ${!isFormValid ? 'disabled' : ''}`, onClick: handlePreviewTransaction, disabled: !isFormValid, children: "Preview transaction" })] })] }) }));
126
+ }
127
+ //# sourceMappingURL=SendModal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SendModal.js","sourceRoot":"","sources":["../../../../../src/components/WalletModal/components/SendModal.tsx"],"names":[],"mappings":";AAAA;;GAEG;AACH,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,OAAO,EAAE,SAAS,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,CAAC,GAC7D,EACD,YAAY,IAAI,cAAK,SAAS,EAAC,yBAAyB,YAAE,YAAY,GAAO,IAC1E,EAGN,iBACE,SAAS,EAAE,oDAAoD,KAAK,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,EAAE,EACxG,OAAO,EAAE,wBAAwB,EACjC,QAAQ,EAAE,CAAC,WAAW,oCAGf,IACL,IACF,GACF,CACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1,86 @@
1
+ /* Success Modal Styles */
2
+ .wallet-modal-success-content {
3
+ padding: 40px 20px;
4
+ display: flex;
5
+ flex-direction: column;
6
+ align-items: center;
7
+ gap: 20px;
8
+ text-align: center;
9
+ }
10
+
11
+ .wallet-modal-success-icon {
12
+ width: 64px;
13
+ height: 64px;
14
+ display: flex;
15
+ align-items: center;
16
+ justify-content: center;
17
+ }
18
+
19
+ .wallet-modal-success-title {
20
+ font-size: 24px;
21
+ font-weight: 600;
22
+ margin: 0;
23
+ }
24
+
25
+ .wallet-modal-theme-dark .wallet-modal-success-title {
26
+ color: #ffffff;
27
+ }
28
+
29
+ .wallet-modal-theme-light .wallet-modal-success-title {
30
+ color: #111827;
31
+ }
32
+
33
+ .wallet-modal-success-message {
34
+ font-size: 14px;
35
+ opacity: 0.7;
36
+ margin: 0;
37
+ }
38
+
39
+ .wallet-modal-theme-dark .wallet-modal-success-message {
40
+ color: #9ca3af;
41
+ }
42
+
43
+ .wallet-modal-theme-light .wallet-modal-success-message {
44
+ color: #6b7280;
45
+ }
46
+
47
+ .wallet-modal-success-link {
48
+ font-size: 14px;
49
+ text-decoration: none;
50
+ padding: 8px 16px;
51
+ border-radius: 8px;
52
+ transition: all 0.2s;
53
+ }
54
+
55
+ .wallet-modal-theme-dark .wallet-modal-success-link {
56
+ color: #a855f7;
57
+ background: rgba(147, 51, 234, 0.1);
58
+ }
59
+
60
+ .wallet-modal-theme-light .wallet-modal-success-link {
61
+ color: #9333ea;
62
+ background: rgba(147, 51, 234, 0.1);
63
+ }
64
+
65
+ .wallet-modal-success-link:hover {
66
+ background: rgba(147, 51, 234, 0.2);
67
+ }
68
+
69
+ .wallet-modal-success-btn {
70
+ width: 100%;
71
+ padding: 14px 24px;
72
+ border-radius: 12px;
73
+ border: none;
74
+ font-size: 16px;
75
+ font-weight: 600;
76
+ cursor: pointer;
77
+ transition: all 0.2s;
78
+ background: linear-gradient(135deg, #9333ea 0%, #7e22ce 100%);
79
+ color: #ffffff;
80
+ }
81
+
82
+ .wallet-modal-success-btn:hover {
83
+ background: linear-gradient(135deg, #a855f7 0%, #9333ea 100%);
84
+ transform: translateY(-1px);
85
+ box-shadow: 0 4px 12px rgba(147, 51, 234, 0.3);
86
+ }
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Success Modal Component
3
+ */
4
+ import type { ChainData } from '../../../chains';
5
+ import './SuccessModal.css';
6
+ export interface SuccessModalProps {
7
+ isOpen: boolean;
8
+ onClose: () => void;
9
+ txHash: string;
10
+ currentChain: ChainData | null;
11
+ theme?: 'light' | 'dark';
12
+ }
13
+ export declare function SuccessModal({ isOpen, onClose, txHash, currentChain, theme, }: SuccessModalProps): import("react/jsx-runtime").JSX.Element | null;