public static async Task <ApiResponse> BackupWallet(string filePath) { ApiResponse response = new ApiResponse(); try { WalletManagement management = new WalletManagement(); await management.BackupWallet(filePath); } catch (ApiCustomException ex) { Logger.Singleton.Error(ex.Message); response.Error = new ApiError(ex.ErrorCode, ex.Message); } catch (Exception ex) { Logger.Singleton.Error(ex.Message); response.Error = new ApiError(ex.HResult, ex.Message); } return(response); }
public async Task BackupWallet() { WalletManagement management = new WalletManagement(); await management.BackupWallet("D:\\wallet.dat"); }