Merge pull request #1738 from gnosis/fix/modal-close

Fix - Send Again modal close on its own
This commit is contained in:
Mati Dastugue 2020-12-22 11:16:16 -03:00 committed by GitHub
commit 5008ee4ab9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 16 deletions

View File

@ -173,12 +173,12 @@ export const calculateTransactionStatus = (
if (tx.isExecuted && tx.isSuccessful) {
txStatus = TransactionStatus.SUCCESS
} else if (tx.creationTx) {
txStatus = TransactionStatus.SUCCESS
} else if (tx.cancelled || nonce > tx.nonce) {
txStatus = TransactionStatus.CANCELLED
} else if (tx.confirmations.size === threshold) {
txStatus = TransactionStatus.AWAITING_EXECUTION
} else if (tx.creationTx) {
txStatus = TransactionStatus.SUCCESS
} else if (!!tx.isPending) {
txStatus = TransactionStatus.PENDING
} else {

View File

@ -26,7 +26,6 @@ const TransferDescription = ({
}: TransferDescriptionProps): ReactElement | null => {
const recipientName = useSelector((state) => getNameFromAddressBookSelector(state, recipient))
const [sendModalOpen, setSendModalOpen] = React.useState(false)
const sendModalOpenHandler = () => {
setSendModalOpen(true)
}

View File

@ -73,13 +73,11 @@ const ExpandedModuleTx = ({ tx }: { tx: SafeModuleTransaction }): ReactElement =
</Block>
<Hairline />
<Block className={cn(classes.txDataContainer, classes.incomingTxBlock)}>
{recipient && (
<TransferDescription
amountWithSymbol={amountWithSymbol}
isTokenTransfer={!sameAddress(amountWithSymbol, NOT_AVAILABLE)}
recipient={recipient}
/>
)}
<TransferDescription
amountWithSymbol={amountWithSymbol}
isTokenTransfer={!sameAddress(amountWithSymbol, NOT_AVAILABLE)}
recipient={recipient}
/>
</Block>
</Col>
</Row>

View File

@ -121,12 +121,9 @@ const TxsTable = (): React.ReactElement => {
colSpan={6}
style={{ paddingBottom: 0, paddingTop: 0 }}
>
<Collapse
component={() => <ExpandedTx row={row} />}
in={expandedTx === rowId}
timeout="auto"
unmountOnExit
/>
<Collapse in={expandedTx === rowId} unmountOnExit>
<ExpandedTx row={row} />
</Collapse>
</TableCell>
</TableRow>
</React.Fragment>