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:
parent
a03ef1b002
commit
9c1eae2965
@ -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,
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user