1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-23 02:10:12 +01:00

Delete unused util functions (#8622)

This commit is contained in:
Whymarrh Whitby 2020-05-20 10:36:41 -02:30 committed by GitHub
parent a03ef1b002
commit 9c1eae2965
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -132,20 +132,6 @@ function BnMultiplyByFraction (targetBN, numerator, denominator) {
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
* this is a workaround for the non-standard error object thats used
@ -165,13 +151,11 @@ function checkForError () {
}
export {
removeListeners,
getPlatform,
getEnvironmentType,
sufficientBalance,
hexToBn,
bnToHex,
BnMultiplyByFraction,
mapObjectValues,
checkForError,
}