Skip to content

Commit

Permalink
Fixed error handling for async importFromFile
Browse files Browse the repository at this point in the history
  • Loading branch information
tinybike committed Oct 16, 2018
1 parent 3181adb commit a696227
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions dist/keythereum.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ function keccak256(buffer) {

module.exports = {

version: "1.0.4",
version: "1.0.5",

browser: isBrowser,

Expand Down Expand Up @@ -552,7 +552,7 @@ module.exports = {
if (ex) return cb(ex);
filepath = findKeyfile(keystore, address, files);
if (!filepath) {
return new Error("could not find key file for address " + address);
return cb(new Error("could not find key file for address " + address));
}
return cb(JSON.parse(fs.readFileSync(filepath)));
});
Expand Down
2 changes: 1 addition & 1 deletion dist/keythereum.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function keccak256(buffer) {

module.exports = {

version: "1.0.4",
version: "1.0.5",

browser: isBrowser,

Expand Down Expand Up @@ -544,7 +544,7 @@ module.exports = {
if (ex) return cb(ex);
filepath = findKeyfile(keystore, address, files);
if (!filepath) {
return new Error("could not find key file for address " + address);
return cb(new Error("could not find key file for address " + address));
}
return cb(JSON.parse(fs.readFileSync(filepath)));
});
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "keythereum",
"version": "1.0.4",
"version": "1.0.5",
"description": "Create, import and export Ethereum keys",
"main": "index.js",
"directories": {
Expand Down

0 comments on commit a696227

Please sign in to comment.