-
-
Notifications
You must be signed in to change notification settings - Fork 273
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Cancel Transaction: AffectedTransactions
- Loading branch information
1 parent
86c3f7c
commit ac59862
Showing
20 changed files
with
120 additions
and
217 deletions.
There are no files selected for viewing
File renamed without changes.
46 changes: 46 additions & 0 deletions
46
...s/ReduxModal/UserContextModal/TxDetailModal/AffectedTransactions/AffectedTransactions.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
import { Banner, Button, Column } from '@trezor/components'; | ||
import { spacings } from '@trezor/theme'; | ||
import { ChainedTransactions } from '@suite-common/wallet-types'; | ||
|
||
import { Translation } from 'src/components/suite'; | ||
|
||
import { AffectedTransactionItem } from './AffectedTransactionItem'; | ||
|
||
type AffectedTransactionsProps = { | ||
chainedTxs?: ChainedTransactions; | ||
showChained: () => void; | ||
}; | ||
|
||
export const AffectedTransactions = ({ chainedTxs, showChained }: AffectedTransactionsProps) => { | ||
if (chainedTxs === undefined) { | ||
return null; | ||
} | ||
|
||
return ( | ||
<Column gap={spacings.md}> | ||
<Banner | ||
variant="warning" | ||
rightContent={ | ||
<Button | ||
variant="warning" | ||
onClick={showChained} | ||
icon="caretRight" | ||
iconAlignment="right" | ||
> | ||
<Translation id="TR_SEE_DETAILS" /> | ||
</Button> | ||
} | ||
> | ||
<Translation id="TR_AFFECTED_TXS" /> | ||
</Banner> | ||
<Column alignItems="center"> | ||
{chainedTxs.own.map(tx => ( | ||
<AffectedTransactionItem key={tx.txid} tx={tx} isAccountOwned /> | ||
))} | ||
{chainedTxs.others.map(tx => ( | ||
<AffectedTransactionItem key={tx.txid} tx={tx} /> | ||
))} | ||
</Column> | ||
</Column> | ||
); | ||
}; |
21 changes: 21 additions & 0 deletions
21
...s/ReduxModal/UserContextModal/TxDetailModal/CancelTransaction/CancelTransactionFailed.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { Card, Column, Text } from '@trezor/components'; | ||
import { HELP_CENTER_CANCEL_TRANSACTION } from '@trezor/urls'; | ||
import { spacings } from '@trezor/theme'; | ||
|
||
import { Translation } from '../../../../../Translation'; | ||
import { TrezorLink } from '../../../../../TrezorLink'; | ||
|
||
export const CancelTransactionFailed = () => ( | ||
<Card fillType="none"> | ||
<Column gap={spacings.xs}> | ||
<Text typographyStyle="titleSmall"> | ||
<Translation id="TR_CANCEL_TX_FAILED" /> | ||
</Text> | ||
<Translation id="TR_CANCEL_TX_FAILED_DESCRIPTION" /> | ||
|
||
<TrezorLink typographyStyle="hint" href={HELP_CENTER_CANCEL_TRANSACTION}> | ||
<Translation id="TR_LEARN_MORE" /> | ||
</TrezorLink> | ||
</Column> | ||
</Card> | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 0 additions & 51 deletions
51
...suite/modals/ReduxModal/UserContextModal/TxDetailModal/ChangeFee/AffectedTransactions.tsx
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 0 additions & 20 deletions
20
.../components/suite/modals/ReduxModal/UserContextModal/TxDetailModal/ChangeFee/GreyCard.tsx
This file was deleted.
Oops, something went wrong.
37 changes: 0 additions & 37 deletions
37
...omponents/suite/modals/ReduxModal/UserContextModal/TxDetailModal/ChangeFee/WarnHeader.tsx
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.