-
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: Disable Add to Batch button for safe apps [SW-363] #4623
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -101,6 +101,8 @@ export const SignForm = ({ | |
const submitDisabled = | ||
!safeTx || !isSubmittable || disableSubmit || cannotPropose || (needsRiskConfirmation && !isRiskConfirmed) | ||
|
||
const isSafeAppTransaction = !!origin | ||
|
||
return ( | ||
<form onSubmit={handleSubmit}> | ||
{hasSigned && <ErrorMessage level="warning">You have already signed this transaction.</ErrorMessage>} | ||
|
@@ -130,7 +132,7 @@ export const SignForm = ({ | |
spacing={{ xs: 2, md: 2 }} | ||
> | ||
{/* Batch button */} | ||
{isCreation && !isBatch && ( | ||
{isCreation && !isBatch && !isSafeAppTransaction && ( | ||
<BatchButton | ||
onClick={onBatchClick} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The condition for rendering |
||
disabled={submitDisabled || !isBatchable} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ensure the new |
||
|
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 origin is also non-null in case of WalletConnect txs and probably swaps/staking/bridging as well.
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 hide it for those transactions as well to be on the safe side. At least for swaps the button is already disabled since it is a delegate call: