@@ -3,7 +3,6 @@ import { getCachedChain } from "../../../../../../../chains/utils.js";
3
3
import type { ThirdwebClient } from "../../../../../../../client/client.js" ;
4
4
import type { BuyWithCryptoQuote } from "../../../../../../../pay/buyWithCrypto/getQuote.js" ;
5
5
import type { ValidBuyWithCryptoStatus } from "../../../../../../../pay/buyWithCrypto/getStatus.js" ;
6
- import { shortenAddress } from "../../../../../../../utils/address.js" ;
7
6
import { formatExplorerTxUrl } from "../../../../../../../utils/url.js" ;
8
7
import {
9
8
fontSize ,
@@ -19,7 +18,7 @@ import { Spacer } from "../../../../components/Spacer.js";
19
18
import { Container , Line , ModalHeader } from "../../../../components/basic.js" ;
20
19
import { ButtonLink } from "../../../../components/buttons.js" ;
21
20
import { Text } from "../../../../components/text.js" ;
22
- import { formatSeconds } from "../swap/formatSeconds .js" ;
21
+ import { WalletRow } from "../swap/WalletRow .js" ;
23
22
import { TokenInfoRow } from "./TokenInfoRow.js" ;
24
23
import { type StatusMeta , getBuyWithCryptoStatusMeta } from "./statusMeta.js" ;
25
24
@@ -174,7 +173,6 @@ export function SwapTxDetailsTable(
174
173
destinationTxHash,
175
174
isPartialSuccess,
176
175
gotToken,
177
- estimatedDuration,
178
176
} = uiData ;
179
177
180
178
const fromChainId = fromToken . chainId ;
@@ -222,6 +220,17 @@ export function SwapTxDetailsTable(
222
220
223
221
return (
224
222
< div >
223
+ { /* Pay */ }
224
+ < TokenInfoRow
225
+ chainId = { fromToken . chainId }
226
+ client = { client }
227
+ label = "Paid"
228
+ tokenAmount = { fromToken . amount }
229
+ tokenSymbol = { fromToken . symbol || "" }
230
+ tokenAddress = { fromToken . address }
231
+ />
232
+
233
+ { lineSpacer }
225
234
{ isPartialSuccess && gotToken ? (
226
235
// Expected + Got
227
236
< >
@@ -252,83 +261,54 @@ export function SwapTxDetailsTable(
252
261
< TokenInfoRow
253
262
chainId = { toToken . chainId }
254
263
client = { client }
255
- label = "Receive "
264
+ label = "Received "
256
265
tokenAmount = { toToken . amount }
257
266
tokenSymbol = { toToken . symbol || "" }
258
267
tokenAddress = { toToken . address }
259
268
/>
260
269
) }
261
270
262
- { lineSpacer }
263
-
264
- { /* Pay */ }
265
- < TokenInfoRow
266
- chainId = { fromToken . chainId }
267
- client = { client }
268
- label = "Pay"
269
- tokenAmount = { fromToken . amount }
270
- tokenSymbol = { fromToken . symbol || "" }
271
- tokenAddress = { fromToken . address }
272
- />
273
-
274
- { lineSpacer }
275
-
276
- { /* Duration */ }
277
- < Container
278
- flex = "row"
279
- center = "y"
280
- style = { {
281
- justifyContent : "space-between" ,
282
- } }
283
- >
284
- < Text > Time </ Text >
285
- < Container flex = "row" gap = "xs" center = "y" >
286
- < Text color = "primaryText" >
287
- ~{ formatSeconds ( estimatedDuration || 0 ) }
288
- </ Text >
271
+ < >
272
+ { lineSpacer }
273
+ < Container
274
+ flex = "row"
275
+ style = { {
276
+ justifyContent : "space-between" ,
277
+ } }
278
+ >
279
+ < Text size = "sm" > Recipient</ Text >
280
+ < WalletRow address = { uiData . toAddress } iconSize = "sm" client = { client } />
289
281
</ Container >
290
- </ Container >
282
+ </ >
291
283
292
284
{ /* Status */ }
293
285
{ statusMeta && showStatusRow && (
294
286
< >
295
287
{ lineSpacer }
296
288
< Container
297
289
flex = "row"
298
- center = "y"
299
- style = { {
300
- justifyContent : "space-between" ,
301
- } }
302
- >
303
- < Text > Status</ Text >
304
- < Container flex = "row" gap = "xs" center = "y" >
305
- < Text color = { statusMeta . color } > { statusMeta . status } </ Text >
306
- </ Container >
307
- </ Container >
308
- </ >
309
- ) }
310
-
311
- { uiData . fromAddress . toLowerCase ( ) !== uiData . toAddress . toLowerCase ( ) && (
312
- < >
313
- { lineSpacer }
314
- < Container
315
- flex = "row"
316
- center = "y"
317
290
style = { {
318
291
justifyContent : "space-between" ,
319
292
} }
320
293
>
321
- < Text > Send to</ Text >
322
- < Container flex = "row" gap = "xs" center = "y" >
323
- < Text color = "primaryText" size = "sm" >
324
- { shortenAddress ( uiData . toAddress ) }
294
+ < Text size = "sm" > Status</ Text >
295
+ < Container
296
+ flex = "column"
297
+ gap = "3xs"
298
+ center = "y"
299
+ style = { {
300
+ alignItems : "flex-end" ,
301
+ } }
302
+ >
303
+ < Text color = { statusMeta . color } size = "sm" >
304
+ { statusMeta . status }
325
305
</ Text >
326
306
</ Container >
327
307
</ Container >
328
308
</ >
329
309
) }
330
310
331
- { lineSpacer }
311
+ < Spacer y = "lg" />
332
312
333
313
{ /* source chain Tx hash link */ }
334
314
{ fromChainExplorers . explorers ?. [ 0 ] ?. url && sourceTxHash && (
0 commit comments