diff options
author | Noel Yoo <innovation.noel@gmail.com> | 2018-10-09 20:02:48 +0800 |
---|---|---|
committer | Whymarrh Whitby <whymarrh.whitby@gmail.com> | 2018-10-09 20:02:48 +0800 |
commit | ebdefe81a10595bb3341afa2ab0851c8269c19d8 (patch) | |
tree | be37de2472f316ed8b5b00f297ed9c1a1a851e71 /app/scripts | |
parent | 012f7ddd72659b7ca470054f81487bd87b480392 (diff) | |
download | tangerine-wallet-browser-ebdefe81a10595bb3341afa2ab0851c8269c19d8.tar tangerine-wallet-browser-ebdefe81a10595bb3341afa2ab0851c8269c19d8.tar.gz tangerine-wallet-browser-ebdefe81a10595bb3341afa2ab0851c8269c19d8.tar.bz2 tangerine-wallet-browser-ebdefe81a10595bb3341afa2ab0851c8269c19d8.tar.lz tangerine-wallet-browser-ebdefe81a10595bb3341afa2ab0851c8269c19d8.tar.xz tangerine-wallet-browser-ebdefe81a10595bb3341afa2ab0851c8269c19d8.tar.zst tangerine-wallet-browser-ebdefe81a10595bb3341afa2ab0851c8269c19d8.zip |
Refactor buffer constructor (#5468)
Diffstat (limited to 'app/scripts')
-rw-r--r-- | app/scripts/lib/message-manager.js | 2 | ||||
-rw-r--r-- | app/scripts/lib/personal-message-manager.js | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/app/scripts/lib/message-manager.js b/app/scripts/lib/message-manager.js index 47925b94b..e86629590 100644 --- a/app/scripts/lib/message-manager.js +++ b/app/scripts/lib/message-manager.js @@ -272,6 +272,6 @@ function normalizeMsgData (data) { return data } else { // data is unicode, convert to hex - return ethUtil.bufferToHex(new Buffer(data, 'utf8')) + return ethUtil.bufferToHex(Buffer.from(data, 'utf8')) } } diff --git a/app/scripts/lib/personal-message-manager.js b/app/scripts/lib/personal-message-manager.js index fc2cccdf1..fdb94f5ec 100644 --- a/app/scripts/lib/personal-message-manager.js +++ b/app/scripts/lib/personal-message-manager.js @@ -285,7 +285,7 @@ module.exports = class PersonalMessageManager extends EventEmitter { log.debug(`Message was not hex encoded, interpreting as utf8.`) } - return ethUtil.bufferToHex(new Buffer(data, 'utf8')) + return ethUtil.bufferToHex(Buffer.from(data, 'utf8')) } } |