mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Ensure approval warning for setApprovalForAll is not shown when revoking (#15806)
Co-authored-by: ryanml <ryanlanese@gmail.com>
This commit is contained in:
parent
ba11a4b5ad
commit
7054dd6694
@ -97,6 +97,7 @@ export default class ConfirmPageContainer extends Component {
|
||||
nativeCurrency: PropTypes.string,
|
||||
showBuyModal: PropTypes.func,
|
||||
isBuyableChain: PropTypes.bool,
|
||||
setApproveForAllArg: PropTypes.bool,
|
||||
};
|
||||
|
||||
render() {
|
||||
@ -153,6 +154,7 @@ export default class ConfirmPageContainer extends Component {
|
||||
showBuyModal,
|
||||
isBuyableChain,
|
||||
networkIdentifier,
|
||||
setApproveForAllArg,
|
||||
} = this.props;
|
||||
|
||||
const showAddToAddressDialog =
|
||||
@ -306,7 +308,7 @@ export default class ConfirmPageContainer extends Component {
|
||||
<ErrorMessage errorKey={errorKey} />
|
||||
</div>
|
||||
)}
|
||||
{isSetApproveForAll && (
|
||||
{isSetApproveForAll && !setApproveForAllArg && (
|
||||
<Dialog type="error" className="confirm-page-container__dialog">
|
||||
{t('confirmPageDialogSetApprovalForAll')}
|
||||
</Dialog>
|
||||
|
@ -172,6 +172,7 @@ export default function ConfirmApprove({
|
||||
customTokenAmount={String(customPermissionAmount)}
|
||||
dappProposedTokenAmount={tokenAmount}
|
||||
currentTokenBalance={tokenBalance}
|
||||
setApproveForAllArg={setApproveForAllArg}
|
||||
contentComponent={
|
||||
<TransactionModalContextProvider>
|
||||
<ConfirmApproveContent
|
||||
|
@ -151,6 +151,7 @@ export default class ConfirmTransactionBase extends Component {
|
||||
eip1559V2Enabled: PropTypes.bool,
|
||||
showBuyModal: PropTypes.func,
|
||||
isBuyableChain: PropTypes.bool,
|
||||
setApproveForAllArg: PropTypes.bool,
|
||||
};
|
||||
|
||||
state = {
|
||||
@ -1048,6 +1049,7 @@ export default class ConfirmTransactionBase extends Component {
|
||||
nativeCurrency,
|
||||
hardwareWalletRequiresConnection,
|
||||
image,
|
||||
setApproveForAllArg,
|
||||
} = this.props;
|
||||
const {
|
||||
submitting,
|
||||
@ -1148,6 +1150,7 @@ export default class ConfirmTransactionBase extends Component {
|
||||
currentTransaction={txData}
|
||||
supportsEIP1559V2={this.supportsEIP1559V2}
|
||||
nativeCurrency={nativeCurrency}
|
||||
setApproveForAllArg={setApproveForAllArg}
|
||||
/>
|
||||
</TransactionModalContextProvider>
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user