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

Commit

Permalink
Add missing await for login (better error handling)
Browse files Browse the repository at this point in the history
  • Loading branch information
vgrichina committed Oct 22, 2019
1 parent 35792b1 commit 4313a3a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ exports.login = async function(options) {
let keyFound = keys.some(key => key.public_key == keyPair.getPublicKey().toString());
if (keyFound) {
const keyStore = new UnencryptedFileSystemKeyStore('./neardev');
keyStore.setKey(options.networkId, accountId, keyPair);
await keyStore.setKey(options.networkId, accountId, keyPair);
console.log(`Logged in with ${accountId}`);
} else {
console.log('Log in did not succeed. Please try again.');
Expand Down

0 comments on commit 4313a3a

Please sign in to comment.