@@ -3,7 +3,6 @@ import { getCachedChain } from "../../../../../../../chains/utils.js";
33import type { ThirdwebClient } from "../../../../../../../client/client.js" ;
44import type { BuyWithCryptoQuote } from "../../../../../../../pay/buyWithCrypto/getQuote.js" ;
55import type { ValidBuyWithCryptoStatus } from "../../../../../../../pay/buyWithCrypto/getStatus.js" ;
6- import { shortenAddress } from "../../../../../../../utils/address.js" ;
76import { formatExplorerTxUrl } from "../../../../../../../utils/url.js" ;
87import {
98 fontSize ,
@@ -19,7 +18,7 @@ import { Spacer } from "../../../../components/Spacer.js";
1918import { Container , Line , ModalHeader } from "../../../../components/basic.js" ;
2019import { ButtonLink } from "../../../../components/buttons.js" ;
2120import { Text } from "../../../../components/text.js" ;
22- import { formatSeconds } from "../swap/formatSeconds .js" ;
21+ import { WalletRow } from "../swap/WalletRow .js" ;
2322import { TokenInfoRow } from "./TokenInfoRow.js" ;
2423import { type StatusMeta , getBuyWithCryptoStatusMeta } from "./statusMeta.js" ;
2524
@@ -174,7 +173,6 @@ export function SwapTxDetailsTable(
174173 destinationTxHash,
175174 isPartialSuccess,
176175 gotToken,
177- estimatedDuration,
178176 } = uiData ;
179177
180178 const fromChainId = fromToken . chainId ;
@@ -222,6 +220,17 @@ export function SwapTxDetailsTable(
222220
223221 return (
224222 < 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 }
225234 { isPartialSuccess && gotToken ? (
226235 // Expected + Got
227236 < >
@@ -252,83 +261,54 @@ export function SwapTxDetailsTable(
252261 < TokenInfoRow
253262 chainId = { toToken . chainId }
254263 client = { client }
255- label = "Receive "
264+ label = "Received "
256265 tokenAmount = { toToken . amount }
257266 tokenSymbol = { toToken . symbol || "" }
258267 tokenAddress = { toToken . address }
259268 />
260269 ) }
261270
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 } />
289281 </ Container >
290- </ Container >
282+ </ >
291283
292284 { /* Status */ }
293285 { statusMeta && showStatusRow && (
294286 < >
295287 { lineSpacer }
296288 < Container
297289 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"
317290 style = { {
318291 justifyContent : "space-between" ,
319292 } }
320293 >
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 }
325305 </ Text >
326306 </ Container >
327307 </ Container >
328308 </ >
329309 ) }
330310
331- { lineSpacer }
311+ < Spacer y = "lg" />
332312
333313 { /* source chain Tx hash link */ }
334314 { fromChainExplorers . explorers ?. [ 0 ] ?. url && sourceTxHash && (
0 commit comments