diff --git a/index.js b/index.js index f053c326..88305ea0 100755 --- a/index.js +++ b/index.js @@ -60,7 +60,7 @@ exports.createAccount = async function(options) { } await near.createAccount(options.accountId, publicKey); if (keyPair) { - near.connection.signer.keyStore.setKey(options.networkId, options.accountId, keyPair); + await near.connection.signer.keyStore.setKey(options.networkId, options.accountId, keyPair); } console.log(`Account ${options.accountId} for network "${options.networkId}" was created.`); }