-
Notifications
You must be signed in to change notification settings - Fork 464
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: update signers confirmations #1468
Conversation
Branch preview✅ Deploy successful! https://fix_update_tx_signers_confirmations--webcore.review-web-core.5afe.dev |
ESLint Summary View Full Report
Report generated by eslint-plus-action |
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 think we should align the way we refresh our TxDetails
with how we do it for SingleTx
.
Otherwise for SingleTx
s we would refresh twice for instance.
@@ -102,6 +106,22 @@ export const TxSigners = ({ | |||
const isPending = useIsPending(txId) | |||
const wallet = useWallet() | |||
const { safe } = useSafeInfo() | |||
const chainId = useChainId() | |||
const [confirmations, setConfirmations] = useState<MultisigConfirmation[]>([]) |
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.
} | ||
}, [detailedExecutionInfo]) | ||
|
||
txSubscribe(TxEvent.SIGNATURE_INDEXED, ({ txId }) => { |
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.
In the TxDetails we already have a bunch of conditions under which we will refresh the details. I would just add the txQueuedTag and txHistoryTag to that array:
const TxDetails = ({
txSummary,
txDetails,
}: {
txSummary: TransactionSummary
txDetails?: TransactionDetails // optional
}): ReactElement => {
const chainId = useChainId()
const { safe } = useSafeInfo()
const [txDetailsData, error, loading] = useAsync<TransactionDetails>(async () => {
return txDetails || getTransactionDetails(chainId, txSummary.id)
}, [txDetails, chainId, txSummary.id, safe.txQueuedTag, safe.txHistoryTag])
// ...
}
That is how we also refresh the tx details for a singleTx in the SingleTx
too.
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.
oh I didn't think about the tags! I'm going to give it a try
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've implemented this way. Thank you for the valuable input!
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.
Looks good! At some point we could add a test to the TxDetails I guess :)
I also didn't like that it was collapsing but we have a rule to collapse it when:
meaning that is happening because you're testing a 2/N Safe. Alternatively we could remove that condition but I'd prefer having that decision coming from design. Edit: You can recheck it @francovenica 🙌 |
What it solves
Resolves #1374
How this PR fixes it
Adds
txQueuedTag
to the dependency array to fetch TransactionDetailsHow to test it
Analytics changes
N/A
Screenshots