mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Remove unused background API methods (#12731)
These background API methods were not used anywhere in the UI. One of them was called in `actions.js` by a function that itself was never called, so it have been removed. Additionally, one unused `actions.js` function was found and removed as well. `setAdvancedGasFee` is the only unused background method that remains. It was recently added and will be used in the near future.
This commit is contained in:
parent
ecceb4d6da
commit
cce2dda8e4
@ -1008,9 +1008,7 @@ export default class MetamaskController extends EventEmitter {
|
||||
),
|
||||
createCancelTransaction: nodeify(this.createCancelTransaction, this),
|
||||
createSpeedUpTransaction: nodeify(this.createSpeedUpTransaction, this),
|
||||
isNonceTaken: nodeify(txController.isNonceTaken, txController),
|
||||
estimateGas: nodeify(this.estimateGas, this),
|
||||
getPendingNonce: nodeify(this.getPendingNonce, this),
|
||||
getNextNonce: nodeify(this.getNextNonce, this),
|
||||
addUnapprovedTransaction: nodeify(
|
||||
txController.addUnapprovedTransaction,
|
||||
@ -1094,13 +1092,6 @@ export default class MetamaskController extends EventEmitter {
|
||||
permissionsController.approvePermissionsRequest,
|
||||
permissionsController,
|
||||
),
|
||||
clearPermissions: permissionsController.clearPermissions.bind(
|
||||
permissionsController,
|
||||
),
|
||||
getApprovedAccounts: nodeify(
|
||||
permissionsController.getAccounts,
|
||||
permissionsController,
|
||||
),
|
||||
rejectPermissionsRequest: nodeify(
|
||||
permissionsController.rejectPermissionsRequest,
|
||||
permissionsController,
|
||||
|
@ -1356,12 +1356,6 @@ export function acceptWatchAsset(suggestedAssetID) {
|
||||
};
|
||||
}
|
||||
|
||||
export function addKnownMethodData(fourBytePrefix, methodData) {
|
||||
return () => {
|
||||
background.addKnownMethodData(fourBytePrefix, methodData);
|
||||
};
|
||||
}
|
||||
|
||||
export function clearPendingTokens() {
|
||||
return {
|
||||
type: actionConstants.CLEAR_PENDING_TOKENS,
|
||||
@ -2403,19 +2397,6 @@ export function removePermissionsFor(domains) {
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Clears all permissions for all domains.
|
||||
*/
|
||||
export function clearPermissions() {
|
||||
return (dispatch) => {
|
||||
background.clearPermissions((err) => {
|
||||
if (err) {
|
||||
dispatch(displayWarning(err.message));
|
||||
}
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
// Pending Approvals
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user