public NxtConnector(IServiceFactory serviceFactory, string walletfile, int confirmations) { accountService = serviceFactory.CreateAccountService(); blockService = serviceFactory.CreateBlockService(); serverInfoService = serviceFactory.CreateServerInfoService(); this.confirmations = confirmations; wallet = InitWallet(walletfile); }
private NxtWalletDb InitWallet(string walletfile) { var wallet = new NxtWalletDb(walletfile); if (wallet.IsInitialized()) { return(wallet); } var blockchainStatus = serverInfoService.GetBlockchainStatus().Result; wallet.Init(blockchainStatus.LastBlockId); return(wallet); }