This repository has been archived by the owner on Nov 10, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 363
(Feature) Proper rejections #2096
Merged
Merged
Changes from 20 commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
6e76a2a
remove `isCancelTransaction` utility function in favor of `txInfo.isC…
fernandomg 4cabdcd
replace "cancel" concept in favor of "reject"
fernandomg dbcdf99
add circle-cross-red icon to "On-chain rejection" transaction info
fernandomg 38d1ad2
identify queued on-chain rejection
fernandomg 68406cc
apply styles to on-chain rejection type identifier
fernandomg 8e812e4
update awaiting messages wording
fernandomg 2f0bb0e
fix styles on styles to on-chain rejection
alongoni b35d9c0
upgrade SRC dependency and add errorTooltip color
alongoni f6d28dd
Merge branch 'development' into feature/1652-proper-rejection
nicosampler 67512e6
replace local svg with SRC `Icon` component wherever is possible
fernandomg faeba47
fix type
fernandomg e5d3860
Merge branch 'development' into feature/1652-proper-rejection
fernandomg 4d858af
update SRC
fernandomg ae19e8d
Merge branch 'development' into feature/1652-proper-rejection
fernandomg 670afc6
Merge branch 'development' into feature/1652-proper-rejection
1440b21
Merge branch 'development' into feature/1652-proper-rejection
fernandomg b069bea
fix color for Executed/Execute item
fernandomg bf6bc1d
fix missing `Nonce` label for nonce = 0
fernandomg 5c2113f
Merge branch 'development' into feature/1652-proper-rejection
fernandomg 42a332d
fix legend color
fernandomg 19a5564
Merge branch 'development' into feature/1652-proper-rejection
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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 |
---|---|---|
|
@@ -161,7 +161,7 @@ | |
"@gnosis.pm/safe-apps-sdk": "1.0.3", | ||
"@gnosis.pm/safe-apps-sdk-v1": "npm:@gnosis.pm/[email protected]", | ||
"@gnosis.pm/safe-contracts": "1.1.1-dev.2", | ||
"@gnosis.pm/safe-react-components": "https://github.com/gnosis/safe-react-components.git#a68a67e", | ||
"@gnosis.pm/safe-react-components": "https://github.com/gnosis/safe-react-components.git#7ebc414", | ||
"@gnosis.pm/util-contracts": "2.0.6", | ||
"@ledgerhq/hw-transport-node-hid-singleton": "5.45.0", | ||
"@material-ui/core": "^4.11.0", | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ import CircularProgress from '@material-ui/core/CircularProgress' | |
import React, { ReactElement, useContext, useRef } from 'react' | ||
import styled from 'styled-components' | ||
|
||
import CustomIconText from 'src/components/CustomIconText' | ||
import { CustomIconText } from 'src/components/CustomIconText' | ||
import { | ||
isCustomTxInfo, | ||
isMultiSendTxInfo, | ||
|
@@ -24,6 +24,7 @@ import { TokenTransferAmount } from './TokenTransferAmount' | |
import { TxsInfiniteScrollContext } from './TxsInfiniteScroll' | ||
import { TxLocationContext } from './TxLocationProvider' | ||
import { CalculatedVotes } from './TxQueueCollapsed' | ||
import { isCancelTxDetails } from './utils' | ||
|
||
const TxInfo = ({ info }: { info: AssetInfo }) => { | ||
if (isTokenTransferAsset(info)) { | ||
|
@@ -116,6 +117,8 @@ export const TxCollapsed = ({ | |
const { ref, lastItemId } = useContext(TxsInfiniteScrollContext) | ||
|
||
const willBeReplaced = transaction?.txStatus === 'WILL_BE_REPLACED' ? ' will-be-replaced' : '' | ||
const onChainRejection = | ||
isCancelTxDetails(transaction.txInfo) && txLocation !== 'history' ? ' on-chain-rejection' : '' | ||
|
||
const txCollapsedNonce = ( | ||
<div className={'tx-nonce' + willBeReplaced}> | ||
|
@@ -124,7 +127,7 @@ export const TxCollapsed = ({ | |
) | ||
|
||
const txCollapsedType = ( | ||
<div className={'tx-type' + willBeReplaced}> | ||
<div className={'tx-type' + willBeReplaced + onChainRejection}> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Shouldn't we use string literal instead? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. if I tell you I did it this way because I wanted to avoid the white space at the end? (or adding a |
||
<CustomIconText iconUrl={type.icon} text={type.text} /> | ||
</div> | ||
) | ||
|
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
11 changes: 11 additions & 0 deletions
11
src/routes/safe/components/Transactions/TxList/assets/circle-cross-red.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't it say
To save gas, reject..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably, but not sure. @lukasschor?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would even say "to save fees, ..." but we should check that this is aligned with other places where we might use similar wording.