thirdweb 5.111.9 → 5.111.10
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/cli/commands/stylus/create.js +48 -0
- package/dist/cjs/cli/commands/stylus/create.js.map +1 -1
- package/dist/cjs/extensions/modules/common/installPublishedModule.js +26 -9
- package/dist/cjs/extensions/modules/common/installPublishedModule.js.map +1 -1
- package/dist/cjs/extensions/prebuilts/deploy-published.js +1 -1
- package/dist/cjs/extensions/prebuilts/deploy-published.js.map +1 -1
- package/dist/cjs/react/web/ui/Bridge/TransactionPayment.js +1 -1
- package/dist/cjs/react/web/ui/Bridge/common/TokenAndChain.js +1 -1
- package/dist/cjs/react/web/ui/Bridge/common/TokenBalanceRow.js +2 -2
- package/dist/cjs/react/web/ui/Bridge/common/TokenBalanceRow.js.map +1 -1
- package/dist/cjs/react/web/ui/Bridge/common/selected-token-button.js +7 -2
- package/dist/cjs/react/web/ui/Bridge/common/selected-token-button.js.map +1 -1
- package/dist/cjs/react/web/ui/Bridge/payment-details/PaymentOverview.js +5 -5
- package/dist/cjs/react/web/ui/Bridge/payment-details/PaymentOverview.js.map +1 -1
- package/dist/cjs/react/web/ui/Bridge/payment-selection/TokenSelection.js +1 -1
- package/dist/cjs/react/web/ui/Bridge/payment-success/PaymentReceipt.js +20 -44
- package/dist/cjs/react/web/ui/Bridge/payment-success/PaymentReceipt.js.map +1 -1
- package/dist/cjs/react/web/ui/Bridge/payment-success/SuccessScreen.js +3 -3
- package/dist/cjs/react/web/ui/Bridge/payment-success/SuccessScreen.js.map +1 -1
- package/dist/cjs/react/web/ui/Bridge/swap-widget/select-chain.js +10 -2
- package/dist/cjs/react/web/ui/Bridge/swap-widget/select-chain.js.map +1 -1
- package/dist/cjs/react/web/ui/Bridge/swap-widget/select-token-ui.js +94 -48
- package/dist/cjs/react/web/ui/Bridge/swap-widget/select-token-ui.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/swap/WalletRow.js +2 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/swap/WalletRow.js.map +1 -1
- package/dist/cjs/react/web/ui/components/CopyIcon.js +6 -8
- package/dist/cjs/react/web/ui/components/CopyIcon.js.map +1 -1
- package/dist/cjs/react/web/ui/components/Spacer.js +1 -0
- package/dist/cjs/react/web/ui/components/Spacer.js.map +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/cjs/version.js.map +1 -1
- package/dist/esm/cli/commands/stylus/create.js +48 -0
- package/dist/esm/cli/commands/stylus/create.js.map +1 -1
- package/dist/esm/extensions/modules/common/installPublishedModule.js +26 -9
- package/dist/esm/extensions/modules/common/installPublishedModule.js.map +1 -1
- package/dist/esm/extensions/prebuilts/deploy-published.js +1 -1
- package/dist/esm/extensions/prebuilts/deploy-published.js.map +1 -1
- package/dist/esm/react/web/ui/Bridge/TransactionPayment.js +1 -1
- package/dist/esm/react/web/ui/Bridge/common/TokenAndChain.js +1 -1
- package/dist/esm/react/web/ui/Bridge/common/TokenBalanceRow.js +2 -2
- package/dist/esm/react/web/ui/Bridge/common/TokenBalanceRow.js.map +1 -1
- package/dist/esm/react/web/ui/Bridge/common/selected-token-button.js +7 -2
- package/dist/esm/react/web/ui/Bridge/common/selected-token-button.js.map +1 -1
- package/dist/esm/react/web/ui/Bridge/payment-details/PaymentOverview.js +5 -5
- package/dist/esm/react/web/ui/Bridge/payment-details/PaymentOverview.js.map +1 -1
- package/dist/esm/react/web/ui/Bridge/payment-selection/TokenSelection.js +1 -1
- package/dist/esm/react/web/ui/Bridge/payment-success/PaymentReceipt.js +23 -47
- package/dist/esm/react/web/ui/Bridge/payment-success/PaymentReceipt.js.map +1 -1
- package/dist/esm/react/web/ui/Bridge/payment-success/SuccessScreen.js +4 -4
- package/dist/esm/react/web/ui/Bridge/payment-success/SuccessScreen.js.map +1 -1
- package/dist/esm/react/web/ui/Bridge/swap-widget/select-chain.js +10 -2
- package/dist/esm/react/web/ui/Bridge/swap-widget/select-chain.js.map +1 -1
- package/dist/esm/react/web/ui/Bridge/swap-widget/select-token-ui.js +95 -49
- package/dist/esm/react/web/ui/Bridge/swap-widget/select-token-ui.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/swap/WalletRow.js +2 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/swap/WalletRow.js.map +1 -1
- package/dist/esm/react/web/ui/components/CopyIcon.js +6 -8
- package/dist/esm/react/web/ui/components/CopyIcon.js.map +1 -1
- package/dist/esm/react/web/ui/components/Spacer.js +1 -0
- package/dist/esm/react/web/ui/components/Spacer.js.map +1 -1
- package/dist/esm/version.js +1 -1
- package/dist/esm/version.js.map +1 -1
- package/dist/scripts/bridge-widget.js +100 -100
- package/dist/types/cli/commands/stylus/create.d.ts.map +1 -1
- package/dist/types/extensions/modules/common/installPublishedModule.d.ts.map +1 -1
- package/dist/types/react/web/ui/Bridge/common/TokenBalanceRow.d.ts.map +1 -1
- package/dist/types/react/web/ui/Bridge/common/selected-token-button.d.ts.map +1 -1
- package/dist/types/react/web/ui/Bridge/payment-details/PaymentOverview.d.ts.map +1 -1
- package/dist/types/react/web/ui/Bridge/payment-success/PaymentReceipt.d.ts.map +1 -1
- package/dist/types/react/web/ui/Bridge/payment-success/SuccessScreen.d.ts.map +1 -1
- package/dist/types/react/web/ui/Bridge/swap-widget/select-chain.d.ts.map +1 -1
- package/dist/types/react/web/ui/Bridge/swap-widget/select-token-ui.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/WalletRow.d.ts.map +1 -1
- package/dist/types/react/web/ui/components/CopyIcon.d.ts.map +1 -1
- package/dist/types/react/web/ui/components/Spacer.d.ts.map +1 -1
- package/dist/types/version.d.ts +1 -1
- package/dist/types/version.d.ts.map +1 -1
- package/package.json +8 -8
- package/src/cli/commands/stylus/create.ts +49 -0
- package/src/contract/deployment/deploy-dynamic.test.ts +35 -39
- package/src/extensions/dynamic-contracts/write/installPublishedExtension.test.ts +40 -44
- package/src/extensions/dynamic-contracts/write/uninstallExtension.test.ts +1 -2
- package/src/extensions/modules/common/installPublishedModule.ts +28 -9
- package/src/extensions/prebuilts/deploy-published.ts +1 -1
- package/src/react/web/ui/Bridge/TransactionPayment.tsx +1 -1
- package/src/react/web/ui/Bridge/common/TokenAndChain.tsx +1 -1
- package/src/react/web/ui/Bridge/common/TokenBalanceRow.tsx +11 -10
- package/src/react/web/ui/Bridge/common/selected-token-button.tsx +11 -1
- package/src/react/web/ui/Bridge/payment-details/PaymentOverview.tsx +9 -7
- package/src/react/web/ui/Bridge/payment-selection/TokenSelection.tsx +1 -1
- package/src/react/web/ui/Bridge/payment-success/PaymentReceipt.tsx +92 -115
- package/src/react/web/ui/Bridge/payment-success/SuccessScreen.tsx +4 -6
- package/src/react/web/ui/Bridge/swap-widget/select-chain.tsx +18 -3
- package/src/react/web/ui/Bridge/swap-widget/select-token-ui.tsx +186 -118
- package/src/react/web/ui/ConnectWallet/screens/Buy/swap/WalletRow.tsx +5 -3
- package/src/react/web/ui/components/CopyIcon.tsx +8 -9
- package/src/react/web/ui/components/Spacer.tsx +1 -0
- package/src/version.ts +1 -1
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { CopyIcon } from "@radix-ui/react-icons";
|
|
3
2
|
import { useQuery } from "@tanstack/react-query";
|
|
4
|
-
import { useCallback } from "react";
|
|
5
3
|
import type { Token } from "../../../../../bridge/types/Token.js";
|
|
6
4
|
import type { ChainMetadata } from "../../../../../chains/types.js";
|
|
7
5
|
import {
|
|
@@ -10,22 +8,18 @@ import {
|
|
|
10
8
|
getChainMetadata,
|
|
11
9
|
} from "../../../../../chains/utils.js";
|
|
12
10
|
import { shortenHex } from "../../../../../utils/address.js";
|
|
13
|
-
import { formatExplorerTxUrl } from "../../../../../utils/url.js";
|
|
14
11
|
import type { WindowAdapter } from "../../../../core/adapters/WindowAdapter.js";
|
|
15
12
|
import { useCustomTheme } from "../../../../core/design-system/CustomThemeProvider.js";
|
|
16
|
-
import {
|
|
17
|
-
iconSize,
|
|
18
|
-
radius,
|
|
19
|
-
spacing,
|
|
20
|
-
} from "../../../../core/design-system/index.js";
|
|
13
|
+
import { radius, spacing } from "../../../../core/design-system/index.js";
|
|
21
14
|
import type { BridgePrepareResult } from "../../../../core/hooks/useBridgePrepare.js";
|
|
22
15
|
import type { CompletedStatusResult } from "../../../../core/hooks/useStepExecutor.js";
|
|
23
16
|
import { formatTokenAmount } from "../../ConnectWallet/screens/formatTokenBalance.js";
|
|
24
|
-
import { Container, ModalHeader } from "../../components/basic.js";
|
|
17
|
+
import { Container, Line, ModalHeader } from "../../components/basic.js";
|
|
25
18
|
import { shorterChainName } from "../../components/ChainName.js";
|
|
19
|
+
import { CopyIcon } from "../../components/CopyIcon.js";
|
|
26
20
|
import { Skeleton } from "../../components/Skeleton.js";
|
|
27
21
|
import { Spacer } from "../../components/Spacer.js";
|
|
28
|
-
import { Text } from "../../components/text.js";
|
|
22
|
+
import { Link, Text } from "../../components/text.js";
|
|
29
23
|
|
|
30
24
|
interface TransactionInfo {
|
|
31
25
|
type: "paymentId" | "transactionHash";
|
|
@@ -128,7 +122,6 @@ interface CompletedStepDetailCardProps {
|
|
|
128
122
|
status: CompletedStatusResult;
|
|
129
123
|
preparedQuote: BridgePrepareResult;
|
|
130
124
|
windowAdapter: WindowAdapter;
|
|
131
|
-
onCopyToClipboard: (text: string) => Promise<void>;
|
|
132
125
|
}
|
|
133
126
|
|
|
134
127
|
/**
|
|
@@ -137,29 +130,12 @@ interface CompletedStepDetailCardProps {
|
|
|
137
130
|
function CompletedStepDetailCard({
|
|
138
131
|
status,
|
|
139
132
|
preparedQuote,
|
|
140
|
-
windowAdapter,
|
|
141
|
-
onCopyToClipboard,
|
|
142
133
|
}: CompletedStepDetailCardProps) {
|
|
143
134
|
const theme = useCustomTheme();
|
|
144
|
-
const { data: txInfo,
|
|
135
|
+
const { data: txInfo, isPending } = useTransactionInfo(status, preparedQuote);
|
|
145
136
|
|
|
146
|
-
if (
|
|
147
|
-
return
|
|
148
|
-
<Container
|
|
149
|
-
flex="column"
|
|
150
|
-
gap="sm"
|
|
151
|
-
style={{
|
|
152
|
-
backgroundColor: theme.colors.tertiaryBg,
|
|
153
|
-
border: `1px solid ${theme.colors.borderColor}`,
|
|
154
|
-
borderRadius: radius.sm,
|
|
155
|
-
padding: spacing.md,
|
|
156
|
-
}}
|
|
157
|
-
>
|
|
158
|
-
<Skeleton height="30px" />
|
|
159
|
-
<Skeleton height="30px" />
|
|
160
|
-
<Skeleton height="30px" />
|
|
161
|
-
</Container>
|
|
162
|
-
);
|
|
137
|
+
if (isPending) {
|
|
138
|
+
return <Skeleton height="200px" style={{ borderRadius: radius.lg }} />;
|
|
163
139
|
}
|
|
164
140
|
|
|
165
141
|
if (!txInfo) {
|
|
@@ -174,7 +150,7 @@ function CompletedStepDetailCard({
|
|
|
174
150
|
style={{
|
|
175
151
|
backgroundColor: theme.colors.tertiaryBg,
|
|
176
152
|
border: `1px solid ${theme.colors.borderColor}`,
|
|
177
|
-
borderRadius: radius.
|
|
153
|
+
borderRadius: radius.lg,
|
|
178
154
|
padding: spacing.md,
|
|
179
155
|
}}
|
|
180
156
|
>
|
|
@@ -182,27 +158,37 @@ function CompletedStepDetailCard({
|
|
|
182
158
|
<Container
|
|
183
159
|
flex="row"
|
|
184
160
|
gap="sm"
|
|
161
|
+
py="4xs"
|
|
185
162
|
style={{
|
|
186
163
|
alignItems: "center",
|
|
187
164
|
justifyContent: "space-between",
|
|
188
165
|
}}
|
|
189
166
|
>
|
|
190
|
-
<Text color="primaryText" size="sm">
|
|
167
|
+
<Text color="primaryText" size="sm" weight={500}>
|
|
191
168
|
{txInfo.label}
|
|
192
169
|
</Text>
|
|
193
170
|
<Container
|
|
194
171
|
style={{
|
|
195
|
-
backgroundColor: theme.colors.
|
|
196
|
-
borderRadius: radius.
|
|
172
|
+
backgroundColor: theme.colors.modalBg,
|
|
173
|
+
borderRadius: radius.full,
|
|
174
|
+
border: `1px solid ${theme.colors.borderColor}`,
|
|
197
175
|
padding: `${spacing["3xs"]} ${spacing.xs}`,
|
|
198
176
|
}}
|
|
199
177
|
>
|
|
200
|
-
<Text
|
|
178
|
+
<Text
|
|
179
|
+
style={{
|
|
180
|
+
color: theme.colors.success,
|
|
181
|
+
fontSize: 10,
|
|
182
|
+
letterSpacing: "0.025em",
|
|
183
|
+
}}
|
|
184
|
+
>
|
|
201
185
|
COMPLETED
|
|
202
186
|
</Text>
|
|
203
187
|
</Container>
|
|
204
188
|
</Container>
|
|
205
189
|
|
|
190
|
+
<Line />
|
|
191
|
+
|
|
206
192
|
{/* Amount Paid */}
|
|
207
193
|
{txInfo.amountPaid && (
|
|
208
194
|
<Container
|
|
@@ -219,46 +205,46 @@ function CompletedStepDetailCard({
|
|
|
219
205
|
</Container>
|
|
220
206
|
)}
|
|
221
207
|
|
|
222
|
-
{/*
|
|
223
|
-
{txInfo.
|
|
208
|
+
{/* Amount Received */}
|
|
209
|
+
{txInfo.amountReceived && (
|
|
224
210
|
<Container
|
|
225
211
|
center="y"
|
|
226
212
|
flex="row"
|
|
227
213
|
style={{ justifyContent: "space-between" }}
|
|
228
214
|
>
|
|
229
215
|
<Text color="secondaryText" size="sm">
|
|
230
|
-
|
|
216
|
+
Amount Received
|
|
231
217
|
</Text>
|
|
232
218
|
<Text color="primaryText" size="sm">
|
|
233
|
-
{
|
|
219
|
+
{txInfo.amountReceived}
|
|
234
220
|
</Text>
|
|
235
221
|
</Container>
|
|
236
222
|
)}
|
|
237
223
|
|
|
238
|
-
{/*
|
|
239
|
-
{txInfo.
|
|
224
|
+
{/* Origin Chain */}
|
|
225
|
+
{txInfo.originChain && (
|
|
240
226
|
<Container
|
|
241
227
|
center="y"
|
|
242
228
|
flex="row"
|
|
243
229
|
style={{ justifyContent: "space-between" }}
|
|
244
230
|
>
|
|
245
231
|
<Text color="secondaryText" size="sm">
|
|
246
|
-
|
|
232
|
+
Origin Chain
|
|
247
233
|
</Text>
|
|
248
234
|
<Text color="primaryText" size="sm">
|
|
249
|
-
{txInfo.
|
|
235
|
+
{shorterChainName(txInfo.originChain.name)}
|
|
250
236
|
</Text>
|
|
251
237
|
</Container>
|
|
252
238
|
)}
|
|
253
239
|
|
|
254
|
-
{/* Chain */}
|
|
240
|
+
{/* Destination Chain */}
|
|
255
241
|
<Container
|
|
256
242
|
center="y"
|
|
257
243
|
flex="row"
|
|
258
244
|
style={{ justifyContent: "space-between" }}
|
|
259
245
|
>
|
|
260
246
|
<Text color="secondaryText" size="sm">
|
|
261
|
-
Chain
|
|
247
|
+
Destination Chain
|
|
262
248
|
</Text>
|
|
263
249
|
<Text color="primaryText" size="sm">
|
|
264
250
|
{shorterChainName(txInfo.chain.name)}
|
|
@@ -266,58 +252,59 @@ function CompletedStepDetailCard({
|
|
|
266
252
|
</Container>
|
|
267
253
|
|
|
268
254
|
{/* Transaction Info */}
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
<Container flex="row" gap="sm" style={{ alignItems: "center" }}>
|
|
278
|
-
<Text
|
|
279
|
-
color="accentText"
|
|
280
|
-
onClick={
|
|
281
|
-
txInfo.type === "paymentId"
|
|
282
|
-
? () => onCopyToClipboard(txInfo.id)
|
|
283
|
-
: () => {
|
|
284
|
-
const explorer = txInfo.chain.explorers?.[0];
|
|
285
|
-
if (explorer) {
|
|
286
|
-
windowAdapter.open(
|
|
287
|
-
formatExplorerTxUrl(explorer.url, txInfo.id),
|
|
288
|
-
);
|
|
289
|
-
}
|
|
290
|
-
}
|
|
291
|
-
}
|
|
292
|
-
size="sm"
|
|
293
|
-
style={{
|
|
294
|
-
cursor: "pointer",
|
|
295
|
-
fontFamily: "monospace",
|
|
296
|
-
}}
|
|
297
|
-
>
|
|
298
|
-
{shortenHex(txInfo.id)}
|
|
255
|
+
{txInfo.type === "paymentId" && (
|
|
256
|
+
<Container
|
|
257
|
+
center="y"
|
|
258
|
+
flex="row"
|
|
259
|
+
style={{ justifyContent: "space-between" }}
|
|
260
|
+
>
|
|
261
|
+
<Text color="secondaryText" size="sm">
|
|
262
|
+
Payment ID
|
|
299
263
|
</Text>
|
|
264
|
+
<Container flex="row" gap="3xs" center="y">
|
|
265
|
+
<CopyIcon text={txInfo.id} iconSize={12} tip="Copy Payment ID" />
|
|
300
266
|
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
267
|
+
<Text color="primaryText" weight={400} size="sm">
|
|
268
|
+
{shortenHex(txInfo.id)}
|
|
269
|
+
</Text>
|
|
270
|
+
</Container>
|
|
271
|
+
</Container>
|
|
272
|
+
)}
|
|
273
|
+
|
|
274
|
+
{status.transactions.map((tx) => {
|
|
275
|
+
const explorerLink = `https://thirdweb.com/${tx.chainId}/tx/${tx.transactionHash}`;
|
|
276
|
+
return (
|
|
277
|
+
<Container
|
|
278
|
+
key={tx.transactionHash}
|
|
279
|
+
center="y"
|
|
280
|
+
flex="row"
|
|
281
|
+
style={{ justifyContent: "space-between" }}
|
|
282
|
+
>
|
|
283
|
+
<Text color="secondaryText" size="sm">
|
|
284
|
+
Transaction Hash
|
|
285
|
+
</Text>
|
|
286
|
+
<Container flex="row" gap="3xs" center="y">
|
|
312
287
|
<CopyIcon
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
288
|
+
text={tx.transactionHash}
|
|
289
|
+
iconSize={12}
|
|
290
|
+
tip="Copy Transaction Hash"
|
|
316
291
|
/>
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
292
|
+
|
|
293
|
+
<Link
|
|
294
|
+
href={explorerLink}
|
|
295
|
+
target="_blank"
|
|
296
|
+
rel="noreferrer"
|
|
297
|
+
color="primaryText"
|
|
298
|
+
hoverColor="accentText"
|
|
299
|
+
weight={400}
|
|
300
|
+
size="sm"
|
|
301
|
+
>
|
|
302
|
+
{shortenHex(tx.transactionHash)}
|
|
303
|
+
</Link>
|
|
304
|
+
</Container>
|
|
305
|
+
</Container>
|
|
306
|
+
);
|
|
307
|
+
})}
|
|
321
308
|
</Container>
|
|
322
309
|
);
|
|
323
310
|
}
|
|
@@ -350,34 +337,23 @@ export function PaymentReceipt({
|
|
|
350
337
|
onBack,
|
|
351
338
|
windowAdapter,
|
|
352
339
|
}: PaymentReceitProps) {
|
|
353
|
-
// Copy to clipboard
|
|
354
|
-
const copyToClipboard = useCallback(async (text: string) => {
|
|
355
|
-
try {
|
|
356
|
-
await navigator.clipboard.writeText(text);
|
|
357
|
-
// Could add a toast notification here
|
|
358
|
-
} catch (error) {
|
|
359
|
-
console.warn("Failed to copy to clipboard:", error);
|
|
360
|
-
}
|
|
361
|
-
}, []);
|
|
362
|
-
|
|
363
340
|
return (
|
|
364
|
-
<Container
|
|
365
|
-
|
|
366
|
-
fullHeight
|
|
367
|
-
p="md"
|
|
368
|
-
style={{ maxHeight: "500px", minHeight: "250px", overflowY: "auto" }}
|
|
369
|
-
>
|
|
341
|
+
<Container flex="column" fullHeight px="md">
|
|
342
|
+
<Spacer y="md+" />
|
|
370
343
|
<ModalHeader onBack={onBack} title="Payment Receipt" />
|
|
344
|
+
<Spacer y="md+" />
|
|
371
345
|
|
|
372
|
-
<
|
|
373
|
-
|
|
374
|
-
|
|
346
|
+
<Container
|
|
347
|
+
flex="column"
|
|
348
|
+
gap="lg"
|
|
349
|
+
scrollY
|
|
350
|
+
style={{ maxHeight: "500px", minHeight: "400px" }}
|
|
351
|
+
>
|
|
375
352
|
{/* Status Results */}
|
|
376
|
-
<Container flex="column" gap="
|
|
353
|
+
<Container flex="column" gap="sm">
|
|
377
354
|
{completedStatuses.map((status, index) => (
|
|
378
355
|
<CompletedStepDetailCard
|
|
379
356
|
key={`${status.type}-${index}`}
|
|
380
|
-
onCopyToClipboard={copyToClipboard}
|
|
381
357
|
preparedQuote={preparedQuote}
|
|
382
358
|
status={status}
|
|
383
359
|
windowAdapter={windowAdapter}
|
|
@@ -385,6 +361,7 @@ export function PaymentReceipt({
|
|
|
385
361
|
))}
|
|
386
362
|
</Container>
|
|
387
363
|
</Container>
|
|
364
|
+
<Spacer y="md+" />
|
|
388
365
|
</Container>
|
|
389
366
|
);
|
|
390
367
|
}
|
|
@@ -9,7 +9,7 @@ import { useCustomTheme } from "../../../../core/design-system/CustomThemeProvid
|
|
|
9
9
|
import { iconSize, spacing } from "../../../../core/design-system/index.js";
|
|
10
10
|
import type { BridgePrepareResult } from "../../../../core/hooks/useBridgePrepare.js";
|
|
11
11
|
import type { CompletedStatusResult } from "../../../../core/hooks/useStepExecutor.js";
|
|
12
|
-
import { Container
|
|
12
|
+
import { Container } from "../../components/basic.js";
|
|
13
13
|
import { Button } from "../../components/buttons.js";
|
|
14
14
|
import { Spacer } from "../../components/Spacer.js";
|
|
15
15
|
import { Text } from "../../components/text.js";
|
|
@@ -91,9 +91,7 @@ export function SuccessScreen({
|
|
|
91
91
|
|
|
92
92
|
return (
|
|
93
93
|
<Container flex="column" fullHeight px="md" pb="md" pt="md+">
|
|
94
|
-
<
|
|
95
|
-
|
|
96
|
-
<Spacer y="xxl" />
|
|
94
|
+
<Spacer y="3xl" />
|
|
97
95
|
|
|
98
96
|
<Container center="x" flex="column" gap="md">
|
|
99
97
|
{/* Success Icon with Animation */}
|
|
@@ -130,7 +128,7 @@ export function SuccessScreen({
|
|
|
130
128
|
marginBottom: spacing.xxs,
|
|
131
129
|
}}
|
|
132
130
|
>
|
|
133
|
-
Payment Successful
|
|
131
|
+
Payment Successful
|
|
134
132
|
</Text>
|
|
135
133
|
|
|
136
134
|
<Text center color="secondaryText" size="sm">
|
|
@@ -143,7 +141,7 @@ export function SuccessScreen({
|
|
|
143
141
|
</div>
|
|
144
142
|
</Container>
|
|
145
143
|
|
|
146
|
-
<Spacer y="
|
|
144
|
+
<Spacer y="3xl" />
|
|
147
145
|
|
|
148
146
|
{/* Action Buttons */}
|
|
149
147
|
<Container flex="column" gap="sm" style={{ width: "100%" }}>
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { useMemo, useState } from "react";
|
|
2
2
|
import type { Chain as BridgeChain } from "../../../../../bridge/index.js";
|
|
3
3
|
import type { ThirdwebClient } from "../../../../../client/client.js";
|
|
4
|
+
import { useCustomTheme } from "../../../../core/design-system/CustomThemeProvider.js";
|
|
4
5
|
import {
|
|
5
6
|
fontSize,
|
|
6
7
|
iconSize,
|
|
@@ -170,6 +171,8 @@ function ChainButton(props: {
|
|
|
170
171
|
isSelected: boolean;
|
|
171
172
|
isMobile: boolean;
|
|
172
173
|
}) {
|
|
174
|
+
const theme = useCustomTheme();
|
|
175
|
+
const iconSizeValue = props.isMobile ? iconSize.lg : iconSize.md;
|
|
173
176
|
return (
|
|
174
177
|
<Button
|
|
175
178
|
variant={props.isSelected ? "secondary" : "ghost-solid"}
|
|
@@ -185,13 +188,25 @@ function ChainButton(props: {
|
|
|
185
188
|
gap="sm"
|
|
186
189
|
>
|
|
187
190
|
<Img
|
|
188
|
-
src={props.chain.icon}
|
|
191
|
+
src={props.chain.icon || ""}
|
|
189
192
|
client={props.client}
|
|
190
|
-
width={
|
|
191
|
-
height={
|
|
193
|
+
width={iconSizeValue}
|
|
194
|
+
height={iconSizeValue}
|
|
192
195
|
style={{
|
|
193
196
|
borderRadius: radius.full,
|
|
194
197
|
}}
|
|
198
|
+
fallback={
|
|
199
|
+
<Container color="secondaryText">
|
|
200
|
+
<Container
|
|
201
|
+
style={{
|
|
202
|
+
background: `linear-gradient(45deg, white, ${theme.colors.accentText})`,
|
|
203
|
+
borderRadius: radius.full,
|
|
204
|
+
width: `${iconSizeValue}px`,
|
|
205
|
+
height: `${iconSizeValue}px`,
|
|
206
|
+
}}
|
|
207
|
+
/>
|
|
208
|
+
</Container>
|
|
209
|
+
}
|
|
195
210
|
/>
|
|
196
211
|
{cleanedChainName(props.chain.name)}
|
|
197
212
|
</Button>
|