diff --git a/ironfish-cli/src/commands/wallet/import.ts b/ironfish-cli/src/commands/wallet/import.ts index cc8f4c94f5..4c1cd91350 100644 --- a/ironfish-cli/src/commands/wallet/import.ts +++ b/ironfish-cli/src/commands/wallet/import.ts @@ -150,10 +150,16 @@ export class ImportCommand extends IronfishCommand { } async importTTY(): Promise { - const userInput = await largePrompt( - 'Paste the output of wallet:export, or your spending key', - ) + let userInput = ( + await largePrompt('Paste the output of wallet:export, or your spending key: ') + ).trim() + + while (userInput.length === 0) { + userInput = ( + await largePrompt('Paste the output of wallet:export, or your spending key: ') + ).trim() + } - return userInput.trim() + return userInput } }