mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Delete unused util functions (#8622)
This commit is contained in:
parent
a03ef1b002
commit
9c1eae2965
@ -132,20 +132,6 @@ function BnMultiplyByFraction (targetBN, numerator, denominator) {
|
|||||||
return targetBN.mul(numBN).div(denomBN)
|
return targetBN.mul(numBN).div(denomBN)
|
||||||
}
|
}
|
||||||
|
|
||||||
function removeListeners (listeners, emitter) {
|
|
||||||
Object.keys(listeners).forEach((key) => {
|
|
||||||
emitter.removeListener(key, listeners[key])
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
function mapObjectValues (object, cb) {
|
|
||||||
const mappedObject = {}
|
|
||||||
Object.keys(object).forEach((key) => {
|
|
||||||
mappedObject[key] = cb(key, object[key])
|
|
||||||
})
|
|
||||||
return mappedObject
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns an Error if extension.runtime.lastError is present
|
* Returns an Error if extension.runtime.lastError is present
|
||||||
* this is a workaround for the non-standard error object thats used
|
* this is a workaround for the non-standard error object thats used
|
||||||
@ -165,13 +151,11 @@ function checkForError () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export {
|
export {
|
||||||
removeListeners,
|
|
||||||
getPlatform,
|
getPlatform,
|
||||||
getEnvironmentType,
|
getEnvironmentType,
|
||||||
sufficientBalance,
|
sufficientBalance,
|
||||||
hexToBn,
|
hexToBn,
|
||||||
bnToHex,
|
bnToHex,
|
||||||
BnMultiplyByFraction,
|
BnMultiplyByFraction,
|
||||||
mapObjectValues,
|
|
||||||
checkForError,
|
checkForError,
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user