1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00
This commit is contained in:
Dan Finlay 2017-03-06 17:24:04 -08:00
parent cdcd1b1e8b
commit 32c767fbe8

View File

@ -118,7 +118,7 @@ module.exports = class PersonalMessageManager extends EventEmitter{
log.debug(`Message was not hex encoded, interpreting as utf8.`)
}
return hexEncode(data)
return this.hexEncode(data)
}
hexEncode(text){
@ -127,7 +127,7 @@ module.exports = class PersonalMessageManager extends EventEmitter{
var result = ''
for (i = 0; i < text.length; i++) {
hex = text.charCodeAt(i).toString(16)
result += ('000'+hex).slice(-4)
result += ('000' + hex).slice(-4)
}
return '0x' + result
}