public async Task <long> TokenBalance(ContractToken token, string address) { long balance = -1; if (walletConfiguration.IsConfigured()) { EthWalletService wallet = new EthWalletService(walletConfiguration, tokenRegistryService, accountRegistryService); balance = Convert.ToInt64(await wallet.GetTokenBalance(token, address)); } return(balance); }
public async Task <decimal> EthBalance(string address) { decimal balance = -1; if (walletConfiguration.IsConfigured()) { EthWalletService wallet = new EthWalletService(walletConfiguration, tokenRegistryService, accountRegistryService); balance = Convert.ToDecimal(await wallet.GetEthBalance(address)); } return(balance); }