@b3dotfun/sdk 0.0.74-alpha.1 → 0.0.75-alpha.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/dist/cjs/anyspend/react/components/AnySpend.js +1 -1
- package/dist/cjs/global-account/react/components/AvatarEditor/AvatarEditor.js +4 -4
- package/dist/cjs/global-account/react/components/ManageAccount/Header.js +2 -2
- package/dist/cjs/global-account/react/components/ManageAccount/NotificationChannel.js +1 -1
- package/dist/cjs/global-account/react/components/ManageAccount/NotificationsContent.js +1 -1
- package/dist/cjs/global-account/react/components/ManageAccount/SettingsContent.js +1 -1
- package/dist/cjs/global-account/react/components/ManageAccount/SettingsMenuItem.js +1 -1
- package/dist/cjs/global-account/react/components/ManageAccount/SettingsProfileCard.js +2 -2
- package/dist/cjs/global-account/react/components/ManageAccount/channels/DiscordChannel.js +9 -3
- package/dist/cjs/global-account/react/components/ManageAccount/channels/EmailChannel.js +1 -1
- package/dist/cjs/global-account/react/components/ManageAccount/channels/PhoneChannel.js +2 -2
- package/dist/cjs/global-account/react/components/ManageAccount/channels/TelegramChannel.js +1 -1
- package/dist/cjs/global-account/react/components/ModalHeader/ModalHeader.js +1 -1
- package/dist/cjs/global-account/react/components/Send/Send.js +2 -2
- package/dist/cjs/global-account/react/hooks/useSimBalance.js +2 -2
- package/dist/esm/anyspend/react/components/AnySpend.js +1 -1
- package/dist/esm/global-account/react/components/AvatarEditor/AvatarEditor.js +4 -4
- package/dist/esm/global-account/react/components/ManageAccount/Header.js +2 -2
- package/dist/esm/global-account/react/components/ManageAccount/NotificationChannel.js +1 -1
- package/dist/esm/global-account/react/components/ManageAccount/NotificationsContent.js +1 -1
- package/dist/esm/global-account/react/components/ManageAccount/SettingsContent.js +1 -1
- package/dist/esm/global-account/react/components/ManageAccount/SettingsMenuItem.js +1 -1
- package/dist/esm/global-account/react/components/ManageAccount/SettingsProfileCard.js +2 -2
- package/dist/esm/global-account/react/components/ManageAccount/channels/DiscordChannel.js +9 -3
- package/dist/esm/global-account/react/components/ManageAccount/channels/EmailChannel.js +1 -1
- package/dist/esm/global-account/react/components/ManageAccount/channels/PhoneChannel.js +2 -2
- package/dist/esm/global-account/react/components/ManageAccount/channels/TelegramChannel.js +1 -1
- package/dist/esm/global-account/react/components/ModalHeader/ModalHeader.js +1 -1
- package/dist/esm/global-account/react/components/Send/Send.js +2 -2
- package/dist/esm/global-account/react/hooks/useSimBalance.js +2 -2
- package/dist/styles/index.css +1 -1
- package/package.json +1 -1
- package/src/anyspend/react/components/AnySpend.tsx +1 -1
- package/src/global-account/react/components/AvatarEditor/AvatarEditor.tsx +9 -7
- package/src/global-account/react/components/ManageAccount/Header.tsx +2 -2
- package/src/global-account/react/components/ManageAccount/NotificationChannel.tsx +8 -6
- package/src/global-account/react/components/ManageAccount/NotificationsContent.tsx +1 -1
- package/src/global-account/react/components/ManageAccount/SettingsContent.tsx +1 -1
- package/src/global-account/react/components/ManageAccount/SettingsMenuItem.tsx +5 -5
- package/src/global-account/react/components/ManageAccount/SettingsProfileCard.tsx +3 -3
- package/src/global-account/react/components/ManageAccount/channels/DiscordChannel.tsx +25 -2
- package/src/global-account/react/components/ManageAccount/channels/EmailChannel.tsx +1 -1
- package/src/global-account/react/components/ManageAccount/channels/PhoneChannel.tsx +4 -4
- package/src/global-account/react/components/ManageAccount/channels/TelegramChannel.tsx +2 -2
- package/src/global-account/react/components/ModalHeader/ModalHeader.tsx +3 -3
- package/src/global-account/react/components/Send/Send.tsx +35 -27
- package/src/global-account/react/hooks/useSimBalance.ts +2 -2
- package/src/styles/index.css +25 -0
|
@@ -65,7 +65,7 @@ const SettingsContent = ({
|
|
|
65
65
|
|
|
66
66
|
{/* Profile Section */}
|
|
67
67
|
<div className="p-5">
|
|
68
|
-
<div className="b3-modal-settings-profile-card flex items-center rounded-xl border border-[#e4e4e7] bg-[#f4f4f5] p-4">
|
|
68
|
+
<div className="b3-modal-settings-profile-card dark:border-b3-line dark:bg-b3-background flex items-center rounded-xl border border-[#e4e4e7] bg-[#f4f4f5] p-4">
|
|
69
69
|
<SettingsProfileCard />
|
|
70
70
|
</div>
|
|
71
71
|
</div>
|
|
@@ -12,14 +12,14 @@ const SettingsMenuItem = ({ icon, title, subtitle, onClick }: SettingsMenuItemPr
|
|
|
12
12
|
return (
|
|
13
13
|
<button
|
|
14
14
|
onClick={onClick}
|
|
15
|
-
className="b3-modal-settings-menu-item flex w-full items-center gap-2 rounded-xl px-3 py-2 transition-colors hover:bg-[#f4f4f5]"
|
|
15
|
+
className="b3-modal-settings-menu-item dark:hover:bg-b3-line/50 flex w-full items-center gap-2 rounded-xl px-3 py-2 transition-colors hover:bg-[#f4f4f5]"
|
|
16
16
|
>
|
|
17
|
-
<div className="flex size-10 items-center justify-center rounded-full bg-[#f4f4f5]">{icon}</div>
|
|
18
|
-
<div className="flex flex-1 flex-col items-start gap-1 text-left">
|
|
19
|
-
<span className="font-neue-montreal-semibold text-[14px] leading-none tracking-[-0.28px] text-[#3f3f46]">
|
|
17
|
+
<div className="dark:bg-b3-line flex size-10 items-center justify-center rounded-full bg-[#f4f4f5]">{icon}</div>
|
|
18
|
+
<div className="flex flex-1 flex-col items-start gap-1 text-left dark:text-white">
|
|
19
|
+
<span className="font-neue-montreal-semibold text-[14px] leading-none tracking-[-0.28px] text-[#3f3f46] dark:text-white">
|
|
20
20
|
{title}
|
|
21
21
|
</span>
|
|
22
|
-
<span className="font-neue-montreal-medium text-[14px] leading-none tracking-[-0.28px] text-[#70707b]">
|
|
22
|
+
<span className="dark:text-b3-foreground-muted font-neue-montreal-medium text-[14px] leading-none tracking-[-0.28px] text-[#70707b]">
|
|
23
23
|
{subtitle}
|
|
24
24
|
</span>
|
|
25
25
|
</div>
|
|
@@ -128,11 +128,11 @@ const SettingsProfileCard = () => {
|
|
|
128
128
|
<IPFSMediaRenderer
|
|
129
129
|
src={avatarSrc}
|
|
130
130
|
alt="Profile"
|
|
131
|
-
className="border-
|
|
131
|
+
className="border-b3-line dark:border-white/8 size-14 rounded-full border object-cover"
|
|
132
132
|
/>
|
|
133
133
|
<button
|
|
134
134
|
onClick={handleEditAvatar}
|
|
135
|
-
className="absolute -bottom-0.5 -right-0.5 flex size-[18px] items-center justify-center rounded-full border-[1.5px]
|
|
135
|
+
className="border-b3-line absolute -bottom-0.5 -right-0.5 flex size-[18px] items-center justify-center rounded-full border-[1.5px] bg-[#a0a0ab] transition-colors hover:bg-[#a0a0ab]/80 dark:border-white"
|
|
136
136
|
aria-label="Edit avatar"
|
|
137
137
|
>
|
|
138
138
|
<Pencil size={10} className="text-white" strokeWidth={2.5} />
|
|
@@ -185,7 +185,7 @@ const SettingsProfileCard = () => {
|
|
|
185
185
|
onClick={handleEditUsername}
|
|
186
186
|
className="flex items-center justify-center gap-1 text-left transition-opacity hover:opacity-80"
|
|
187
187
|
>
|
|
188
|
-
<p className="font-inter text-sm font-semibold leading-5 text-[#51525C]">Edit Username</p>
|
|
188
|
+
<p className="font-inter text-sm font-semibold leading-5 text-[#51525C] dark:text-white">Edit Username</p>
|
|
189
189
|
</button>
|
|
190
190
|
</>
|
|
191
191
|
)}
|
|
@@ -30,6 +30,7 @@ export const DiscordChannel = ({
|
|
|
30
30
|
|
|
31
31
|
const [discordId, setDiscordId] = useState("");
|
|
32
32
|
const [isConnecting, setIsConnecting] = useState(false);
|
|
33
|
+
const [showInput, setShowInput] = useState(false);
|
|
33
34
|
|
|
34
35
|
// Detect if we're disconnecting
|
|
35
36
|
const isDisconnecting = isConnected && !isOptimisticallyConnected;
|
|
@@ -43,6 +44,7 @@ export const DiscordChannel = ({
|
|
|
43
44
|
await notificationsAPI.ensureNotificationSettings(userId, partnerId, "general", jwtToken);
|
|
44
45
|
|
|
45
46
|
setDiscordId("");
|
|
47
|
+
setShowInput(false);
|
|
46
48
|
toast.success("Discord connected successfully!");
|
|
47
49
|
onConnectionChange();
|
|
48
50
|
} catch (err: any) {
|
|
@@ -54,6 +56,9 @@ export const DiscordChannel = ({
|
|
|
54
56
|
};
|
|
55
57
|
|
|
56
58
|
const handleToggle = () => {
|
|
59
|
+
if (isConnected) {
|
|
60
|
+
setShowInput(false);
|
|
61
|
+
}
|
|
57
62
|
onToggle(isConnected);
|
|
58
63
|
};
|
|
59
64
|
|
|
@@ -67,7 +72,24 @@ export const DiscordChannel = ({
|
|
|
67
72
|
</svg>
|
|
68
73
|
);
|
|
69
74
|
|
|
70
|
-
const
|
|
75
|
+
const addButtonSection = (
|
|
76
|
+
<button onClick={() => setShowInput(true)} className="mt-1 flex items-center gap-1">
|
|
77
|
+
<svg width="16" height="16" viewBox="0 0 16 16" fill="none">
|
|
78
|
+
<path
|
|
79
|
+
d="M8 3.33333V12.6667M3.33333 8H12.6667"
|
|
80
|
+
stroke="#0c68e9"
|
|
81
|
+
strokeWidth="1.5"
|
|
82
|
+
strokeLinecap="round"
|
|
83
|
+
strokeLinejoin="round"
|
|
84
|
+
/>
|
|
85
|
+
</svg>
|
|
86
|
+
<span className="font-['Inter',sans-serif] text-[11px] font-semibold leading-[16px] text-[#0b57c2]">
|
|
87
|
+
Add Discord
|
|
88
|
+
</span>
|
|
89
|
+
</button>
|
|
90
|
+
);
|
|
91
|
+
|
|
92
|
+
const inputSection = showInput ? (
|
|
71
93
|
<div className="mt-1 space-y-2">
|
|
72
94
|
<input
|
|
73
95
|
type="text"
|
|
@@ -100,7 +122,7 @@ export const DiscordChannel = ({
|
|
|
100
122
|
</span>
|
|
101
123
|
</button>
|
|
102
124
|
</div>
|
|
103
|
-
);
|
|
125
|
+
) : null;
|
|
104
126
|
|
|
105
127
|
return (
|
|
106
128
|
<NotificationChannel
|
|
@@ -112,6 +134,7 @@ export const DiscordChannel = ({
|
|
|
112
134
|
isDisconnecting={isDisconnecting}
|
|
113
135
|
connectedInfo={discordChannel?.channel_identifier}
|
|
114
136
|
inputSection={inputSection}
|
|
137
|
+
addButtonSection={addButtonSection}
|
|
115
138
|
onToggle={handleToggle}
|
|
116
139
|
showBorder={false}
|
|
117
140
|
/>
|
|
@@ -121,7 +121,7 @@ export const EmailChannel = ({
|
|
|
121
121
|
}
|
|
122
122
|
}}
|
|
123
123
|
placeholder="your@email.com"
|
|
124
|
-
className={`w-full rounded-lg border px-2 py-1.5 font-['Inter',sans-serif] text-sm focus:outline-none ${
|
|
124
|
+
className={`dark:border-b3-line dark:bg-b3-background w-full rounded-lg border px-2 py-1.5 font-['Inter',sans-serif] text-sm focus:outline-none dark:text-white ${
|
|
125
125
|
emailError ? "border-red-500 focus:border-red-500" : "border-gray-300 focus:border-blue-500"
|
|
126
126
|
}`}
|
|
127
127
|
/>
|
|
@@ -148,7 +148,7 @@ export const PhoneChannel = ({
|
|
|
148
148
|
}
|
|
149
149
|
}}
|
|
150
150
|
placeholder="+1 (555) 123-4567"
|
|
151
|
-
className="w-full rounded-lg border border-gray-300 px-2 py-1.5 font-['Inter',sans-serif] text-sm focus:border-blue-500 focus:outline-none"
|
|
151
|
+
className="dark:border-b3-line dark:bg-b3-background w-full rounded-lg border border-gray-300 px-2 py-1.5 font-['Inter',sans-serif] text-sm focus:border-blue-500 focus:outline-none dark:text-white"
|
|
152
152
|
/>
|
|
153
153
|
<div className="flex gap-2">
|
|
154
154
|
<button
|
|
@@ -165,7 +165,7 @@ export const PhoneChannel = ({
|
|
|
165
165
|
strokeLinejoin="round"
|
|
166
166
|
/>
|
|
167
167
|
</svg>
|
|
168
|
-
<span className="font-['Inter',sans-serif] text-[11px] font-semibold leading-[16px] text-[#0b57c2]">
|
|
168
|
+
<span className="font-['Inter',sans-serif] text-[11px] font-semibold leading-[16px] text-[#0b57c2] dark:text-white">
|
|
169
169
|
{isConnectingSMS ? "Connecting..." : "Add SMS"}
|
|
170
170
|
</span>
|
|
171
171
|
</button>
|
|
@@ -195,12 +195,12 @@ export const PhoneChannel = ({
|
|
|
195
195
|
const connectedInfo = (
|
|
196
196
|
<>
|
|
197
197
|
{isSMSConnected && (
|
|
198
|
-
<p className="font-['PP_Neue_Montreal','PP_Neue_Montreal_Fallback',sans-serif] text-[14px] leading-[20px] text-[#51525c]">
|
|
198
|
+
<p className="font-['PP_Neue_Montreal','PP_Neue_Montreal_Fallback',sans-serif] text-[14px] leading-[20px] text-[#51525c] dark:text-white">
|
|
199
199
|
{smsChannel?.channel_identifier}
|
|
200
200
|
</p>
|
|
201
201
|
)}
|
|
202
202
|
{isWhatsAppConnected && (
|
|
203
|
-
<p className="font-['PP_Neue_Montreal','PP_Neue_Montreal_Fallback',sans-serif] text-[14px] leading-[20px] text-[#51525c]">
|
|
203
|
+
<p className="font-['PP_Neue_Montreal','PP_Neue_Montreal_Fallback',sans-serif] text-[14px] leading-[20px] text-[#51525c] dark:text-white">
|
|
204
204
|
{whatsappChannel?.channel_identifier}
|
|
205
205
|
</p>
|
|
206
206
|
)}
|
|
@@ -106,10 +106,10 @@ export const TelegramChannel = ({
|
|
|
106
106
|
const inputSection =
|
|
107
107
|
status === "pending" ? (
|
|
108
108
|
<div className="mt-1">
|
|
109
|
-
<p className="font-['PP_Neue_Montreal','PP_Neue_Montreal_Fallback',sans-serif] text-[14px] leading-[20px] text-yellow-700">
|
|
109
|
+
<p className="font-['PP_Neue_Montreal','PP_Neue_Montreal_Fallback',sans-serif] text-[14px] leading-[20px] text-yellow-700 dark:text-white">
|
|
110
110
|
Waiting for connection...
|
|
111
111
|
</p>
|
|
112
|
-
<p className="font-['PP_Neue_Montreal','PP_Neue_Montreal_Fallback',sans-serif] text-[12px] text-yellow-600">
|
|
112
|
+
<p className="font-['PP_Neue_Montreal','PP_Neue_Montreal_Fallback',sans-serif] text-[12px] text-yellow-600 dark:text-white">
|
|
113
113
|
Send /start to @b3_notifications_bot
|
|
114
114
|
</p>
|
|
115
115
|
</div>
|
|
@@ -36,19 +36,19 @@ const ModalHeader = ({
|
|
|
36
36
|
onClick={handleBack || navigateBack}
|
|
37
37
|
className="flex h-6 w-6 items-center justify-center transition-opacity hover:opacity-70"
|
|
38
38
|
>
|
|
39
|
-
<ChevronLeft className="h-6 w-6 text-[#51525c]" />
|
|
39
|
+
<ChevronLeft className="h-6 w-6 text-[#51525c] dark:text-white" />
|
|
40
40
|
{showBackWord && <span className="text-sm font-medium">Back</span>}
|
|
41
41
|
</button>
|
|
42
42
|
) : (
|
|
43
43
|
<div className="w-2" />
|
|
44
44
|
)}
|
|
45
|
-
<p className="font-inter text-lg font-semibold leading-7 text-[#18181b]">{title}</p>
|
|
45
|
+
<p className="font-inter text-lg font-semibold leading-7 text-[#18181b] dark:text-white">{title}</p>
|
|
46
46
|
{showCloseButton ? (
|
|
47
47
|
<button
|
|
48
48
|
onClick={handleClose || (() => setB3ModalOpen(false))}
|
|
49
49
|
className="flex h-6 w-6 items-center justify-center transition-opacity hover:opacity-70"
|
|
50
50
|
>
|
|
51
|
-
<X className="h-6 w-6 text-[#51525c]" />
|
|
51
|
+
<X className="h-6 w-6 text-[#51525c] dark:text-white" />
|
|
52
52
|
</button>
|
|
53
53
|
) : !children ? (
|
|
54
54
|
<div className="w-2" />
|
|
@@ -240,7 +240,7 @@ export function Send({ recipientAddress: initialRecipient, onSuccess }: SendModa
|
|
|
240
240
|
};
|
|
241
241
|
|
|
242
242
|
return (
|
|
243
|
-
<div className="flex h-[600px] w-full flex-col bg-white">
|
|
243
|
+
<div className="dark:bg-b3-background flex h-[600px] w-full flex-col bg-white">
|
|
244
244
|
<ModalHeader handleBack={handleBack} title={getStepTitle()} />
|
|
245
245
|
|
|
246
246
|
{/* Content - 20px padding */}
|
|
@@ -248,10 +248,10 @@ export function Send({ recipientAddress: initialRecipient, onSuccess }: SendModa
|
|
|
248
248
|
{step === "recipient" && (
|
|
249
249
|
<div className="flex flex-col gap-6 p-5">
|
|
250
250
|
{/* Input field - 48px height */}
|
|
251
|
-
<div className="flex h-12 w-full items-stretch overflow-hidden rounded-lg border border-[#d1d1d6] bg-white">
|
|
251
|
+
<div className="dark:border-b3-line dark:bg-b3-background flex h-12 w-full items-stretch overflow-hidden rounded-lg border border-[#d1d1d6] bg-white">
|
|
252
252
|
{/* "To" addon - 48px width */}
|
|
253
253
|
<div className="flex w-12 items-center justify-center bg-transparent px-3 py-2">
|
|
254
|
-
<span className="font-neue-montreal-medium text-base text-[#3f3f46]">To</span>
|
|
254
|
+
<span className="font-neue-montreal-medium text-base text-[#3f3f46] dark:text-white">To</span>
|
|
255
255
|
</div>
|
|
256
256
|
{/* Input */}
|
|
257
257
|
<div className="flex flex-1 items-center border-l border-[#d1d1d6] px-3 py-2">
|
|
@@ -260,7 +260,7 @@ export function Send({ recipientAddress: initialRecipient, onSuccess }: SendModa
|
|
|
260
260
|
value={recipientAddress}
|
|
261
261
|
onChange={e => handleRecipientAddressChange(e.target.value)}
|
|
262
262
|
placeholder="ENS or Address"
|
|
263
|
-
className="font-neue-montreal-medium flex-1 text-base text-[#70707b] outline-none placeholder:text-[#70707b]"
|
|
263
|
+
className="font-neue-montreal-medium dark:bg-b3-background flex-1 text-base text-[#70707b] outline-none placeholder:text-[#70707b] dark:text-white dark:placeholder:text-white"
|
|
264
264
|
/>
|
|
265
265
|
{/* Paste badge */}
|
|
266
266
|
<button
|
|
@@ -287,7 +287,7 @@ export function Send({ recipientAddress: initialRecipient, onSuccess }: SendModa
|
|
|
287
287
|
{/* Validated Address Card */}
|
|
288
288
|
<button
|
|
289
289
|
onClick={handleSelectValidatedAddress}
|
|
290
|
-
className="flex items-center gap-2 rounded-xl bg-[#f4f4f5] px-3 py-2 transition-colors hover:bg-[#e4e4e7]"
|
|
290
|
+
className="dark:bg-b3-background dark:border-b3-line flex items-center gap-2 rounded-xl bg-[#f4f4f5] px-3 py-2 transition-colors hover:bg-[#e4e4e7]"
|
|
291
291
|
>
|
|
292
292
|
{/* Avatar */}
|
|
293
293
|
{validatedProfileData?.avatar ? (
|
|
@@ -297,12 +297,12 @@ export function Send({ recipientAddress: initialRecipient, onSuccess }: SendModa
|
|
|
297
297
|
className="h-10 w-10 rounded-full"
|
|
298
298
|
/>
|
|
299
299
|
) : (
|
|
300
|
-
<div className="flex h-10 w-10 items-center justify-center rounded-full border border-[#e4e4e7] bg-[#f4f4f5]">
|
|
301
|
-
<Wallet className="h-5 w-5 text-[#a0a0ab]" />
|
|
300
|
+
<div className="dark:border-b3-line dark:bg-b3-background flex h-10 w-10 items-center justify-center rounded-full border border-[#e4e4e7] bg-[#f4f4f5]">
|
|
301
|
+
<Wallet className="h-5 w-5 text-[#a0a0ab] dark:text-white" />
|
|
302
302
|
</div>
|
|
303
303
|
)}
|
|
304
304
|
{/* Address and Name */}
|
|
305
|
-
<span className="font-neue-montreal-medium text-base tracking-[-0.32px] text-[#70707b]">
|
|
305
|
+
<span className="font-neue-montreal-medium text-base tracking-[-0.32px] text-[#70707b] dark:text-white">
|
|
306
306
|
{recipientAddress.slice(0, 6)}...{recipientAddress.slice(-4)}
|
|
307
307
|
{validatedProfileData?.name && ` (${validatedProfileData.name})`}
|
|
308
308
|
</span>
|
|
@@ -420,7 +420,7 @@ export function Send({ recipientAddress: initialRecipient, onSuccess }: SendModa
|
|
|
420
420
|
{step === "amount" && selectedToken && (
|
|
421
421
|
<div className="flex flex-col gap-6 p-5">
|
|
422
422
|
{/* Selected Token Display */}
|
|
423
|
-
<div className="flex items-center justify-between rounded-xl border border-[#d1d1d6] bg-[#fafafa] p-3">
|
|
423
|
+
<div className="dark:border-b3-line dark:bg-b3-background flex items-center justify-between rounded-xl border border-[#d1d1d6] bg-[#fafafa] p-3">
|
|
424
424
|
<div className="flex items-center gap-3">
|
|
425
425
|
<div className="flex h-10 w-10 items-center justify-center">
|
|
426
426
|
{ALL_CHAINS[selectedToken.chain_id]?.logoUrl ? (
|
|
@@ -434,15 +434,17 @@ export function Send({ recipientAddress: initialRecipient, onSuccess }: SendModa
|
|
|
434
434
|
)}
|
|
435
435
|
</div>
|
|
436
436
|
<div>
|
|
437
|
-
<div className="font-neue-montreal-semibold text-base text-[#18181b]">
|
|
438
|
-
|
|
437
|
+
<div className="font-neue-montreal-semibold text-base text-[#18181b] dark:text-white">
|
|
438
|
+
{selectedToken.symbol}
|
|
439
|
+
</div>
|
|
440
|
+
<div className="font-neue-montreal-medium text-sm text-[#70707b] dark:text-white">
|
|
439
441
|
{formatTokenAmount(BigInt(selectedToken.amount), selectedToken.decimals)}
|
|
440
442
|
</div>
|
|
441
443
|
</div>
|
|
442
444
|
</div>
|
|
443
445
|
<button
|
|
444
446
|
onClick={() => setStep("token")}
|
|
445
|
-
className="text-b3-primary-blue font-neue-montreal-semibold hover:text-b3-primary-blue/80 text-sm transition-colors"
|
|
447
|
+
className="text-b3-primary-blue font-neue-montreal-semibold hover:text-b3-primary-blue/80 text-sm transition-colors dark:text-white"
|
|
446
448
|
>
|
|
447
449
|
Change
|
|
448
450
|
</button>
|
|
@@ -462,7 +464,7 @@ export function Send({ recipientAddress: initialRecipient, onSuccess }: SendModa
|
|
|
462
464
|
minLength={1}
|
|
463
465
|
maxLength={30}
|
|
464
466
|
spellCheck="false"
|
|
465
|
-
className="font-neue-montreal-medium placeholder:text-b3-foreground-muted w-full rounded-lg border border-[#d1d1d6] bg-white px-3 py-2 text-base text-[#18181b] outline-none focus:border-[#0c68e9]"
|
|
467
|
+
className="font-neue-montreal-medium placeholder:text-b3-foreground-muted dark:border-b3-line dark:bg-b3-background w-full rounded-lg border border-[#d1d1d6] bg-white px-3 py-2 text-base text-[#18181b] outline-none focus:border-[#0c68e9] dark:text-white"
|
|
466
468
|
pattern="^[0-9]*[.,]?[0-9]*$"
|
|
467
469
|
disabled={isSending}
|
|
468
470
|
value={sendAmount}
|
|
@@ -477,7 +479,7 @@ export function Send({ recipientAddress: initialRecipient, onSuccess }: SendModa
|
|
|
477
479
|
key={percentage}
|
|
478
480
|
variant="outline"
|
|
479
481
|
onClick={() => handlePercentageClick(percentage)}
|
|
480
|
-
className="font-neue-montreal-medium border-[#d1d1d6] text-sm text-[#18181b] hover:bg-[#fafafa]"
|
|
482
|
+
className="font-neue-montreal-medium dark:border-b3-line dark:bg-b3-background border-[#d1d1d6] text-sm text-[#18181b] hover:bg-[#fafafa] dark:text-white"
|
|
481
483
|
disabled={isSending}
|
|
482
484
|
>
|
|
483
485
|
{percentage}%
|
|
@@ -508,16 +510,16 @@ export function Send({ recipientAddress: initialRecipient, onSuccess }: SendModa
|
|
|
508
510
|
{/* Top section with icon and amount */}
|
|
509
511
|
<div className="flex flex-col items-center gap-4 px-5 pb-0 pt-6">
|
|
510
512
|
{/* Send icon */}
|
|
511
|
-
<div className="flex h-14 w-14 items-center justify-center rounded-full bg-[#d5e5fd]">
|
|
513
|
+
<div className="dark:bg-b3-line flex h-14 w-14 items-center justify-center rounded-full bg-[#d5e5fd]">
|
|
512
514
|
<SendIcon className="h-7 w-7 text-[#0c68e9]" />
|
|
513
515
|
</div>
|
|
514
516
|
|
|
515
517
|
{/* Amount */}
|
|
516
518
|
<div className="flex items-center gap-1">
|
|
517
|
-
<span className="font-neue-montreal-semibold text-[30px] leading-[38px] text-[#18181b]">
|
|
519
|
+
<span className="font-neue-montreal-semibold text-[30px] leading-[38px] text-[#18181b] dark:text-white">
|
|
518
520
|
{sendAmount}
|
|
519
521
|
</span>
|
|
520
|
-
<span className="font-neue-montreal-semibold text-[30px] leading-[38px] text-[#70707b]">
|
|
522
|
+
<span className="font-neue-montreal-semibold text-[30px] leading-[38px] text-[#70707b] dark:text-white">
|
|
521
523
|
{selectedToken.symbol}
|
|
522
524
|
</span>
|
|
523
525
|
</div>
|
|
@@ -528,21 +530,23 @@ export function Send({ recipientAddress: initialRecipient, onSuccess }: SendModa
|
|
|
528
530
|
|
|
529
531
|
{/* Transaction details */}
|
|
530
532
|
<div className="flex flex-col gap-3 px-5">
|
|
531
|
-
<div className="rounded-xl border border-[#e4e4e7] bg-[#fafafa] p-4">
|
|
533
|
+
<div className="dark:border-b3-line dark:bg-b3-background rounded-xl border border-[#e4e4e7] bg-[#fafafa] p-4">
|
|
532
534
|
<div className="flex flex-col gap-3">
|
|
533
535
|
{/* To */}
|
|
534
|
-
<div className="flex items-center justify-between border-b border-[#e4e4e7] pb-3">
|
|
535
|
-
<span className="font-inter text-sm font-normal leading-5 text-[#51525c]">To</span>
|
|
536
|
-
<span className="font-inter text-sm font-normal leading-5 text-[#18181b]">
|
|
536
|
+
<div className="dark:border-b3-line flex items-center justify-between border-b border-[#e4e4e7] pb-3">
|
|
537
|
+
<span className="font-inter text-sm font-normal leading-5 text-[#51525c] dark:text-white">To</span>
|
|
538
|
+
<span className="font-inter text-sm font-normal leading-5 text-[#18181b] dark:text-white">
|
|
537
539
|
Wallet ({recipientAddress.slice(0, 6)}...{recipientAddress.slice(-4)})
|
|
538
540
|
</span>
|
|
539
541
|
</div>
|
|
540
542
|
|
|
541
543
|
{/* Network */}
|
|
542
|
-
<div className="flex items-center justify-between border-b border-[#e4e4e7] pb-3">
|
|
543
|
-
<span className="font-inter text-sm font-normal leading-5 text-[#51525c]">
|
|
544
|
+
<div className="dark:border-b3-line flex items-center justify-between border-b border-[#e4e4e7] pb-3">
|
|
545
|
+
<span className="font-inter text-sm font-normal leading-5 text-[#51525c] dark:text-white">
|
|
546
|
+
Network
|
|
547
|
+
</span>
|
|
544
548
|
<div className="flex items-center gap-1.5">
|
|
545
|
-
<span className="font-inter text-sm font-normal leading-5 text-[#51525c]">
|
|
549
|
+
<span className="font-inter text-sm font-normal leading-5 text-[#51525c] dark:text-white">
|
|
546
550
|
{ALL_CHAINS[selectedToken.chain_id]?.name || "Unknown"}
|
|
547
551
|
</span>
|
|
548
552
|
{ALL_CHAINS[selectedToken.chain_id]?.logoUrl && (
|
|
@@ -557,8 +561,12 @@ export function Send({ recipientAddress: initialRecipient, onSuccess }: SendModa
|
|
|
557
561
|
|
|
558
562
|
{/* Network fee */}
|
|
559
563
|
<div className="flex items-center justify-between">
|
|
560
|
-
<span className="font-inter text-sm font-normal leading-5 text-[#51525c]">
|
|
561
|
-
|
|
564
|
+
<span className="font-inter text-sm font-normal leading-5 text-[#51525c] dark:text-white">
|
|
565
|
+
Network fee
|
|
566
|
+
</span>
|
|
567
|
+
<span className="font-inter text-sm font-normal leading-5 text-[#18181b] dark:text-white">
|
|
568
|
+
$0.1
|
|
569
|
+
</span>
|
|
562
570
|
</div>
|
|
563
571
|
</div>
|
|
564
572
|
</div>
|
|
@@ -568,7 +576,7 @@ export function Send({ recipientAddress: initialRecipient, onSuccess }: SendModa
|
|
|
568
576
|
<div className="flex-1" />
|
|
569
577
|
|
|
570
578
|
{/* Bottom buttons */}
|
|
571
|
-
<div className="flex gap-4 border-t border-[#e4e4e7] bg-[#fafafa] p-4">
|
|
579
|
+
<div className="dark:border-b3-line dark:bg-b3-background flex gap-4 border-t border-[#e4e4e7] bg-[#fafafa] p-4">
|
|
572
580
|
<Button
|
|
573
581
|
onClick={handleBack}
|
|
574
582
|
disabled={isSending}
|
|
@@ -31,8 +31,8 @@ async function fetchSimBalance(address: string, chainIdsParam: number[]): Promis
|
|
|
31
31
|
|
|
32
32
|
const chainIds = chainIdsParam.length === 0 ? "mainnet" : chainIdsParam.join(",");
|
|
33
33
|
let url = `https://simdune-api.sean-430.workers.dev/?url=https://api.sim.dune.com/v1/evm/balances/${address}?metadata=logo&chain_ids=${chainIds}&exclude_spam_tokens=true`;
|
|
34
|
-
if (process.env.
|
|
35
|
-
url += `&localkey=${process.env.
|
|
34
|
+
if (process.env.NEXT_PUBLIC_DEVMODE_SHARED_SECRET) {
|
|
35
|
+
url += `&localkey=${process.env.NEXT_PUBLIC_DEVMODE_SHARED_SECRET}`;
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
const response = await fetch(url);
|
package/src/styles/index.css
CHANGED
|
@@ -289,6 +289,31 @@ html[data-theme="dark"] .b3-root,
|
|
|
289
289
|
}
|
|
290
290
|
}
|
|
291
291
|
|
|
292
|
+
.b3-root[data-theme="dark"] .b3-modal {
|
|
293
|
+
@media (min-width: 768px) {
|
|
294
|
+
background: hsl(var(--b3-react-background));
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
.modal-inner-content {
|
|
298
|
+
background: hsl(var(--b3-background));
|
|
299
|
+
border: 1px solid hsl(var(--b3-line));
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
.b3-modal-home-actions > button {
|
|
303
|
+
background: hsl(var(--b3-background));
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
.b3-modal-bottom-navigation {
|
|
307
|
+
background: hsl(var(--b3-background));
|
|
308
|
+
border-top: 1px solid hsl(var(--b3-line));
|
|
309
|
+
}
|
|
310
|
+
.b3-modal-header {
|
|
311
|
+
background: hsl(var(--b3-background));
|
|
312
|
+
border-bottom: 1px solid hsl(var(--b3-line));
|
|
313
|
+
color: white;
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
|
|
292
317
|
.b3-modal-freestyle {
|
|
293
318
|
background: transparent !important;
|
|
294
319
|
padding: 0 !important;
|