minor fixes
This commit is contained in:
parent
276334f8f8
commit
a199b0588a
|
@ -52,25 +52,23 @@ const OwnersColumn = ({
|
|||
const cancellationTx = isCancellationTransaction(tx, safeAddress)
|
||||
|
||||
const ownersWhoConfirmed = []
|
||||
const ownersUnconfirmed = []
|
||||
let currentUserAlreadyConfirmed = false
|
||||
let executionConfirmation
|
||||
owners.forEach((owner) => {
|
||||
const ownerConfirmation = tx.confirmations.find(conf => conf.owner.address === owner.address)
|
||||
if (ownerConfirmation) {
|
||||
if (ownerConfirmation.type === TX_TYPE_CONFIRMATION) {
|
||||
ownersWhoConfirmed.push(owner)
|
||||
} else {
|
||||
executionConfirmation = owner
|
||||
}
|
||||
|
||||
if (owner.address === userAddress) {
|
||||
currentUserAlreadyConfirmed = true
|
||||
}
|
||||
tx.confirmations.forEach((conf) => {
|
||||
if (conf.owner.address === userAddress) {
|
||||
currentUserAlreadyConfirmed = true
|
||||
}
|
||||
|
||||
if (conf.type === TX_TYPE_CONFIRMATION) {
|
||||
ownersWhoConfirmed.push(conf.owner)
|
||||
} else {
|
||||
ownersUnconfirmed.push(owner)
|
||||
executionConfirmation = conf.owner
|
||||
}
|
||||
})
|
||||
const ownersUnconfirmed = owners.filter(
|
||||
owner => tx.confirmations.findIndex(conf => conf.owner.address === owner.address) === -1,
|
||||
)
|
||||
|
||||
let displayButtonRow = true
|
||||
if (tx.executionTxHash) {
|
||||
|
@ -86,7 +84,7 @@ const OwnersColumn = ({
|
|||
}
|
||||
|
||||
const confirmedLabel = `Confirmed [${tx.confirmations.size}/${threshold}]`
|
||||
const unconfirmedLabel = `Unconfirmed [${owners.size - tx.confirmations.size}]`
|
||||
const unconfirmedLabel = `Unconfirmed [${ownersUnconfirmed.size}]`
|
||||
|
||||
return (
|
||||
<Col xs={6} className={classes.rightCol} layout="block">
|
||||
|
|
|
@ -36,11 +36,11 @@ export type SelectorProps = {
|
|||
const getTxStatus = (tx: Transaction, safe: Safe): TransactionStatus => {
|
||||
let txStatus = 'awaiting_confirmations'
|
||||
|
||||
if (tx.isExecuted) {
|
||||
if (tx.executionTxHash) {
|
||||
txStatus = 'success'
|
||||
} else if (tx.cancelled) {
|
||||
txStatus = 'cancelled'
|
||||
} else if (tx.confirmations.size === safe.owners.size) {
|
||||
} else if (tx.confirmations.size === safe.threshold) {
|
||||
txStatus = 'awaiting_execution'
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue