fix: owners column buttons statuses
This commit is contained in:
parent
a68a2d32d0
commit
aefe721e8f
|
@ -18,6 +18,7 @@ import Paragraph from 'src/components/layout/Paragraph/index'
|
||||||
import { userAccountSelector } from 'src/logic/wallets/store/selectors'
|
import { userAccountSelector } from 'src/logic/wallets/store/selectors'
|
||||||
import { makeTransaction } from 'src/routes/safe/store/models/transaction'
|
import { makeTransaction } from 'src/routes/safe/store/models/transaction'
|
||||||
import { safeOwnersSelector, safeThresholdSelector } from 'src/routes/safe/store/selectors'
|
import { safeOwnersSelector, safeThresholdSelector } from 'src/routes/safe/store/selectors'
|
||||||
|
import { TransactionStatus } from 'src/routes/safe/store/models/types/transaction'
|
||||||
|
|
||||||
function getOwnersConfirmations(tx, userAddress) {
|
function getOwnersConfirmations(tx, userAddress) {
|
||||||
const ownersWhoConfirmed = []
|
const ownersWhoConfirmed = []
|
||||||
|
@ -75,7 +76,7 @@ function getPendingOwnersConfirmations(owners, tx, userAddress) {
|
||||||
|
|
||||||
const OwnersColumn = ({
|
const OwnersColumn = ({
|
||||||
tx,
|
tx,
|
||||||
cancelTx = makeTransaction(),
|
cancelTx = makeTransaction({ isCancellationTx: true, status: TransactionStatus.AWAITING_YOUR_CONFIRMATION }),
|
||||||
classes,
|
classes,
|
||||||
thresholdReached,
|
thresholdReached,
|
||||||
cancelThresholdReached,
|
cancelThresholdReached,
|
||||||
|
@ -118,6 +119,7 @@ const OwnersColumn = ({
|
||||||
const showConfirmBtn =
|
const showConfirmBtn =
|
||||||
!tx.isExecuted &&
|
!tx.isExecuted &&
|
||||||
tx.status !== 'pending' &&
|
tx.status !== 'pending' &&
|
||||||
|
cancelTx.status !== 'pending' &&
|
||||||
!tx.cancelled &&
|
!tx.cancelled &&
|
||||||
userIsUnconfirmedOwner &&
|
userIsUnconfirmedOwner &&
|
||||||
!currentUserAlreadyConfirmed &&
|
!currentUserAlreadyConfirmed &&
|
||||||
|
@ -128,6 +130,7 @@ const OwnersColumn = ({
|
||||||
const showRejectBtn =
|
const showRejectBtn =
|
||||||
!cancelTx.isExecuted &&
|
!cancelTx.isExecuted &&
|
||||||
!tx.isExecuted &&
|
!tx.isExecuted &&
|
||||||
|
tx.status !== 'pending' &&
|
||||||
cancelTx.status !== 'pending' &&
|
cancelTx.status !== 'pending' &&
|
||||||
userIsUnconfirmedCancelOwner &&
|
userIsUnconfirmedCancelOwner &&
|
||||||
!currentUserAlreadyConfirmedCancel &&
|
!currentUserAlreadyConfirmedCancel &&
|
||||||
|
|
Loading…
Reference in New Issue