1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-22 01:47:00 +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 GitHub
parent dbe77289d3
commit 074c2934fe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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

@ -109,6 +109,7 @@ export default class ConfirmPageContainer extends Component {
supportsEIP1559: PropTypes.bool,
nativeCurrency: PropTypes.string,
isBuyableChain: PropTypes.bool,
isApprovalOrRejection: PropTypes.bool,
};
async componentDidMount() {
@ -186,6 +187,7 @@ export default class ConfirmPageContainer extends Component {
///: END:ONLY_INCLUDE_IN
accountBalance,
assetStandard,
isApprovalOrRejection,
} = this.props;
const shouldDisplayWarning =
@ -354,7 +356,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'