Skip to content
This repository was archived by the owner on Sep 5, 2020. It is now read-only.

Commit

Permalink
Use Buffer.from instead of new Buffer (#4091)
Browse files Browse the repository at this point in the history
  • Loading branch information
Noel Yoo authored and evertonfraga committed Sep 17, 2018
1 parent 72e9f9b commit 403f35f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion customProtocols.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const { protocol } = require('electron');
protocol.registerHttpProtocol(
'mist',
(request, callback) => {
// callback({mimeType: 'text/html', data: new Buffer('<h5>Response</h5>')});
// callback({mimeType: 'text/html', data: Buffer.from('<h5>Response</h5>')});

console.log(
request.url.indexOf('mist://interface') !== -1
Expand Down
2 changes: 1 addition & 1 deletion gulpTasks/maintenance.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ gulp.task('update-nodes', cb => {
geth.platforms[platform][arch].download.url.split('/')
)
) {
const sum = new Buffer(
const sum = Buffer.from(
blob.Properties[0]['Content-MD5'][0],
'base64'
);
Expand Down
2 changes: 1 addition & 1 deletion modules/abi.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ ipc.on('backendAction_decodeFunctionSignature', (event, _signature, _data) => {
const paramTypes = signature[1].split(',');

try {
const paramsResponse = abi.rawDecode(paramTypes, new Buffer(data, 'hex'));
const paramsResponse = abi.rawDecode(paramTypes, Buffer.from(data, 'hex'));
const paramsDictArr = [];

// Turns addresses into proper hex string
Expand Down

0 comments on commit 403f35f

Please sign in to comment.