1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

remove warning on revoke approval for all nfts (#16953)

Co-authored-by: EresDev <eresdev@hotmail.com>
This commit is contained in:
Dan J Miller 2022-12-16 13:37:18 -03:30 committed by seaona
parent 557b5de08d
commit 60bfdf51d6
2 changed files with 7 additions and 2 deletions

View File

@ -260,7 +260,6 @@ describe('Collectibles', function () {
// Confirm disabling set approval for all
await driver.clickElement({ text: 'Confirm', tag: 'button' });
await driver.clickElement({ text: 'Approve', tag: 'button' });
await driver.waitUntilXWindowHandles(2);
await driver.switchToWindow(extension);

View File

@ -115,6 +115,7 @@ export default class ConfirmPageContainer extends Component {
supportsEIP1559V2: PropTypes.bool,
nativeCurrency: PropTypes.string,
isBuyableChain: PropTypes.bool,
isApprovalOrRejection: PropTypes.bool,
};
async componentDidMount() {
@ -193,6 +194,7 @@ export default class ConfirmPageContainer extends Component {
///: END:ONLY_INCLUDE_IN
accountBalance,
assetStandard,
isApprovalOrRejection,
} = this.props;
const showAddToAddressDialog =
@ -386,7 +388,11 @@ export default class ConfirmPageContainer extends Component {
<PageContainerFooter
onCancel={onCancel}
cancelText={t('reject')}
onSubmit={isSetApproveForAll ? onSetApprovalForAll : onSubmit}
onSubmit={
isSetApproveForAll && isApprovalOrRejection
? onSetApprovalForAll
: onSubmit
}
submitText={t('confirm')}
submitButtonType={
isSetApproveForAll ? 'danger-primary' : 'primary'