public async Task <Block> GetLastBlock() { Block block; try { block = await BlockchainDataProvider.GetLastBlock(); } catch (Exception ex) { _log.LogError(ex.Message); return(null); } return(block); }
public async Task <Block> GetLastBlock() { Block block; try { block = await BlockchainDataProvider.GetLastBlock(); } catch (Exception ex) { await Log.WriteError(this.GetType().ToString(), "GetLastBlock", $"last_block", ex, DateTime.Now); return(null); } return(block); }
public async Task <AssetOwners> GetAssetOwners(string id) { AssetOwners assetOwner; try { var lastBlock = await BlockchainDataProvider.GetLastBlock(); assetOwner = await AssetRepository.GetAssetOwners(id); assetOwner.BlockHeight = lastBlock.Height; } catch (Exception ex) { await Log.WriteError(this.GetType().ToString(), "GetAssetOwners", $"asset_id{id}", ex, DateTime.Now); return(null); } return(assetOwner); }