@abstraxn/signer-react 1.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.
- package/README.md +114 -0
- package/dist/src/AbstraxnProvider.d.ts +9 -0
- package/dist/src/AbstraxnProvider.js +21 -0
- package/dist/src/AbstraxnProvider.js.map +1 -0
- package/dist/src/ConnectButton.css +217 -0
- package/dist/src/ConnectButton.d.ts +71 -0
- package/dist/src/ConnectButton.js +102 -0
- package/dist/src/ConnectButton.js.map +1 -0
- package/dist/src/ExternalWalletButtons.css +319 -0
- package/dist/src/ExternalWalletButtons.d.ts +56 -0
- package/dist/src/ExternalWalletButtons.js +272 -0
- package/dist/src/ExternalWalletButtons.js.map +1 -0
- package/dist/src/OnboardingUI.d.ts +63 -0
- package/dist/src/OnboardingUI.js +66 -0
- package/dist/src/OnboardingUI.js.map +1 -0
- package/dist/src/WalletModal.css +2319 -0
- package/dist/src/WalletModal.d.ts +7 -0
- package/dist/src/WalletModal.js +322 -0
- package/dist/src/WalletModal.js.map +1 -0
- package/dist/src/chains.d.ts +56 -0
- package/dist/src/chains.js +291 -0
- package/dist/src/chains.js.map +1 -0
- package/dist/src/components/AbstraxnProvider/AbstraxnProvider.d.ts +12 -0
- package/dist/src/components/AbstraxnProvider/AbstraxnProvider.js +146 -0
- package/dist/src/components/AbstraxnProvider/AbstraxnProvider.js.map +1 -0
- package/dist/src/components/AbstraxnProvider/AbstraxnProviderInner.d.ts +25 -0
- package/dist/src/components/AbstraxnProvider/AbstraxnProviderInner.js +3086 -0
- package/dist/src/components/AbstraxnProvider/AbstraxnProviderInner.js.map +1 -0
- package/dist/src/components/AbstraxnProvider/AbstraxnProviderWithWagmi.d.ts +8 -0
- package/dist/src/components/AbstraxnProvider/AbstraxnProviderWithWagmi.js +46 -0
- package/dist/src/components/AbstraxnProvider/AbstraxnProviderWithWagmi.js.map +1 -0
- package/dist/src/components/AbstraxnProvider/AbstraxnProviderWithoutWagmi.d.ts +8 -0
- package/dist/src/components/AbstraxnProvider/AbstraxnProviderWithoutWagmi.js +12 -0
- package/dist/src/components/AbstraxnProvider/AbstraxnProviderWithoutWagmi.js.map +1 -0
- package/dist/src/components/AbstraxnProvider/context.d.ts +2 -0
- package/dist/src/components/AbstraxnProvider/context.js +6 -0
- package/dist/src/components/AbstraxnProvider/context.js.map +1 -0
- package/dist/src/components/AbstraxnProvider/index.d.ts +6 -0
- package/dist/src/components/AbstraxnProvider/index.js +7 -0
- package/dist/src/components/AbstraxnProvider/index.js.map +1 -0
- package/dist/src/components/AbstraxnProvider/useAbstraxnProviderBase.d.ts +30 -0
- package/dist/src/components/AbstraxnProvider/useAbstraxnProviderBase.js +49 -0
- package/dist/src/components/AbstraxnProvider/useAbstraxnProviderBase.js.map +1 -0
- package/dist/src/components/AbstraxnProvider/useAbstraxnWallet.d.ts +2 -0
- package/dist/src/components/AbstraxnProvider/useAbstraxnWallet.js +13 -0
- package/dist/src/components/AbstraxnProvider/useAbstraxnWallet.js.map +1 -0
- package/dist/src/components/AbstraxnProvider/useOAuthCallbacks.d.ts +22 -0
- package/dist/src/components/AbstraxnProvider/useOAuthCallbacks.js +242 -0
- package/dist/src/components/AbstraxnProvider/useOAuthCallbacks.js.map +1 -0
- package/dist/src/components/AbstraxnProvider/useWalletInitialization.d.ts +25 -0
- package/dist/src/components/AbstraxnProvider/useWalletInitialization.js +539 -0
- package/dist/src/components/AbstraxnProvider/useWalletInitialization.js.map +1 -0
- package/dist/src/components/AbstraxnProvider/utils.d.ts +41 -0
- package/dist/src/components/AbstraxnProvider/utils.js +139 -0
- package/dist/src/components/AbstraxnProvider/utils.js.map +1 -0
- package/dist/src/components/OnboardingUI/OnboardingUI.css +1062 -0
- package/dist/src/components/OnboardingUI/OnboardingUIReact.d.ts +15 -0
- package/dist/src/components/OnboardingUI/OnboardingUIReact.js +318 -0
- package/dist/src/components/OnboardingUI/OnboardingUIReact.js.map +1 -0
- package/dist/src/components/OnboardingUI/OnboardingUIWeb.d.ts +265 -0
- package/dist/src/components/OnboardingUI/OnboardingUIWeb.js +3782 -0
- package/dist/src/components/OnboardingUI/OnboardingUIWeb.js.map +1 -0
- package/dist/src/components/OnboardingUI/components/EmailForm.d.ts +16 -0
- package/dist/src/components/OnboardingUI/components/EmailForm.js +27 -0
- package/dist/src/components/OnboardingUI/components/EmailForm.js.map +1 -0
- package/dist/src/components/OnboardingUI/components/Modal.d.ts +14 -0
- package/dist/src/components/OnboardingUI/components/Modal.js +61 -0
- package/dist/src/components/OnboardingUI/components/Modal.js.map +1 -0
- package/dist/src/components/OnboardingUI/components/OtpForm.d.ts +20 -0
- package/dist/src/components/OnboardingUI/components/OtpForm.js +72 -0
- package/dist/src/components/OnboardingUI/components/OtpForm.js.map +1 -0
- package/dist/src/components/OnboardingUI/components/PasskeyButton.d.ts +14 -0
- package/dist/src/components/OnboardingUI/components/PasskeyButton.js +22 -0
- package/dist/src/components/OnboardingUI/components/PasskeyButton.js.map +1 -0
- package/dist/src/components/OnboardingUI/components/SocialButtons.d.ts +15 -0
- package/dist/src/components/OnboardingUI/components/SocialButtons.js +20 -0
- package/dist/src/components/OnboardingUI/components/SocialButtons.js.map +1 -0
- package/dist/src/components/OnboardingUI/components/index.d.ts +13 -0
- package/dist/src/components/OnboardingUI/components/index.js +9 -0
- package/dist/src/components/OnboardingUI/components/index.js.map +1 -0
- package/dist/src/components/OnboardingUI/hooks/index.d.ts +7 -0
- package/dist/src/components/OnboardingUI/hooks/index.js +6 -0
- package/dist/src/components/OnboardingUI/hooks/index.js.map +1 -0
- package/dist/src/components/OnboardingUI/hooks/useAuthMethods.d.ts +11 -0
- package/dist/src/components/OnboardingUI/hooks/useAuthMethods.js +243 -0
- package/dist/src/components/OnboardingUI/hooks/useAuthMethods.js.map +1 -0
- package/dist/src/components/OnboardingUI/hooks/useOnboarding.d.ts +21 -0
- package/dist/src/components/OnboardingUI/hooks/useOnboarding.js +153 -0
- package/dist/src/components/OnboardingUI/hooks/useOnboarding.js.map +1 -0
- package/dist/src/components/OnboardingUI/index.d.ts +12 -0
- package/dist/src/components/OnboardingUI/index.js +15 -0
- package/dist/src/components/OnboardingUI/index.js.map +1 -0
- package/dist/src/components/QRCode.d.ts +13 -0
- package/dist/src/components/QRCode.js +6 -0
- package/dist/src/components/QRCode.js.map +1 -0
- package/dist/src/components/WalletModal/components/ChainSelector.css +327 -0
- package/dist/src/components/WalletModal/components/ChainSelector.d.ts +11 -0
- package/dist/src/components/WalletModal/components/ChainSelector.js +75 -0
- package/dist/src/components/WalletModal/components/ChainSelector.js.map +1 -0
- package/dist/src/components/WalletModal/components/ExportKeyModal.css +134 -0
- package/dist/src/components/WalletModal/components/ExportKeyModal.d.ts +14 -0
- package/dist/src/components/WalletModal/components/ExportKeyModal.js +26 -0
- package/dist/src/components/WalletModal/components/ExportKeyModal.js.map +1 -0
- package/dist/src/components/WalletModal/components/ExportWarningModal.css +107 -0
- package/dist/src/components/WalletModal/components/ExportWarningModal.d.ts +17 -0
- package/dist/src/components/WalletModal/components/ExportWarningModal.js +20 -0
- package/dist/src/components/WalletModal/components/ExportWarningModal.js.map +1 -0
- package/dist/src/components/WalletModal/components/ManageWalletModal.css +246 -0
- package/dist/src/components/WalletModal/components/ManageWalletModal.d.ts +12 -0
- package/dist/src/components/WalletModal/components/ManageWalletModal.js +36 -0
- package/dist/src/components/WalletModal/components/ManageWalletModal.js.map +1 -0
- package/dist/src/components/WalletModal/components/PreviewTransactionModal.css +127 -0
- package/dist/src/components/WalletModal/components/PreviewTransactionModal.d.ts +17 -0
- package/dist/src/components/WalletModal/components/PreviewTransactionModal.js +10 -0
- package/dist/src/components/WalletModal/components/PreviewTransactionModal.js.map +1 -0
- package/dist/src/components/WalletModal/components/ReceiveModal.css +136 -0
- package/dist/src/components/WalletModal/components/ReceiveModal.d.ts +8 -0
- package/dist/src/components/WalletModal/components/ReceiveModal.js +22 -0
- package/dist/src/components/WalletModal/components/ReceiveModal.js.map +1 -0
- package/dist/src/components/WalletModal/components/SendModal.css +277 -0
- package/dist/src/components/WalletModal/components/SendModal.d.ts +16 -0
- package/dist/src/components/WalletModal/components/SendModal.js +219 -0
- package/dist/src/components/WalletModal/components/SendModal.js.map +1 -0
- package/dist/src/components/WalletModal/components/SuccessModal.css +85 -0
- package/dist/src/components/WalletModal/components/SuccessModal.d.ts +13 -0
- package/dist/src/components/WalletModal/components/SuccessModal.js +8 -0
- package/dist/src/components/WalletModal/components/SuccessModal.js.map +1 -0
- package/dist/src/components/WalletModal/components/TokenSelectorModal.css +240 -0
- package/dist/src/components/WalletModal/components/TokenSelectorModal.d.ts +21 -0
- package/dist/src/components/WalletModal/components/TokenSelectorModal.js +44 -0
- package/dist/src/components/WalletModal/components/TokenSelectorModal.js.map +1 -0
- package/dist/src/components/WalletModal/components/UserAvatar.d.ts +9 -0
- package/dist/src/components/WalletModal/components/UserAvatar.js +31 -0
- package/dist/src/components/WalletModal/components/UserAvatar.js.map +1 -0
- package/dist/src/components/WalletModal/components/index.d.ts +23 -0
- package/dist/src/components/WalletModal/components/index.js +14 -0
- package/dist/src/components/WalletModal/components/index.js.map +1 -0
- package/dist/src/components/WalletModal/hooks/index.d.ts +6 -0
- package/dist/src/components/WalletModal/hooks/index.js +7 -0
- package/dist/src/components/WalletModal/hooks/index.js.map +1 -0
- package/dist/src/components/WalletModal/hooks/useAddressValidation.d.ts +4 -0
- package/dist/src/components/WalletModal/hooks/useAddressValidation.js +17 -0
- package/dist/src/components/WalletModal/hooks/useAddressValidation.js.map +1 -0
- package/dist/src/components/WalletModal/hooks/useAmountValidation.d.ts +4 -0
- package/dist/src/components/WalletModal/hooks/useAmountValidation.js +29 -0
- package/dist/src/components/WalletModal/hooks/useAmountValidation.js.map +1 -0
- package/dist/src/components/WalletModal/hooks/useSendTransaction.d.ts +20 -0
- package/dist/src/components/WalletModal/hooks/useSendTransaction.js +55 -0
- package/dist/src/components/WalletModal/hooks/useSendTransaction.js.map +1 -0
- package/dist/src/components/WalletModal/index.d.ts +5 -0
- package/dist/src/components/WalletModal/index.js +7 -0
- package/dist/src/components/WalletModal/index.js.map +1 -0
- package/dist/src/components/WalletModal/utils/addressUtils.d.ts +19 -0
- package/dist/src/components/WalletModal/utils/addressUtils.js +62 -0
- package/dist/src/components/WalletModal/utils/addressUtils.js.map +1 -0
- package/dist/src/components/WalletModal/utils/formatUtils.d.ts +20 -0
- package/dist/src/components/WalletModal/utils/formatUtils.js +47 -0
- package/dist/src/components/WalletModal/utils/formatUtils.js.map +1 -0
- package/dist/src/components/WalletModal/utils/index.d.ts +5 -0
- package/dist/src/components/WalletModal/utils/index.js +6 -0
- package/dist/src/components/WalletModal/utils/index.js.map +1 -0
- package/dist/src/connectors.d.ts +27 -0
- package/dist/src/connectors.js +70 -0
- package/dist/src/connectors.js.map +1 -0
- package/dist/src/hooks.d.ts +13136 -0
- package/dist/src/hooks.js +1358 -0
- package/dist/src/hooks.js.map +1 -0
- package/dist/src/index.d.ts +17 -0
- package/dist/src/index.js +14 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/types.d.ts +224 -0
- package/dist/src/types.js +2 -0
- package/dist/src/types.js.map +1 -0
- package/dist/src/wagmiConfig.d.ts +16 -0
- package/dist/src/wagmiConfig.js +103 -0
- package/dist/src/wagmiConfig.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +70 -0
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
/* Export Private Key (warning) - compact layout to match provided screenshot */
|
|
2
|
+
|
|
3
|
+
.wallet-modal-content.wallet-modal-export-warning {
|
|
4
|
+
padding: 20px;
|
|
5
|
+
gap: 0;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.wallet-modal-export-warning-divider {
|
|
9
|
+
width: 100%;
|
|
10
|
+
height: 1px;
|
|
11
|
+
background: rgba(17, 24, 39, 0.08);
|
|
12
|
+
margin: 4px 0 14px;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.wallet-modal-theme-dark .wallet-modal-export-warning-divider {
|
|
16
|
+
background: rgba(255, 255, 255, 0.12);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.wallet-modal-export-warning-simple {
|
|
20
|
+
width: 100%;
|
|
21
|
+
display: flex;
|
|
22
|
+
flex-direction: column;
|
|
23
|
+
align-items: center;
|
|
24
|
+
gap: 14px;
|
|
25
|
+
padding: 6px 0 0;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.wallet-modal-export-warning-key-icon {
|
|
29
|
+
display: flex;
|
|
30
|
+
align-items: center;
|
|
31
|
+
justify-content: center;
|
|
32
|
+
color: #7c3aed;
|
|
33
|
+
transform: rotate(-20deg);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.wallet-modal-export-warning-simple-text {
|
|
37
|
+
margin: 0;
|
|
38
|
+
font-size: 14px;
|
|
39
|
+
font-weight: 600;
|
|
40
|
+
text-align: center;
|
|
41
|
+
line-height: 1.4;
|
|
42
|
+
max-width: 360px;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.wallet-modal-theme-light .wallet-modal-export-warning-simple-text {
|
|
46
|
+
color: #111827;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.wallet-modal-theme-dark .wallet-modal-export-warning-simple-text {
|
|
50
|
+
color: #ffffff;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.wallet-modal-export-warning-simple-checkbox {
|
|
54
|
+
width: 100%;
|
|
55
|
+
display: flex;
|
|
56
|
+
align-items: flex-start;
|
|
57
|
+
gap: 10px;
|
|
58
|
+
padding: 0;
|
|
59
|
+
margin-top: 2px;
|
|
60
|
+
cursor: pointer;
|
|
61
|
+
user-select: none;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.wallet-modal-export-warning-simple-checkbox-input {
|
|
65
|
+
width: 18px;
|
|
66
|
+
height: 18px;
|
|
67
|
+
margin-top: 2px;
|
|
68
|
+
flex-shrink: 0;
|
|
69
|
+
cursor: pointer;
|
|
70
|
+
accent-color: #7c3aed;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.wallet-modal-export-warning-simple-checkbox span {
|
|
74
|
+
font-size: 12px;
|
|
75
|
+
line-height: 1.4;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.wallet-modal-theme-light .wallet-modal-export-warning-simple-checkbox span {
|
|
79
|
+
color: #111827;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.wallet-modal-theme-dark .wallet-modal-export-warning-simple-checkbox span {
|
|
83
|
+
color: #ffffff;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.wallet-modal-export-warning-continue {
|
|
87
|
+
width: 100%;
|
|
88
|
+
padding: 12px 18px;
|
|
89
|
+
border-radius: 10px;
|
|
90
|
+
border: none;
|
|
91
|
+
font-size: 14px;
|
|
92
|
+
font-weight: 600;
|
|
93
|
+
cursor: pointer;
|
|
94
|
+
transition: all 0.2s ease;
|
|
95
|
+
background: var(--abstraxn-primary);
|
|
96
|
+
color: var(--abstraxn-primary-text);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.wallet-modal-export-warning-continue:hover:not(.disabled) {
|
|
100
|
+
background: var(--abstraxn-primary-hover);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.wallet-modal-export-warning-continue.disabled,
|
|
104
|
+
.wallet-modal-export-warning-continue:disabled {
|
|
105
|
+
opacity: 0.55;
|
|
106
|
+
cursor: not-allowed;
|
|
107
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Export Warning Modal Component
|
|
3
|
+
*/
|
|
4
|
+
import { type CSSProperties } from 'react';
|
|
5
|
+
import type { ChainData } from '../../../chains';
|
|
6
|
+
import '../../../WalletModal.css';
|
|
7
|
+
import './ExportWarningModal.css';
|
|
8
|
+
export interface ExportWarningModalProps {
|
|
9
|
+
isOpen: boolean;
|
|
10
|
+
onClose: () => void;
|
|
11
|
+
onAcknowledge: (acknowledged: boolean) => void;
|
|
12
|
+
currentChain: ChainData | null;
|
|
13
|
+
isExporting: boolean;
|
|
14
|
+
theme?: 'light' | 'dark';
|
|
15
|
+
style?: CSSProperties;
|
|
16
|
+
}
|
|
17
|
+
export declare function ExportWarningModal({ isOpen, onClose, onAcknowledge, currentChain: _currentChain, isExporting, theme, style, }: ExportWarningModalProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* Export Warning Modal Component
|
|
4
|
+
*/
|
|
5
|
+
import { useState } from 'react';
|
|
6
|
+
import '../../../WalletModal.css';
|
|
7
|
+
import './ExportWarningModal.css';
|
|
8
|
+
import { IoKeyOutline } from 'react-icons/io5';
|
|
9
|
+
export function ExportWarningModal({ isOpen, onClose, onAcknowledge, currentChain: _currentChain, isExporting, theme = 'dark', style, }) {
|
|
10
|
+
const [acknowledged, setAcknowledged] = useState(false);
|
|
11
|
+
const handleReveal = () => {
|
|
12
|
+
if (acknowledged && !isExporting) {
|
|
13
|
+
onAcknowledge(true);
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
if (!isOpen)
|
|
17
|
+
return null;
|
|
18
|
+
return (_jsx("div", { className: `wallet-modal-overlay wallet-modal-theme-${theme}`, onClick: onClose, style: style, children: _jsxs("div", { className: `wallet-modal-content wallet-modal-theme-${theme} wallet-modal-export-warning`, onClick: (e) => e.stopPropagation(), children: [_jsxs("div", { className: "wallet-modal-receive-header", children: [_jsx("button", { className: "wallet-modal-back", onClick: onClose, disabled: isExporting, 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: "Export Private Key" }), _jsx("button", { className: "wallet-modal-close", onClick: onClose, "aria-label": "Close", disabled: isExporting, children: _jsx("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", children: _jsx("path", { d: "M18 6L6 18M6 6L18 18", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }) })] }), _jsx("div", { className: "wallet-modal-export-warning-divider" }), _jsxs("div", { className: "wallet-modal-export-warning-simple", children: [_jsx("div", { className: "wallet-modal-export-warning-key-icon", "aria-hidden": "true", children: _jsx(IoKeyOutline, { size: 56 }) }), _jsx("p", { className: "wallet-modal-export-warning-simple-text", children: "Reveal your private key to manage this wallet in a different app." }), _jsxs("label", { className: "wallet-modal-export-warning-simple-checkbox", children: [_jsx("input", { type: "checkbox", checked: acknowledged, onChange: (e) => setAcknowledged(e.target.checked), className: "wallet-modal-export-warning-simple-checkbox-input" }), _jsx("span", { children: "I understand the risks of owning my private key and am fully responsible for keeping it secure." })] }), _jsx("button", { className: `wallet-modal-export-warning-continue ${!acknowledged || isExporting ? 'disabled' : ''}`, onClick: handleReveal, disabled: !acknowledged || isExporting, children: isExporting ? 'Loading...' : 'Continue' })] })] }) }));
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=ExportWarningModal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExportWarningModal.js","sourceRoot":"","sources":["../../../../../src/components/WalletModal/components/ExportWarningModal.tsx"],"names":[],"mappings":";AAAA;;GAEG;AACH,OAAO,EAAE,QAAQ,EAAsB,MAAM,OAAO,CAAC;AAErD,OAAO,0BAA0B,CAAC;AAClC,OAAO,0BAA0B,CAAC;AAClC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAY/C,MAAM,UAAU,kBAAkB,CAAC,EACjC,MAAM,EACN,OAAO,EACP,aAAa,EACb,YAAY,EAAE,aAAa,EAC3B,WAAW,EACX,KAAK,GAAG,MAAM,EACd,KAAK,GACmB;IACxB,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,QAAQ,CAAC,KA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D,eAAK,SAAS,EAAC,oCAAoC,aACjD,cAAK,SAAS,EAAC,sCAAsC,iBAAa,MAAM,YACtE,KAAC,YAAY,IAAC,IAAI,EAAE,EAAE,GAAI,GACtB,EAEN,YAAG,SAAS,EAAC,yCAAyC,kFAElD,EAEJ,iBAAO,SAAS,EAAC,6CAA6C,aAC5D,gBACE,IAAI,EAAC,UAAU,EACf,OAAO,EAAE,YAAY,EACrB,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,eAAe,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,EAClD,SAAS,EAAC,mDAAmD,GAC7D,EACF,6HAEO,IACD,EAER,iBACE,SAAS,EAAE,wCAAwC,CAAC,YAAY,IAAI,WAAW,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,EAAE,EACnG,OAAO,EAAE,YAAY,EACrB,QAAQ,EAAE,CAAC,YAAY,IAAI,WAAW,YAErC,WAAW,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,UAAU,GACjC,IACL,IACF,GACF,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
/* Manage Wallet Modal Styles - extracted from WalletModal.css */
|
|
2
|
+
.wallet-modal-manage {
|
|
3
|
+
position: relative;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.wallet-modal-manage-content {
|
|
7
|
+
padding: 12px 0 20px;
|
|
8
|
+
display: flex;
|
|
9
|
+
flex-direction: column;
|
|
10
|
+
gap: 16px;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.wallet-modal-manage-list {
|
|
14
|
+
display: flex;
|
|
15
|
+
flex-direction: column;
|
|
16
|
+
padding: 0 20px;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.wallet-modal-manage-list-item {
|
|
20
|
+
width: 100%;
|
|
21
|
+
padding: 16px 0;
|
|
22
|
+
border: none;
|
|
23
|
+
background: transparent;
|
|
24
|
+
cursor: pointer;
|
|
25
|
+
display: flex;
|
|
26
|
+
align-items: center;
|
|
27
|
+
gap: 12px;
|
|
28
|
+
text-align: left;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.wallet-modal-theme-dark .wallet-modal-manage-list-item {
|
|
32
|
+
color: #ffffff;
|
|
33
|
+
border-bottom: 1px solid rgba(255, 255, 255, 0.08);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.wallet-modal-theme-light .wallet-modal-manage-list-item {
|
|
37
|
+
color: #111827;
|
|
38
|
+
border-bottom: 1px solid rgba(17, 24, 39, 0.08);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.wallet-modal-theme-dark .wallet-modal-manage-list-item:hover {
|
|
42
|
+
background: rgba(255, 255, 255, 0.04);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.wallet-modal-theme-light .wallet-modal-manage-list-item:hover {
|
|
46
|
+
background: rgba(17, 24, 39, 0.04);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.wallet-modal-manage-list-icon {
|
|
50
|
+
width: 20px;
|
|
51
|
+
height: 20px;
|
|
52
|
+
display: flex;
|
|
53
|
+
align-items: center;
|
|
54
|
+
justify-content: center;
|
|
55
|
+
flex-shrink: 0;
|
|
56
|
+
opacity: 0.85;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.wallet-modal-manage-list-label {
|
|
60
|
+
flex: 1;
|
|
61
|
+
font-size: 14px;
|
|
62
|
+
font-weight: 500;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.wallet-modal-manage-list-arrow {
|
|
66
|
+
flex-shrink: 0;
|
|
67
|
+
opacity: 0.5;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.wallet-modal-manage-toast {
|
|
71
|
+
position: absolute;
|
|
72
|
+
left: 50%;
|
|
73
|
+
bottom: 18px;
|
|
74
|
+
transform: translateX(-50%);
|
|
75
|
+
padding: 10px 14px;
|
|
76
|
+
border-radius: 10px;
|
|
77
|
+
font-size: 13px;
|
|
78
|
+
font-weight: 500;
|
|
79
|
+
pointer-events: none;
|
|
80
|
+
z-index: 2;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.wallet-modal-theme-dark .wallet-modal-manage-toast {
|
|
84
|
+
background: rgba(42, 42, 42, 0.95);
|
|
85
|
+
border: 1px solid rgba(255, 255, 255, 0.12);
|
|
86
|
+
color: #ffffff;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.wallet-modal-theme-light .wallet-modal-manage-toast {
|
|
90
|
+
background: rgba(249, 250, 251, 0.98);
|
|
91
|
+
border: 1px solid rgba(17, 24, 39, 0.12);
|
|
92
|
+
color: #111827;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.wallet-modal-manage-section {
|
|
96
|
+
display: flex;
|
|
97
|
+
flex-direction: column;
|
|
98
|
+
gap: 16px;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.wallet-modal-manage-section-title {
|
|
102
|
+
font-size: 16px;
|
|
103
|
+
font-weight: 500;
|
|
104
|
+
margin: 0;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.wallet-modal-theme-dark .wallet-modal-manage-section-title {
|
|
108
|
+
color: #ffffff;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.wallet-modal-theme-light .wallet-modal-manage-section-title {
|
|
112
|
+
color: #111827;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.wallet-modal-manage-item {
|
|
116
|
+
display: flex;
|
|
117
|
+
flex-direction: column;
|
|
118
|
+
gap: 8px;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.wallet-modal-manage-label {
|
|
122
|
+
font-size: 12px;
|
|
123
|
+
opacity: 0.7;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.wallet-modal-theme-dark .wallet-modal-manage-label {
|
|
127
|
+
color: #9ca3af;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.wallet-modal-theme-light .wallet-modal-manage-label {
|
|
131
|
+
color: #6b7280;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.wallet-modal-manage-value {
|
|
135
|
+
font-size: 14px;
|
|
136
|
+
font-weight: 500;
|
|
137
|
+
display: flex;
|
|
138
|
+
align-items: center;
|
|
139
|
+
gap: 8px;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.wallet-modal-theme-dark .wallet-modal-manage-value {
|
|
143
|
+
color: #ffffff;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.wallet-modal-theme-light .wallet-modal-manage-value {
|
|
147
|
+
color: #111827;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.wallet-modal-manage-address-text {
|
|
151
|
+
font-family: 'GeistMono', 'SF Mono', monospace;
|
|
152
|
+
flex: 1;
|
|
153
|
+
min-width: 0;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.wallet-modal-manage-copy-btn {
|
|
157
|
+
padding: 6px 12px;
|
|
158
|
+
border-radius: 6px;
|
|
159
|
+
border: none;
|
|
160
|
+
background: transparent;
|
|
161
|
+
cursor: pointer;
|
|
162
|
+
transition: all 0.2s;
|
|
163
|
+
display: flex;
|
|
164
|
+
align-items: center;
|
|
165
|
+
gap: 6px;
|
|
166
|
+
font-size: 12px;
|
|
167
|
+
flex-shrink: 0;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
.wallet-modal-theme-dark .wallet-modal-manage-copy-btn {
|
|
171
|
+
color: #9ca3af;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.wallet-modal-theme-light .wallet-modal-manage-copy-btn {
|
|
175
|
+
color: #6b7280;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.wallet-modal-theme-dark .wallet-modal-manage-copy-btn:hover {
|
|
179
|
+
background: #2a2a2a;
|
|
180
|
+
color: #ffffff;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
.wallet-modal-theme-light .wallet-modal-manage-copy-btn:hover {
|
|
184
|
+
background: #f3f4f6;
|
|
185
|
+
color: #111827;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.wallet-modal-manage-copy-btn.copied {
|
|
189
|
+
color: #10b981;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
.wallet-modal-manage-action-item {
|
|
193
|
+
width: 100%;
|
|
194
|
+
padding: 14px 16px;
|
|
195
|
+
border-radius: 10px;
|
|
196
|
+
border: 1px solid;
|
|
197
|
+
background: transparent;
|
|
198
|
+
cursor: pointer;
|
|
199
|
+
transition: all 0.2s;
|
|
200
|
+
display: flex;
|
|
201
|
+
align-items: center;
|
|
202
|
+
gap: 12px;
|
|
203
|
+
text-align: left;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
.wallet-modal-theme-dark .wallet-modal-manage-action-item {
|
|
207
|
+
border-color: #3a3a3a;
|
|
208
|
+
background: #2a2a2a;
|
|
209
|
+
color: #ffffff;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
.wallet-modal-theme-light .wallet-modal-manage-action-item {
|
|
213
|
+
border-color: #e5e7eb;
|
|
214
|
+
background: #f9fafb;
|
|
215
|
+
color: #111827;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
.wallet-modal-theme-dark .wallet-modal-manage-action-item:hover {
|
|
219
|
+
background: #3a3a3a;
|
|
220
|
+
border-color: #4a4a4a;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
.wallet-modal-theme-light .wallet-modal-manage-action-item:hover {
|
|
224
|
+
background: #f3f4f6;
|
|
225
|
+
border-color: #d1d5db;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
.wallet-modal-manage-action-icon {
|
|
229
|
+
width: 20px;
|
|
230
|
+
height: 20px;
|
|
231
|
+
flex-shrink: 0;
|
|
232
|
+
display: flex;
|
|
233
|
+
align-items: center;
|
|
234
|
+
justify-content: center;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
.wallet-modal-manage-action-label {
|
|
238
|
+
flex: 1;
|
|
239
|
+
font-size: 14px;
|
|
240
|
+
font-weight: 500;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
.wallet-modal-manage-action-arrow {
|
|
244
|
+
flex-shrink: 0;
|
|
245
|
+
opacity: 0.5;
|
|
246
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import "./ManageWalletModal.css";
|
|
2
|
+
export interface ManageWalletModalProps {
|
|
3
|
+
isOpen: boolean;
|
|
4
|
+
onClose: () => void;
|
|
5
|
+
displayAddress: string | null;
|
|
6
|
+
userEmail?: string | null;
|
|
7
|
+
organizationName?: string | null;
|
|
8
|
+
isExternalWalletConnected: boolean;
|
|
9
|
+
onExportPrivateKey: () => void;
|
|
10
|
+
theme?: "light" | "dark";
|
|
11
|
+
}
|
|
12
|
+
export declare function ManageWalletModal({ ...props }: ManageWalletModalProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* Manage Wallet Modal Component
|
|
4
|
+
*/
|
|
5
|
+
import { useEffect, useRef, useState, useCallback } from "react";
|
|
6
|
+
import { IoKeyOutline } from "react-icons/io5";
|
|
7
|
+
import { SiWalletconnect } from "react-icons/si";
|
|
8
|
+
import { FiUsers } from "react-icons/fi";
|
|
9
|
+
import "./ManageWalletModal.css";
|
|
10
|
+
export function ManageWalletModal({ ...props }) {
|
|
11
|
+
const { isOpen, onClose, isExternalWalletConnected, onExportPrivateKey, theme = "dark", } = props;
|
|
12
|
+
const toastTimerRef = useRef(null);
|
|
13
|
+
const [toastMessage, setToastMessage] = useState(null);
|
|
14
|
+
const showToast = useCallback((message) => {
|
|
15
|
+
setToastMessage(message);
|
|
16
|
+
if (toastTimerRef.current) {
|
|
17
|
+
window.clearTimeout(toastTimerRef.current);
|
|
18
|
+
}
|
|
19
|
+
toastTimerRef.current = window.setTimeout(() => {
|
|
20
|
+
setToastMessage(null);
|
|
21
|
+
toastTimerRef.current = null;
|
|
22
|
+
}, 1800);
|
|
23
|
+
}, []);
|
|
24
|
+
useEffect(() => {
|
|
25
|
+
return () => {
|
|
26
|
+
if (toastTimerRef.current) {
|
|
27
|
+
window.clearTimeout(toastTimerRef.current);
|
|
28
|
+
toastTimerRef.current = null;
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
}, []);
|
|
32
|
+
if (!isOpen)
|
|
33
|
+
return null;
|
|
34
|
+
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-manage`, 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: "Manage Wallet" }), _jsx("button", { className: "wallet-modal-close", onClick: onClose, "aria-label": "Close", children: _jsx("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", children: _jsx("path", { d: "M18 6L6 18M6 6L18 18", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }) })] }), _jsx("div", { className: "wallet-modal-manage-content", children: _jsxs("div", { className: "wallet-modal-manage-list", children: [_jsxs("button", { className: "wallet-modal-manage-list-item", onClick: () => showToast("Coming soon"), type: "button", children: [_jsx("div", { className: "wallet-modal-manage-list-icon", "aria-hidden": "true", children: _jsx(FiUsers, { size: 20 }) }), _jsx("span", { className: "wallet-modal-manage-list-label", children: "Linked Profiles" }), _jsx("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", className: "wallet-modal-manage-list-arrow", "aria-hidden": "true", children: _jsx("path", { d: "M6 12L10 8L6 4", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) })] }), _jsxs("button", { className: "wallet-modal-manage-list-item", onClick: () => showToast("Coming soon"), type: "button", children: [_jsx("div", { className: "wallet-modal-manage-list-icon", "aria-hidden": "true", children: _jsx(SiWalletconnect, { size: 20 }) }), _jsx("span", { className: "wallet-modal-manage-list-label", children: "Connect an App" }), _jsx("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", className: "wallet-modal-manage-list-arrow", "aria-hidden": "true", children: _jsx("path", { d: "M6 12L10 8L6 4", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) })] }), !isExternalWalletConnected && (_jsxs("button", { className: "wallet-modal-manage-list-item", onClick: onExportPrivateKey, type: "button", children: [_jsx("div", { className: "wallet-modal-manage-list-icon", "aria-hidden": "true", children: _jsx(IoKeyOutline, { size: 20 }) }), _jsx("span", { className: "wallet-modal-manage-list-label", children: "Export Private Key" }), _jsx("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", className: "wallet-modal-manage-list-arrow", "aria-hidden": "true", children: _jsx("path", { d: "M6 12L10 8L6 4", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) })] }))] }) }), toastMessage && (_jsx("div", { className: "wallet-modal-manage-toast", role: "status", children: toastMessage }))] }) }));
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=ManageWalletModal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ManageWalletModal.js","sourceRoot":"","sources":["../../../../../src/components/WalletModal/components/ManageWalletModal.tsx"],"names":[],"mappings":";AAAA;;GAEG;AACH,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AA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AC,OAAO,EACrB,cAAc,EAAC,OAAO,GACtB,GACE,IACC,CACV,IACG,GACF,EAEL,YAAY,IAAI,CACf,cAAK,SAAS,EAAC,2BAA2B,EAAC,IAAI,EAAC,QAAQ,YACrD,YAAY,GACT,CACP,IACG,GACF,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
/* Preview Transaction Modal Styles */
|
|
2
|
+
.wallet-modal-preview-content {
|
|
3
|
+
padding: 20px 0;
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-direction: column;
|
|
6
|
+
gap: 24px;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.wallet-modal-preview-section {
|
|
10
|
+
display: flex;
|
|
11
|
+
flex-direction: column;
|
|
12
|
+
gap: 16px;
|
|
13
|
+
padding: 20px;
|
|
14
|
+
border-radius: 12px;
|
|
15
|
+
border: 1px solid;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.wallet-modal-theme-dark .wallet-modal-preview-section {
|
|
19
|
+
background: #2a2a2a;
|
|
20
|
+
border-color: #3a3a3a;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.wallet-modal-theme-light .wallet-modal-preview-section {
|
|
24
|
+
background: #f9fafb;
|
|
25
|
+
border-color: #e5e7eb;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.wallet-modal-preview-item {
|
|
29
|
+
display: flex;
|
|
30
|
+
flex-direction: column;
|
|
31
|
+
gap: 4px;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.wallet-modal-preview-label {
|
|
35
|
+
font-size: 12px;
|
|
36
|
+
opacity: 0.7;
|
|
37
|
+
text-align: left;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.wallet-modal-preview-value {
|
|
41
|
+
font-size: 14px;
|
|
42
|
+
font-weight: 500;
|
|
43
|
+
word-break: break-all;
|
|
44
|
+
text-align: left;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.wallet-modal-theme-dark .wallet-modal-preview-label,
|
|
48
|
+
.wallet-modal-theme-dark .wallet-modal-preview-value {
|
|
49
|
+
color: #ffffff;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.wallet-modal-theme-light .wallet-modal-preview-label,
|
|
53
|
+
.wallet-modal-theme-light .wallet-modal-preview-value {
|
|
54
|
+
color: #111827;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.wallet-modal-preview-actions {
|
|
58
|
+
display: flex;
|
|
59
|
+
flex-direction: column;
|
|
60
|
+
gap: 12px;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.wallet-modal-preview-btn {
|
|
64
|
+
width: 100%;
|
|
65
|
+
padding: 14px 24px;
|
|
66
|
+
border-radius: 12px;
|
|
67
|
+
border: none;
|
|
68
|
+
font-size: 16px;
|
|
69
|
+
font-weight: 600;
|
|
70
|
+
cursor: pointer;
|
|
71
|
+
transition: all 0.2s;
|
|
72
|
+
display: flex;
|
|
73
|
+
align-items: center;
|
|
74
|
+
justify-content: center;
|
|
75
|
+
gap: 8px;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.wallet-modal-preview-btn:disabled {
|
|
79
|
+
opacity: 0.5;
|
|
80
|
+
cursor: not-allowed;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.wallet-modal-preview-btn-primary {
|
|
84
|
+
background: var(--abstraxn-primary);
|
|
85
|
+
color: var(--abstraxn-primary-text);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.wallet-modal-preview-btn-primary:hover:not(:disabled) {
|
|
89
|
+
background: var(--abstraxn-primary-hover);
|
|
90
|
+
transform: translateY(-1px);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.wallet-modal-preview-btn-secondary {
|
|
94
|
+
background: transparent;
|
|
95
|
+
border: 1px solid;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.wallet-modal-theme-dark .wallet-modal-preview-btn-secondary {
|
|
99
|
+
border-color: #3a3a3a;
|
|
100
|
+
color: #ffffff;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.wallet-modal-theme-light .wallet-modal-preview-btn-secondary {
|
|
104
|
+
border-color: #e5e7eb;
|
|
105
|
+
color: #111827;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.wallet-modal-theme-dark .wallet-modal-preview-btn-secondary:hover:not(:disabled) {
|
|
109
|
+
background: #3a3a3a;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.wallet-modal-theme-light .wallet-modal-preview-btn-secondary:hover:not(:disabled) {
|
|
113
|
+
background: #f3f4f6;
|
|
114
|
+
}
|
|
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
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Preview Transaction Modal Component
|
|
3
|
+
*/
|
|
4
|
+
import type { ChainData } from '../../../chains';
|
|
5
|
+
import './PreviewTransactionModal.css';
|
|
6
|
+
export interface PreviewTransactionModalProps {
|
|
7
|
+
isOpen: boolean;
|
|
8
|
+
onClose: () => void;
|
|
9
|
+
onConfirm: () => void;
|
|
10
|
+
recipientAddress: string;
|
|
11
|
+
amount: string;
|
|
12
|
+
displayAddress: string | null;
|
|
13
|
+
currentChain: ChainData | null;
|
|
14
|
+
isSending: boolean;
|
|
15
|
+
theme?: 'light' | 'dark';
|
|
16
|
+
}
|
|
17
|
+
export declare function PreviewTransactionModal({ isOpen, onClose, onConfirm, recipientAddress, amount, displayAddress, currentChain, isSending, theme, }: PreviewTransactionModalProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -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,C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