Skip to content
This repository has been archived by the owner on Nov 10, 2023. It is now read-only.

style: remove inconsistent on-chain rejection label #3451

Merged
merged 1 commit into from
Feb 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import { TokenTransferAmount } from './TokenTransferAmount'
import { TxsInfiniteScrollContext } from './TxsInfiniteScroll'
import { TxLocationContext } from './TxLocationProvider'
import { CalculatedVotes } from './TxQueueCollapsed'
import { getTxTo, isAwaitingExecution, isCancelTxDetails } from './utils'
import { getTxTo, isAwaitingExecution } from './utils'
import { userAccountSelector } from 'src/logic/wallets/store/selectors'
import { useKnownAddress } from './hooks/useKnownAddress'
import useTxStatus from 'src/logic/hooks/useTxStatus'
Expand Down Expand Up @@ -123,17 +123,14 @@ export const TxCollapsed = ({
const isPending = txStatus === LocalTransactionStatus.PENDING
const willBeReplaced = txStatus === LocalTransactionStatus.WILL_BE_REPLACED ? ' will-be-replaced' : ''

const onChainRejection =
isCancelTxDetails(transaction.txInfo) && txLocation !== 'history' ? ' on-chain-rejection' : ''

const txCollapsedNonce = (
<div className={'tx-nonce' + willBeReplaced}>
<Text size="xl">{nonce}</Text>
</div>
)

const txCollapsedType = (
<div className={'tx-type' + willBeReplaced + onChainRejection}>
<div className={'tx-type' + willBeReplaced}>
<CustomIconText
address={toAddress?.value || '0x'}
iconUrl={type.icon || toInfo?.logoUri || undefined}
Expand Down
30 changes: 0 additions & 30 deletions src/routes/safe/components/Transactions/TxList/styled.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -170,32 +170,6 @@ const failedTransaction = css`
}
`

const onChainRejection = css`
&.on-chain-rejection {
background-color: ${({ theme }) => theme.colors.errorTooltip};
border-left: 4px solid ${({ theme }) => theme.colors.error};
border-radius: 4px;
padding-left: 7px;
height: 22px;
max-width: 165px;
> div {
height: 17px;
align-items: center;
padding-top: 3px;
}
p {
font-size: 11px;
line-height: 16px;
letter-spacing: 1px;
font-weight: bold;
text-transform: uppercase;
margin-left: -2px;
}
}
`

export const StyledTransaction = styled.div`
${willBeReplaced};
${failedTransaction};
Expand All @@ -208,10 +182,6 @@ export const StyledTransaction = styled.div`
align-self: center;
}
.tx-type {
${onChainRejection};
}
.tx-votes {
justify-self: center;
}
Expand Down