thirdweb 5.110.0 → 5.110.2-nightly-630edadcec2c777cfd4bfef4871aff396e98291e-20251024000336
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/adapters/eip1193/to-eip1193.js +120 -80
- package/dist/cjs/adapters/eip1193/to-eip1193.js.map +1 -1
- package/dist/cjs/contract/deployment/utils/create-2-factory.js +1 -0
- package/dist/cjs/contract/deployment/utils/create-2-factory.js.map +1 -1
- package/dist/cjs/react/core/design-system/index.js +68 -68
- package/dist/cjs/react/core/design-system/index.js.map +1 -1
- package/dist/cjs/react/native/ui/connect/SendScreen.js +1 -1
- package/dist/cjs/react/web/ui/Bridge/BuyWidget.js +1 -3
- package/dist/cjs/react/web/ui/Bridge/BuyWidget.js.map +1 -1
- package/dist/cjs/react/web/ui/Bridge/FundWallet.js +10 -8
- package/dist/cjs/react/web/ui/Bridge/FundWallet.js.map +1 -1
- package/dist/cjs/react/web/ui/Bridge/payment-selection/FiatProviderSelection.js +2 -4
- package/dist/cjs/react/web/ui/Bridge/payment-selection/FiatProviderSelection.js.map +1 -1
- package/dist/cjs/react/web/ui/Bridge/payment-selection/PaymentSelection.js +1 -1
- package/dist/cjs/react/web/ui/Bridge/payment-selection/PaymentSelection.js.map +1 -1
- package/dist/cjs/react/web/ui/Bridge/payment-selection/TokenSelection.js +25 -22
- package/dist/cjs/react/web/ui/Bridge/payment-selection/TokenSelection.js.map +1 -1
- package/dist/cjs/react/web/ui/Bridge/payment-selection/WalletFiatSelection.js +22 -30
- package/dist/cjs/react/web/ui/Bridge/payment-selection/WalletFiatSelection.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/WalletEntryButton.js +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/WalletSelector.js +2 -2
- package/dist/cjs/react/web/ui/ConnectWallet/WalletSelector.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/ReceiveFunds.js +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/ReceiveFunds.js.map +1 -1
- package/dist/cjs/react/web/ui/components/modalElements.js +2 -1
- package/dist/cjs/react/web/ui/components/modalElements.js.map +1 -1
- package/dist/cjs/react/web/wallets/shared/ConnectingScreen.js +1 -1
- package/dist/cjs/stories/theme.stories.js +59 -0
- package/dist/cjs/stories/theme.stories.js.map +1 -0
- package/dist/cjs/version.js +1 -1
- package/dist/cjs/version.js.map +1 -1
- package/dist/cjs/wallets/in-app/core/eip5792/in-app-wallet-calls.js +6 -2
- package/dist/cjs/wallets/in-app/core/eip5792/in-app-wallet-calls.js.map +1 -1
- package/dist/cjs/wallets/in-app/core/eip7702/minimal-account.js +1 -0
- package/dist/cjs/wallets/in-app/core/eip7702/minimal-account.js.map +1 -1
- package/dist/cjs/wallets/in-app/core/wallet/enclave-wallet.js +1 -0
- package/dist/cjs/wallets/in-app/core/wallet/enclave-wallet.js.map +1 -1
- package/dist/cjs/wallets/smart/index.js +2 -0
- package/dist/cjs/wallets/smart/index.js.map +1 -1
- package/dist/esm/adapters/eip1193/to-eip1193.js +120 -80
- package/dist/esm/adapters/eip1193/to-eip1193.js.map +1 -1
- package/dist/esm/contract/deployment/utils/create-2-factory.js +1 -0
- package/dist/esm/contract/deployment/utils/create-2-factory.js.map +1 -1
- package/dist/esm/react/core/design-system/index.js +68 -68
- package/dist/esm/react/core/design-system/index.js.map +1 -1
- package/dist/esm/react/native/ui/connect/SendScreen.js +1 -1
- package/dist/esm/react/web/ui/Bridge/BuyWidget.js +1 -3
- package/dist/esm/react/web/ui/Bridge/BuyWidget.js.map +1 -1
- package/dist/esm/react/web/ui/Bridge/FundWallet.js +10 -8
- package/dist/esm/react/web/ui/Bridge/FundWallet.js.map +1 -1
- package/dist/esm/react/web/ui/Bridge/payment-selection/FiatProviderSelection.js +2 -4
- package/dist/esm/react/web/ui/Bridge/payment-selection/FiatProviderSelection.js.map +1 -1
- package/dist/esm/react/web/ui/Bridge/payment-selection/PaymentSelection.js +1 -1
- package/dist/esm/react/web/ui/Bridge/payment-selection/PaymentSelection.js.map +1 -1
- package/dist/esm/react/web/ui/Bridge/payment-selection/TokenSelection.js +26 -23
- package/dist/esm/react/web/ui/Bridge/payment-selection/TokenSelection.js.map +1 -1
- package/dist/esm/react/web/ui/Bridge/payment-selection/WalletFiatSelection.js +24 -32
- package/dist/esm/react/web/ui/Bridge/payment-selection/WalletFiatSelection.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/WalletEntryButton.js +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/WalletSelector.js +2 -2
- package/dist/esm/react/web/ui/ConnectWallet/WalletSelector.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/ReceiveFunds.js +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/ReceiveFunds.js.map +1 -1
- package/dist/esm/react/web/ui/components/modalElements.js +2 -1
- package/dist/esm/react/web/ui/components/modalElements.js.map +1 -1
- package/dist/esm/react/web/wallets/shared/ConnectingScreen.js +1 -1
- package/dist/esm/stories/theme.stories.js +55 -0
- package/dist/esm/stories/theme.stories.js.map +1 -0
- package/dist/esm/version.js +1 -1
- package/dist/esm/version.js.map +1 -1
- package/dist/esm/wallets/in-app/core/eip5792/in-app-wallet-calls.js +6 -2
- package/dist/esm/wallets/in-app/core/eip5792/in-app-wallet-calls.js.map +1 -1
- package/dist/esm/wallets/in-app/core/eip7702/minimal-account.js +1 -0
- package/dist/esm/wallets/in-app/core/eip7702/minimal-account.js.map +1 -1
- package/dist/esm/wallets/in-app/core/wallet/enclave-wallet.js +1 -0
- package/dist/esm/wallets/in-app/core/wallet/enclave-wallet.js.map +1 -1
- package/dist/esm/wallets/smart/index.js +2 -0
- package/dist/esm/wallets/smart/index.js.map +1 -1
- package/dist/scripts/bridge-widget.js +85 -85
- package/dist/types/adapters/eip1193/to-eip1193.d.ts.map +1 -1
- package/dist/types/react/core/design-system/index.d.ts.map +1 -1
- package/dist/types/react/web/ui/Bridge/BuyWidget.d.ts.map +1 -1
- package/dist/types/react/web/ui/Bridge/FundWallet.d.ts.map +1 -1
- package/dist/types/react/web/ui/Bridge/payment-selection/FiatProviderSelection.d.ts.map +1 -1
- package/dist/types/react/web/ui/Bridge/payment-selection/TokenSelection.d.ts.map +1 -1
- package/dist/types/react/web/ui/Bridge/payment-selection/WalletFiatSelection.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/ReceiveFunds.d.ts.map +1 -1
- package/dist/types/react/web/ui/components/modalElements.d.ts.map +1 -1
- package/dist/types/stories/theme.stories.d.ts +6 -0
- package/dist/types/stories/theme.stories.d.ts.map +1 -0
- package/dist/types/version.d.ts +1 -1
- package/dist/types/version.d.ts.map +1 -1
- package/dist/types/wallets/in-app/core/eip5792/in-app-wallet-calls.d.ts +1 -0
- package/dist/types/wallets/in-app/core/eip5792/in-app-wallet-calls.d.ts.map +1 -1
- package/dist/types/wallets/in-app/core/eip7702/minimal-account.d.ts.map +1 -1
- package/dist/types/wallets/in-app/core/wallet/enclave-wallet.d.ts.map +1 -1
- package/dist/types/wallets/smart/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/adapters/eip1193/to-eip1193.ts +123 -85
- package/src/contract/deployment/utils/create-2-factory.ts +1 -0
- package/src/react/core/design-system/index.ts +70 -102
- package/src/react/native/ui/connect/SendScreen.tsx +1 -1
- package/src/react/web/ui/Bridge/BuyWidget.tsx +1 -3
- package/src/react/web/ui/Bridge/FundWallet.tsx +17 -14
- package/src/react/web/ui/Bridge/payment-selection/FiatProviderSelection.tsx +2 -5
- package/src/react/web/ui/Bridge/payment-selection/PaymentSelection.tsx +1 -1
- package/src/react/web/ui/Bridge/payment-selection/TokenSelection.tsx +85 -89
- package/src/react/web/ui/Bridge/payment-selection/WalletFiatSelection.tsx +67 -100
- package/src/react/web/ui/ConnectWallet/WalletEntryButton.tsx +1 -1
- package/src/react/web/ui/ConnectWallet/WalletSelector.tsx +2 -2
- package/src/react/web/ui/ConnectWallet/screens/ReceiveFunds.tsx +3 -2
- package/src/react/web/ui/components/modalElements.tsx +2 -1
- package/src/react/web/wallets/shared/ConnectingScreen.tsx +1 -1
- package/src/stories/theme.stories.tsx +165 -0
- package/src/version.ts +1 -1
- package/src/wallets/in-app/core/eip5792/in-app-wallet-calls.ts +11 -2
- package/src/wallets/in-app/core/eip7702/minimal-account.ts +1 -0
- package/src/wallets/in-app/core/wallet/enclave-wallet.ts +1 -0
- package/src/wallets/smart/index.ts +2 -0
|
@@ -167,6 +167,9 @@ export function FundWallet(props: FundWalletProps) {
|
|
|
167
167
|
const actionLabel = isReceiverDifferentFromActiveWallet ? "Pay" : "Buy";
|
|
168
168
|
const isMobile = useIsMobile();
|
|
169
169
|
|
|
170
|
+
// if no receiver address is set - wallet must be connected because the user's wallet is the receiver
|
|
171
|
+
const showConnectButton = !props.receiverAddress && !activeWalletInfo;
|
|
172
|
+
|
|
170
173
|
return (
|
|
171
174
|
<WithHeader
|
|
172
175
|
client={props.client}
|
|
@@ -283,7 +286,20 @@ export function FundWallet(props: FundWalletProps) {
|
|
|
283
286
|
)}
|
|
284
287
|
|
|
285
288
|
{/* Continue Button */}
|
|
286
|
-
{
|
|
289
|
+
{showConnectButton ? (
|
|
290
|
+
<ConnectButton
|
|
291
|
+
client={props.client}
|
|
292
|
+
connectButton={{
|
|
293
|
+
label: props.buttonLabel || actionLabel,
|
|
294
|
+
style: {
|
|
295
|
+
width: "100%",
|
|
296
|
+
borderRadius: radius.full,
|
|
297
|
+
},
|
|
298
|
+
}}
|
|
299
|
+
theme={theme}
|
|
300
|
+
{...props.connectOptions}
|
|
301
|
+
/>
|
|
302
|
+
) : (
|
|
287
303
|
<Button
|
|
288
304
|
disabled={!receiver}
|
|
289
305
|
fullWidth
|
|
@@ -316,19 +332,6 @@ export function FundWallet(props: FundWalletProps) {
|
|
|
316
332
|
>
|
|
317
333
|
{props.buttonLabel || actionLabel}
|
|
318
334
|
</Button>
|
|
319
|
-
) : (
|
|
320
|
-
<ConnectButton
|
|
321
|
-
client={props.client}
|
|
322
|
-
connectButton={{
|
|
323
|
-
label: props.buttonLabel || actionLabel,
|
|
324
|
-
style: {
|
|
325
|
-
width: "100%",
|
|
326
|
-
borderRadius: radius.full,
|
|
327
|
-
},
|
|
328
|
-
}}
|
|
329
|
-
theme={theme}
|
|
330
|
-
{...props.connectOptions}
|
|
331
|
-
/>
|
|
332
335
|
)}
|
|
333
336
|
|
|
334
337
|
{props.showThirdwebBranding ? (
|
|
@@ -5,7 +5,6 @@ import type { SupportedFiatCurrency } from "../../../../../pay/convert/type.js";
|
|
|
5
5
|
import { checksumAddress } from "../../../../../utils/address.js";
|
|
6
6
|
import { formatNumber } from "../../../../../utils/formatNumber.js";
|
|
7
7
|
import { toTokens } from "../../../../../utils/units.js";
|
|
8
|
-
import { useCustomTheme } from "../../../../core/design-system/CustomThemeProvider.js";
|
|
9
8
|
import {
|
|
10
9
|
iconSize,
|
|
11
10
|
radius,
|
|
@@ -62,8 +61,6 @@ export function FiatProviderSelection({
|
|
|
62
61
|
currency,
|
|
63
62
|
country,
|
|
64
63
|
}: FiatProviderSelectionProps) {
|
|
65
|
-
const theme = useCustomTheme();
|
|
66
|
-
|
|
67
64
|
// Fetch quotes for all providers
|
|
68
65
|
const quoteQueries = useBuyWithFiatQuotesForProviders({
|
|
69
66
|
amount: toAmount || "0",
|
|
@@ -122,9 +119,9 @@ export function FiatProviderSelection({
|
|
|
122
119
|
fullWidth
|
|
123
120
|
onClick={() => onProviderSelected(provider.id)}
|
|
124
121
|
style={{
|
|
125
|
-
|
|
126
|
-
borderRadius: radius.md,
|
|
122
|
+
borderRadius: radius.lg,
|
|
127
123
|
textAlign: "left",
|
|
124
|
+
padding: `${spacing.md}`,
|
|
128
125
|
}}
|
|
129
126
|
variant="secondary"
|
|
130
127
|
>
|
|
@@ -269,7 +269,7 @@ export function PaymentSelection({
|
|
|
269
269
|
}
|
|
270
270
|
|
|
271
271
|
return (
|
|
272
|
-
<Container flex="column" px="md"
|
|
272
|
+
<Container flex="column" px="md" pt="md+">
|
|
273
273
|
<ModalHeader onBack={getBackHandler()} title={getStepTitle()} />
|
|
274
274
|
<Spacer y="lg" />
|
|
275
275
|
|
|
@@ -61,10 +61,8 @@ function PaymentMethodTokenRow({
|
|
|
61
61
|
onClick={() => onPaymentMethodSelected(paymentMethod)}
|
|
62
62
|
style={{
|
|
63
63
|
backgroundColor: theme.colors.tertiaryBg,
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
opacity: hasEnoughBalance ? 1 : 0.5,
|
|
67
|
-
padding: `${spacing.sm} ${spacing.md}`,
|
|
64
|
+
borderRadius: radius.lg,
|
|
65
|
+
padding: `${spacing.md} ${spacing.md}`,
|
|
68
66
|
textAlign: "left",
|
|
69
67
|
}}
|
|
70
68
|
variant="secondary"
|
|
@@ -134,71 +132,74 @@ export function TokenSelection({
|
|
|
134
132
|
|
|
135
133
|
if (paymentMethodsLoading) {
|
|
136
134
|
return (
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
135
|
+
<Container
|
|
136
|
+
flex="column"
|
|
137
|
+
gap="xs"
|
|
138
|
+
pb="lg"
|
|
139
|
+
style={{
|
|
140
|
+
maxHeight: "400px",
|
|
141
|
+
overflowY: "auto",
|
|
142
|
+
scrollbarWidth: "none",
|
|
143
|
+
}}
|
|
144
|
+
>
|
|
145
|
+
{/* Skeleton rows matching PaymentMethodTokenRow structure */}
|
|
146
|
+
{new Array(10).fill(0).map((_, i) => (
|
|
147
|
+
<Container
|
|
148
|
+
// biome-ignore lint/suspicious/noArrayIndexKey: ok
|
|
149
|
+
key={i}
|
|
150
|
+
style={{
|
|
151
|
+
backgroundColor: theme.colors.tertiaryBg,
|
|
152
|
+
borderRadius: radius.lg,
|
|
153
|
+
padding: `${spacing.md} ${spacing.md}`,
|
|
154
|
+
}}
|
|
155
|
+
>
|
|
145
156
|
<Container
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
border: `1px solid ${theme.colors.borderColor}`,
|
|
150
|
-
borderRadius: radius.md,
|
|
151
|
-
padding: `${spacing.sm} ${spacing.md}`,
|
|
152
|
-
}}
|
|
157
|
+
flex="row"
|
|
158
|
+
gap="md"
|
|
159
|
+
style={{ alignItems: "center", width: "100%" }}
|
|
153
160
|
>
|
|
161
|
+
{/* Left side: Token icon and name skeleton */}
|
|
154
162
|
<Container
|
|
163
|
+
center="y"
|
|
155
164
|
flex="row"
|
|
156
|
-
gap="
|
|
157
|
-
style={{
|
|
165
|
+
gap="sm"
|
|
166
|
+
style={{ maxWidth: "50%" }}
|
|
158
167
|
>
|
|
159
|
-
{/*
|
|
160
|
-
<
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
}}
|
|
174
|
-
/>
|
|
175
|
-
<Container flex="column" gap="3xs">
|
|
176
|
-
{/* Token name skeleton */}
|
|
177
|
-
<Skeleton height="14px" width="60px" />
|
|
178
|
-
{/* Chain name skeleton */}
|
|
179
|
-
<Skeleton height="12px" width="40px" />
|
|
180
|
-
</Container>
|
|
168
|
+
{/* Token icon skeleton */}
|
|
169
|
+
<div
|
|
170
|
+
style={{
|
|
171
|
+
backgroundColor: theme.colors.skeletonBg,
|
|
172
|
+
borderRadius: "50%",
|
|
173
|
+
height: "32px",
|
|
174
|
+
width: "32px",
|
|
175
|
+
}}
|
|
176
|
+
/>
|
|
177
|
+
<Container flex="column" gap="3xs">
|
|
178
|
+
{/* Token name skeleton */}
|
|
179
|
+
<Skeleton height="14px" width="60px" />
|
|
180
|
+
{/* Chain name skeleton */}
|
|
181
|
+
<Skeleton height="12px" width="40px" />
|
|
181
182
|
</Container>
|
|
183
|
+
</Container>
|
|
182
184
|
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
</Container>
|
|
185
|
+
{/* Right side: Price and balance skeleton */}
|
|
186
|
+
<Container
|
|
187
|
+
flex="column"
|
|
188
|
+
gap="3xs"
|
|
189
|
+
style={{ alignItems: "flex-end", flex: 1 }}
|
|
190
|
+
>
|
|
191
|
+
{/* Price amount skeleton */}
|
|
192
|
+
<Skeleton height="16px" width="80px" />
|
|
193
|
+
{/* Balance skeleton */}
|
|
194
|
+
<Container flex="row" gap="3xs">
|
|
195
|
+
<Skeleton height="12px" width="50px" />
|
|
196
|
+
<Skeleton height="12px" width="40px" />
|
|
196
197
|
</Container>
|
|
197
198
|
</Container>
|
|
198
199
|
</Container>
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
200
|
+
</Container>
|
|
201
|
+
))}
|
|
202
|
+
</Container>
|
|
202
203
|
);
|
|
203
204
|
}
|
|
204
205
|
|
|
@@ -221,35 +222,30 @@ export function TokenSelection({
|
|
|
221
222
|
}
|
|
222
223
|
|
|
223
224
|
return (
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
currency={currency}
|
|
250
|
-
/>
|
|
251
|
-
))}
|
|
252
|
-
</Container>
|
|
253
|
-
</>
|
|
225
|
+
<Container
|
|
226
|
+
flex="column"
|
|
227
|
+
gap="xs"
|
|
228
|
+
pb="lg"
|
|
229
|
+
style={{
|
|
230
|
+
maxHeight: "400px",
|
|
231
|
+
overflowY: "auto",
|
|
232
|
+
scrollbarWidth: "none",
|
|
233
|
+
}}
|
|
234
|
+
>
|
|
235
|
+
{paymentMethods
|
|
236
|
+
.filter((method) => method.type === "wallet")
|
|
237
|
+
.map((method) => (
|
|
238
|
+
<PaymentMethodTokenRow
|
|
239
|
+
client={client}
|
|
240
|
+
destinationAmount={destinationAmount}
|
|
241
|
+
destinationToken={destinationToken}
|
|
242
|
+
feePayer={feePayer}
|
|
243
|
+
key={`${method.originToken.address}-${method.originToken.chainId}`}
|
|
244
|
+
onPaymentMethodSelected={onPaymentMethodSelected}
|
|
245
|
+
paymentMethod={method}
|
|
246
|
+
currency={currency}
|
|
247
|
+
/>
|
|
248
|
+
))}
|
|
249
|
+
</Container>
|
|
254
250
|
);
|
|
255
251
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { PlusIcon } from "@radix-ui/react-icons";
|
|
3
3
|
import type { ThirdwebClient } from "../../../../../client/client.js";
|
|
4
4
|
import type { Wallet } from "../../../../../wallets/interfaces/wallet.js";
|
|
5
5
|
import { useCustomTheme } from "../../../../core/design-system/CustomThemeProvider.js";
|
|
@@ -12,7 +12,6 @@ import { CreditCardIcon } from "../../ConnectWallet/icons/CreditCardIcon.js";
|
|
|
12
12
|
import { WalletRow } from "../../ConnectWallet/screens/Buy/swap/WalletRow.js";
|
|
13
13
|
import { Container } from "../../components/basic.js";
|
|
14
14
|
import { Button } from "../../components/buttons.js";
|
|
15
|
-
import { Spacer } from "../../components/Spacer.js";
|
|
16
15
|
import { Text } from "../../components/text.js";
|
|
17
16
|
|
|
18
17
|
interface WalletFiatSelectionProps {
|
|
@@ -35,56 +34,39 @@ export function WalletFiatSelection({
|
|
|
35
34
|
const theme = useCustomTheme();
|
|
36
35
|
|
|
37
36
|
return (
|
|
38
|
-
|
|
37
|
+
<Container flex="column" gap="xs">
|
|
39
38
|
{paymentMethods.includes("crypto") && (
|
|
40
39
|
<>
|
|
41
|
-
{paymentMethods.length > 1 && (
|
|
42
|
-
<>
|
|
43
|
-
<Text color="primaryText" size="sm" weight={500}>
|
|
44
|
-
Pay with Crypto
|
|
45
|
-
</Text>
|
|
46
|
-
<Spacer y="sm" />
|
|
47
|
-
</>
|
|
48
|
-
)}
|
|
49
|
-
|
|
50
40
|
{/* Connected Wallets */}
|
|
51
41
|
{connectedWallets.length > 0 && (
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
style={{ height: iconSize.md, width: iconSize.md }}
|
|
81
|
-
/>
|
|
82
|
-
</Button>
|
|
83
|
-
);
|
|
84
|
-
})}
|
|
85
|
-
</Container>
|
|
86
|
-
<Spacer y="sm" />
|
|
87
|
-
</>
|
|
42
|
+
<Container flex="column" gap="sm">
|
|
43
|
+
{connectedWallets.map((wallet) => {
|
|
44
|
+
const account = wallet.getAccount();
|
|
45
|
+
if (!account?.address) {
|
|
46
|
+
return null;
|
|
47
|
+
}
|
|
48
|
+
return (
|
|
49
|
+
<Button
|
|
50
|
+
fullWidth
|
|
51
|
+
key={`${wallet.id}-${account.address}`}
|
|
52
|
+
onClick={() => onWalletSelected(wallet)}
|
|
53
|
+
style={{
|
|
54
|
+
borderRadius: radius.md,
|
|
55
|
+
justifyContent: "space-between",
|
|
56
|
+
padding: `${spacing.md} ${spacing.md}`,
|
|
57
|
+
}}
|
|
58
|
+
variant="secondary"
|
|
59
|
+
>
|
|
60
|
+
<WalletRow
|
|
61
|
+
address={account?.address}
|
|
62
|
+
client={client}
|
|
63
|
+
iconSize="lg"
|
|
64
|
+
textSize="sm"
|
|
65
|
+
/>
|
|
66
|
+
</Button>
|
|
67
|
+
);
|
|
68
|
+
})}
|
|
69
|
+
</Container>
|
|
88
70
|
)}
|
|
89
71
|
|
|
90
72
|
{/* Connect Another Wallet */}
|
|
@@ -92,11 +74,9 @@ export function WalletFiatSelection({
|
|
|
92
74
|
fullWidth
|
|
93
75
|
onClick={onConnectWallet}
|
|
94
76
|
style={{
|
|
95
|
-
backgroundColor: theme.colors.tertiaryBg,
|
|
96
|
-
border: `1px solid ${theme.colors.borderColor}`,
|
|
97
77
|
borderRadius: radius.md,
|
|
98
78
|
height: "auto",
|
|
99
|
-
padding: `${spacing.
|
|
79
|
+
padding: `${spacing.md} ${spacing.md}`,
|
|
100
80
|
textAlign: "left",
|
|
101
81
|
}}
|
|
102
82
|
variant="secondary"
|
|
@@ -109,23 +89,22 @@ export function WalletFiatSelection({
|
|
|
109
89
|
<Container
|
|
110
90
|
style={{
|
|
111
91
|
alignItems: "center",
|
|
112
|
-
border: `1px dashed ${theme.colors.
|
|
113
|
-
borderRadius: radius.
|
|
92
|
+
border: `1px dashed ${theme.colors.secondaryText}`,
|
|
93
|
+
borderRadius: radius.full,
|
|
114
94
|
display: "flex",
|
|
115
|
-
height: iconSize.lg
|
|
95
|
+
height: `${iconSize.lg}px`,
|
|
116
96
|
justifyContent: "center",
|
|
117
|
-
|
|
118
|
-
width: iconSize.lg,
|
|
97
|
+
width: `${iconSize.lg}px`,
|
|
119
98
|
}}
|
|
120
99
|
>
|
|
121
100
|
<PlusIcon
|
|
122
101
|
color={theme.colors.secondaryText}
|
|
123
|
-
height={iconSize
|
|
124
|
-
width={iconSize
|
|
102
|
+
height={iconSize["sm+"]}
|
|
103
|
+
width={iconSize["sm+"]}
|
|
125
104
|
/>
|
|
126
105
|
</Container>
|
|
127
106
|
<Container flex="column" gap="3xs" style={{ flex: 1 }}>
|
|
128
|
-
<Text color="primaryText" size="sm"
|
|
107
|
+
<Text color="primaryText" size="sm">
|
|
129
108
|
Connect a Wallet
|
|
130
109
|
</Text>
|
|
131
110
|
<Text color="secondaryText" size="xs">
|
|
@@ -138,49 +117,37 @@ export function WalletFiatSelection({
|
|
|
138
117
|
)}
|
|
139
118
|
|
|
140
119
|
{paymentMethods.includes("card") && (
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
borderRadius: radius.md,
|
|
157
|
-
height: "auto",
|
|
158
|
-
padding: `${spacing.sm} ${spacing.md}`,
|
|
159
|
-
textAlign: "left",
|
|
160
|
-
}}
|
|
161
|
-
variant="secondary"
|
|
120
|
+
<Button
|
|
121
|
+
fullWidth
|
|
122
|
+
onClick={onFiatSelected}
|
|
123
|
+
style={{
|
|
124
|
+
borderRadius: radius.md,
|
|
125
|
+
height: "auto",
|
|
126
|
+
padding: `${spacing.md} ${spacing.md}`,
|
|
127
|
+
textAlign: "left",
|
|
128
|
+
}}
|
|
129
|
+
variant="secondary"
|
|
130
|
+
>
|
|
131
|
+
<Container
|
|
132
|
+
flex="row"
|
|
133
|
+
gap="md"
|
|
134
|
+
style={{ alignItems: "center", width: "100%" }}
|
|
162
135
|
>
|
|
163
|
-
<
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
>
|
|
168
|
-
<
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
Pay with Card
|
|
175
|
-
</Text>
|
|
176
|
-
<Text color="secondaryText" size="xs">
|
|
177
|
-
Onramp and pay in one step
|
|
178
|
-
</Text>
|
|
179
|
-
</Container>
|
|
136
|
+
<CreditCardIcon
|
|
137
|
+
color={theme.colors.secondaryText}
|
|
138
|
+
size={iconSize.lg}
|
|
139
|
+
/>
|
|
140
|
+
<Container flex="column" gap="3xs" style={{ flex: 1 }}>
|
|
141
|
+
<Text color="primaryText" size="sm">
|
|
142
|
+
Pay with Card
|
|
143
|
+
</Text>
|
|
144
|
+
<Text color="secondaryText" size="xs">
|
|
145
|
+
Onramp and pay in one step
|
|
146
|
+
</Text>
|
|
180
147
|
</Container>
|
|
181
|
-
</
|
|
182
|
-
|
|
148
|
+
</Container>
|
|
149
|
+
</Button>
|
|
183
150
|
)}
|
|
184
|
-
|
|
151
|
+
</Container>
|
|
185
152
|
);
|
|
186
153
|
}
|
|
@@ -320,7 +320,7 @@ const WalletSelectorInner: React.FC<WalletSelectorProps> = (props) => {
|
|
|
320
320
|
bottomSection = (
|
|
321
321
|
<>
|
|
322
322
|
<Line />
|
|
323
|
-
<Container flex="column" gap="md"
|
|
323
|
+
<Container flex="column" gap="md" px="lg" py="md+">
|
|
324
324
|
{newToWallets}
|
|
325
325
|
{continueAsGuest}
|
|
326
326
|
</Container>
|
|
@@ -705,7 +705,7 @@ const ShowAllWalletsIcon = /* @__PURE__ */ StyledDiv(() => {
|
|
|
705
705
|
},
|
|
706
706
|
alignItems: "center",
|
|
707
707
|
backgroundColor: theme.colors.tertiaryBg,
|
|
708
|
-
border: `
|
|
708
|
+
border: `1px solid ${theme.colors.borderColor}`,
|
|
709
709
|
borderRadius: radius.md,
|
|
710
710
|
display: "grid",
|
|
711
711
|
gap: spacing["4xs"],
|
|
@@ -52,7 +52,7 @@ export function ReceiveFunds(props: {
|
|
|
52
52
|
)
|
|
53
53
|
}
|
|
54
54
|
qrCodeUri={address}
|
|
55
|
-
size={
|
|
55
|
+
size={350}
|
|
56
56
|
/>
|
|
57
57
|
</Container>
|
|
58
58
|
<Spacer y="xl" />
|
|
@@ -62,7 +62,7 @@ export function ReceiveFunds(props: {
|
|
|
62
62
|
className="tw-copy-address-button"
|
|
63
63
|
>
|
|
64
64
|
<Text color="primaryText" size="md">
|
|
65
|
-
{shortenString(address || "")}
|
|
65
|
+
{shortenString(address || "", false)}
|
|
66
66
|
</Text>
|
|
67
67
|
<CopyIcon
|
|
68
68
|
hasCopied={hasCopied}
|
|
@@ -76,6 +76,7 @@ export function ReceiveFunds(props: {
|
|
|
76
76
|
<Text
|
|
77
77
|
balance
|
|
78
78
|
center
|
|
79
|
+
size="sm"
|
|
79
80
|
className="receive_fund_screen_instruction"
|
|
80
81
|
multiline
|
|
81
82
|
>
|
|
@@ -10,9 +10,10 @@ export const ModalTitle = /* @__PURE__ */ StyledH2((_) => {
|
|
|
10
10
|
return {
|
|
11
11
|
color: theme.colors.primaryText,
|
|
12
12
|
fontSize: fontSize.lg,
|
|
13
|
-
fontWeight:
|
|
13
|
+
fontWeight: 500,
|
|
14
14
|
lineHeight: 1.3,
|
|
15
15
|
margin: 0,
|
|
16
|
+
letterSpacing: "-0.025em",
|
|
16
17
|
textAlign: "left",
|
|
17
18
|
};
|
|
18
19
|
});
|