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

Commit

Permalink
Remove confusing "failed to load validator key" warning.
Browse files Browse the repository at this point in the history
This happens because we try to load the validator key for all environments
  • Loading branch information
janedegtiareva committed Sep 9, 2019
1 parent d2d4b9c commit 5455dee
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 5455dee

Please sign in to comment.