Skip to content
This repository has been archived by the owner on Oct 4, 2024. It is now read-only.

Commit

Permalink
Merge pull request #137 from nearprotocol/fix-key-warning
Browse files Browse the repository at this point in the history
Remove confusing "failed to load validator key" warning.
  • Loading branch information
vgrichina authored Sep 9, 2019
2 parents 2afeb06 + 5455dee commit f7ee72b
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,11 @@ exports.clean = async function() {
};

async function connect(options) {
if (options.keyPath === undefined && options.helperUrl === undefined) {
const homeDir = options.homeDir || `${process.env.HOME}/.near`;
options.keyPath = `${homeDir}/validator_key.json`;
}
// TODO: search for key store.
const keyStore = new UnencryptedFileSystemKeyStore('./neardev');
options.deps = {
keyStore,
};
// TODO: search for key store.
return await nearjs.connect(options);
}

Expand Down

0 comments on commit f7ee72b

Please sign in to comment.