From acf12059e661dd7a8c6bfea923b78ddb78561e68 Mon Sep 17 00:00:00 2001 From: Mike Purvis Date: Tue, 21 Jul 2020 17:24:35 -0700 Subject: [PATCH] create-account: don't attempt removeKey if using Ledger --- commands/create-account.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commands/create-account.js b/commands/create-account.js index 47533b82..d99ad23e 100644 --- a/commands/create-account.js +++ b/commands/create-account.js @@ -135,7 +135,7 @@ async function createAccount(options) { console.warn(`near state ${options.accountId}`); console.warn('to confirm creation. Keyfile for this account has been saved.'); } else { - await near.connection.signer.keyStore.removeKey(options.networkId, options.accountId); + if (!options.usingLedger) await near.connection.signer.keyStore.removeKey(options.networkId, options.accountId); throw error; } }