From f0892ce9342a9ab5bf6d338a625d3587e9c14f4e Mon Sep 17 00:00:00 2001 From: Zahary Karadjov Date: Mon, 12 Oct 2020 22:58:09 +0300 Subject: [PATCH] Fix compilation problems on Windows --- beacon_chain/keystore_management.nim | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/beacon_chain/keystore_management.nim b/beacon_chain/keystore_management.nim index 56bf2d2db..0ca21b741 100644 --- a/beacon_chain/keystore_management.nim +++ b/beacon_chain/keystore_management.nim @@ -606,7 +606,8 @@ proc pickPasswordAndSaveWallet(rng: var BrHmacDrbgContext, return ok WalletPathPair(wallet: wallet, path: outWalletFile) when defined(windows): - proc clearScreen() {.importc("clrscr"), header: "conio.h".} + proc clearScreen = + discard execShellCmd("cls") else: template clearScreen = echo "\e[1;1H\e[2J\e[3J" @@ -654,7 +655,7 @@ proc createWalletInteractively*( echoP "Press any key to continue." try: - discard stdin.readChar() + discard getch() except IOError as err: fatal "Failed to read a key from stdin", err = err.msg quit 1