private static async Task <InMemWallet> RestoreSenderWalletAsync() { var result = new InMemWallet(); var restore_result_code = await result.RestoreAsync(Config.NetworkId, Config.NodeURL, Config.SenderPrivateKey); if (restore_result_code != APIResultCodes.Success) { throw new Exception("Could not restore sender_wallet"); } return(result); }
private static async Task <APIResultCodes> SyncReceiveWalletAsync(string recipient_private_key, ILogger logger) { var result = new InMemWallet(); var restore_result_code = await result.RestoreAsync(Config.NetworkId, Config.NodeURL, recipient_private_key); if (restore_result_code == APIResultCodes.Success) { var balance = result.Wallet.BaseBalance; var log_message = $"Receive wallet balance: {balance}"; Console.WriteLine(log_message); logger.LogInformation(log_message); } return(restore_result_code); }