diff --git a/src/app/components/bitcoin-transaction-item/bitcoin-transaction-caption.tsx b/src/app/components/bitcoin-transaction-item/bitcoin-transaction-caption.tsx deleted file mode 100644 index a1e6b2a0e72..00000000000 --- a/src/app/components/bitcoin-transaction-item/bitcoin-transaction-caption.tsx +++ /dev/null @@ -1,12 +0,0 @@ -import { styled } from 'leather-styles/jsx'; - -interface BitcoinTransactionCaptionProps { - children: string; -} -export function BitcoinTransactionCaption({ children }: BitcoinTransactionCaptionProps) { - return ( - - {children} - - ); -} diff --git a/src/app/components/bitcoin-transaction-item/bitcoin-transaction-item.tsx b/src/app/components/bitcoin-transaction-item/bitcoin-transaction-item.tsx index 3838cd0a656..38e4069dcb7 100644 --- a/src/app/components/bitcoin-transaction-item/bitcoin-transaction-item.tsx +++ b/src/app/components/bitcoin-transaction-item/bitcoin-transaction-item.tsx @@ -23,13 +23,12 @@ import { useGetInscriptionsByOutputQuery } from '@app/query/bitcoin/ordinals/ins import { useCurrentAccountNativeSegwitAddressIndexZero } from '@app/store/accounts/blockchain/bitcoin/native-segwit-account.hooks'; import { BulletSeparator } from '@app/ui/components/bullet-separator/bullet-separator'; import { BtcIcon } from '@app/ui/components/icons/btc-icon'; +import { Caption } from '@app/ui/components/typography/caption'; import { TransactionItemLayout } from '../transaction-item/transaction-item.layout'; -import { BitcoinTransactionCaption } from './bitcoin-transaction-caption'; import { BitcoinTransactionIcon } from './bitcoin-transaction-icon'; import { InscriptionIcon } from './bitcoin-transaction-inscription-icon'; import { BitcoinTransactionStatus } from './bitcoin-transaction-status'; -import { BitcoinTransactionValue } from './bitcoin-transaction-value'; interface BitcoinTransactionItemProps { transaction: BitcoinTx; @@ -76,13 +75,10 @@ export function BitcoinTransactionItem({ transaction }: BitcoinTransactionItemPr const txCaption = ( - {caption} - {inscriptionData ? ( - {inscriptionData.mime_type} - ) : null} + {caption} + {inscriptionData ? {inscriptionData.mime_type} : null} ); - const txValue = {value}; const title = inscriptionData ? `Ordinal inscription #${inscriptionData.number}` : 'Bitcoin'; const increaseFeeButton = ( @@ -107,7 +103,7 @@ export function BitcoinTransactionItem({ transaction }: BitcoinTransactionItemPr } txStatus={} txTitle={} - txValue={txValue} + txValue={value} /> ); } diff --git a/src/app/components/bitcoin-transaction-item/bitcoin-transaction-status.tsx b/src/app/components/bitcoin-transaction-item/bitcoin-transaction-status.tsx index 7cbc54caa5c..d0c76a41461 100644 --- a/src/app/components/bitcoin-transaction-item/bitcoin-transaction-status.tsx +++ b/src/app/components/bitcoin-transaction-item/bitcoin-transaction-status.tsx @@ -1,6 +1,7 @@ import { BitcoinTx } from '@shared/models/transactions/bitcoin-transaction.model'; -import { PendingLabel } from '@app/components/transaction/pending-label'; +import { BasicTooltip } from '@app/ui/components/tooltip/basic-tooltip'; +import { Caption } from '@app/ui/components/typography/caption'; interface BitcoinTransactionStatusProps { transaction: BitcoinTx; @@ -10,5 +11,9 @@ const pendingWaitingMessage = export function BitcoinTransactionStatus({ transaction }: BitcoinTransactionStatusProps) { const isPending = !transaction.status.confirmed; - return isPending ? : null; + return isPending ? ( + + Pending + + ) : null; } diff --git a/src/app/components/bitcoin-transaction-item/bitcoin-transaction-value.tsx b/src/app/components/bitcoin-transaction-item/bitcoin-transaction-value.tsx deleted file mode 100644 index 71b9e77eb02..00000000000 --- a/src/app/components/bitcoin-transaction-item/bitcoin-transaction-value.tsx +++ /dev/null @@ -1,8 +0,0 @@ -import { Title } from '@app/ui/components/typography/title'; - -interface BitcoinTransactionValueProps { - children: string; -} -export function BitcoinTransactionValue({ children }: BitcoinTransactionValueProps) { - return {children}; -} diff --git a/src/app/components/stacks-transaction-item/increase-fee-button.tsx b/src/app/components/stacks-transaction-item/increase-fee-button.tsx index cf924f4e988..bb5e7388032 100644 --- a/src/app/components/stacks-transaction-item/increase-fee-button.tsx +++ b/src/app/components/stacks-transaction-item/increase-fee-button.tsx @@ -26,7 +26,7 @@ export function IncreaseFeeButton(props: IncreaseFeeButtonProps) { position="relative" px="space.02" py="space.01" - rounded="8px" + rounded="xs" type="button" zIndex={999} > diff --git a/src/app/components/stacks-transaction-item/stacks-transaction-item.tsx b/src/app/components/stacks-transaction-item/stacks-transaction-item.tsx index f43b7440e8c..da082aaaf8b 100644 --- a/src/app/components/stacks-transaction-item/stacks-transaction-item.tsx +++ b/src/app/components/stacks-transaction-item/stacks-transaction-item.tsx @@ -1,7 +1,5 @@ import { createSearchParams, useLocation, useNavigate } from 'react-router-dom'; -import { styled } from 'leather-styles/jsx'; - import { StacksTx, TxTransferDetails } from '@shared/models/transactions/stacks-transaction.model'; import { RouteUrls } from '@shared/route-urls'; @@ -85,22 +83,16 @@ export function StacksTransactionItem({ /> ); const txStatus = transaction && ; - const txCaption = ( - - {caption} - - ); - const txValue = {value}; return ( } - txValue={txValue} + txValue={value} /> ); } diff --git a/src/app/components/stacks-transaction-item/stacks-transaction-status.tsx b/src/app/components/stacks-transaction-item/stacks-transaction-status.tsx index c0cf05f5bb6..8661e0c562d 100644 --- a/src/app/components/stacks-transaction-item/stacks-transaction-status.tsx +++ b/src/app/components/stacks-transaction-item/stacks-transaction-status.tsx @@ -1,11 +1,11 @@ -import { styled } from 'leather-styles/jsx'; - import { StacksTx } from '@shared/models/transactions/stacks-transaction.model'; import { isPendingTx } from '@app/common/transactions/stacks/transaction.utils'; import { BasicTooltip } from '@app/ui/components/tooltip/basic-tooltip'; +import { Caption } from '@app/ui/components/typography/caption'; -import { PendingLabel } from '../transaction/pending-label'; +const pendingWaitingMessage = + 'This transaction is waiting to be confirmed. Depending on network congestion, this may take anywhere from a few minutes, to a couple of hours.'; interface TransactionStatusProps { transaction: StacksTx; @@ -16,12 +16,14 @@ export function StacksTransactionStatus({ transaction }: TransactionStatusProps) return ( <> - {isPending && } + {isPending && ( + + Pending + + )} {isFailed && ( - - Failed - + Failed )} diff --git a/src/app/components/transaction-item/transaction-item.layout.tsx b/src/app/components/transaction-item/transaction-item.layout.tsx index e778cf9591d..921b9f66998 100644 --- a/src/app/components/transaction-item/transaction-item.layout.tsx +++ b/src/app/components/transaction-item/transaction-item.layout.tsx @@ -1,9 +1,10 @@ import { ReactNode } from 'react'; -import { styled } from 'leather-styles/jsx'; +import { HStack, styled } from 'leather-styles/jsx'; import { ItemInteractive } from '@app/ui/components/item/item-interactive'; import { ItemLayout } from '@app/ui/components/item/item.layout'; +import { Caption } from '@app/ui/components/typography/caption'; interface TransactionItemLayoutProps { openTxLink(): void; @@ -25,18 +26,15 @@ export function TransactionItemLayout({ txValue, }: TransactionItemLayoutProps) { return ( - // TODO: Revisit if needed styles position="relative" zIndex={99} - - {txCaption} - + + {txCaption} {txStatus && txStatus} - + } titleRight={ rightElement ? ( diff --git a/src/app/components/transaction/pending-label.tsx b/src/app/components/transaction/pending-label.tsx deleted file mode 100644 index 939a42bc5e5..00000000000 --- a/src/app/components/transaction/pending-label.tsx +++ /dev/null @@ -1,28 +0,0 @@ -import { Box, Flex, styled } from 'leather-styles/jsx'; - -import { InfoIcon } from '@app/ui/components/icons/info-icon'; -import { BasicTooltip } from '@app/ui/components/tooltip/basic-tooltip'; - -const defaultPendingWaitingMessage = - 'This transaction is waiting to be confirmed. Depending on network congestion, this may take anywhere from a few minutes, to a couple of hours.'; - -interface PendingLabelProps { - pendingWaitingMessage?: string; -} - -export function PendingLabel({ - pendingWaitingMessage = defaultPendingWaitingMessage, -}: PendingLabelProps) { - return ( - - - Pending - - - - - - - - ); -} diff --git a/src/app/components/transaction/transaction-title.tsx b/src/app/components/transaction/transaction-title.tsx index 6f9bf4af05c..23397108de8 100644 --- a/src/app/components/transaction/transaction-title.tsx +++ b/src/app/components/transaction/transaction-title.tsx @@ -22,10 +22,11 @@ export function TransactionTitle(props: TransactionTitleProps) { return ( {spamFilter(title)}