Merge pull request #1738 from gnosis/fix/modal-close
Fix - Send Again modal close on its own
This commit is contained in:
commit
5008ee4ab9
|
@ -173,12 +173,12 @@ export const calculateTransactionStatus = (
|
||||||
|
|
||||||
if (tx.isExecuted && tx.isSuccessful) {
|
if (tx.isExecuted && tx.isSuccessful) {
|
||||||
txStatus = TransactionStatus.SUCCESS
|
txStatus = TransactionStatus.SUCCESS
|
||||||
|
} else if (tx.creationTx) {
|
||||||
|
txStatus = TransactionStatus.SUCCESS
|
||||||
} else if (tx.cancelled || nonce > tx.nonce) {
|
} else if (tx.cancelled || nonce > tx.nonce) {
|
||||||
txStatus = TransactionStatus.CANCELLED
|
txStatus = TransactionStatus.CANCELLED
|
||||||
} else if (tx.confirmations.size === threshold) {
|
} else if (tx.confirmations.size === threshold) {
|
||||||
txStatus = TransactionStatus.AWAITING_EXECUTION
|
txStatus = TransactionStatus.AWAITING_EXECUTION
|
||||||
} else if (tx.creationTx) {
|
|
||||||
txStatus = TransactionStatus.SUCCESS
|
|
||||||
} else if (!!tx.isPending) {
|
} else if (!!tx.isPending) {
|
||||||
txStatus = TransactionStatus.PENDING
|
txStatus = TransactionStatus.PENDING
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -26,7 +26,6 @@ const TransferDescription = ({
|
||||||
}: TransferDescriptionProps): ReactElement | null => {
|
}: TransferDescriptionProps): ReactElement | null => {
|
||||||
const recipientName = useSelector((state) => getNameFromAddressBookSelector(state, recipient))
|
const recipientName = useSelector((state) => getNameFromAddressBookSelector(state, recipient))
|
||||||
const [sendModalOpen, setSendModalOpen] = React.useState(false)
|
const [sendModalOpen, setSendModalOpen] = React.useState(false)
|
||||||
|
|
||||||
const sendModalOpenHandler = () => {
|
const sendModalOpenHandler = () => {
|
||||||
setSendModalOpen(true)
|
setSendModalOpen(true)
|
||||||
}
|
}
|
||||||
|
|
|
@ -73,13 +73,11 @@ const ExpandedModuleTx = ({ tx }: { tx: SafeModuleTransaction }): ReactElement =
|
||||||
</Block>
|
</Block>
|
||||||
<Hairline />
|
<Hairline />
|
||||||
<Block className={cn(classes.txDataContainer, classes.incomingTxBlock)}>
|
<Block className={cn(classes.txDataContainer, classes.incomingTxBlock)}>
|
||||||
{recipient && (
|
<TransferDescription
|
||||||
<TransferDescription
|
amountWithSymbol={amountWithSymbol}
|
||||||
amountWithSymbol={amountWithSymbol}
|
isTokenTransfer={!sameAddress(amountWithSymbol, NOT_AVAILABLE)}
|
||||||
isTokenTransfer={!sameAddress(amountWithSymbol, NOT_AVAILABLE)}
|
recipient={recipient}
|
||||||
recipient={recipient}
|
/>
|
||||||
/>
|
|
||||||
)}
|
|
||||||
</Block>
|
</Block>
|
||||||
</Col>
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
|
|
|
@ -121,12 +121,9 @@ const TxsTable = (): React.ReactElement => {
|
||||||
colSpan={6}
|
colSpan={6}
|
||||||
style={{ paddingBottom: 0, paddingTop: 0 }}
|
style={{ paddingBottom: 0, paddingTop: 0 }}
|
||||||
>
|
>
|
||||||
<Collapse
|
<Collapse in={expandedTx === rowId} unmountOnExit>
|
||||||
component={() => <ExpandedTx row={row} />}
|
<ExpandedTx row={row} />
|
||||||
in={expandedTx === rowId}
|
</Collapse>
|
||||||
timeout="auto"
|
|
||||||
unmountOnExit
|
|
||||||
/>
|
|
||||||
</TableCell>
|
</TableCell>
|
||||||
</TableRow>
|
</TableRow>
|
||||||
</React.Fragment>
|
</React.Fragment>
|
||||||
|
|
Loading…
Reference in New Issue