letapiKeyPrompt=prompt("Please enter the API key for this node.\n\nIt can be found in a file called 'apikey.txt' in the directory where the core is installed.\n\nAlternatively, click Cancel to use the core with reduced functionality.","");
if(apiKeyPrompt===null){
// Cancel was pushed - so give up
return;
}
lettestResult=awaittestApiKey(apiKeyPrompt);
if(testResult===true){
console.log("API key prompt test passed");
apiKeyValid=true;
apiKey=apiKeyPrompt;
break;
}
else{
console.log("API key prompt test failed. Re-prompting...");