public async Task <int> GetDecimals(string tokenScriptHash) { var result = await GetTokenDecimals.SendRequestAsync(tokenScriptHash); if (result.State == "FAULT, BREAK") { throw new RpcResponseException(new RpcError(0, "RPC state response: FAULT, BREAK ")); } return(int.Parse(result.Stack[0].Value.ToString())); }
public async Task <string> GetDecimals() { string decimals = string.Empty; var result = await GetTokenDecimals.SendRequestAsync(); if (result != null) { decimals = result.Stack[0].Value.ToString(); } return(decimals); }
public async Task <string> GetDecimals() { var result = await GetTokenDecimals.SendRequestAsync().ConfigureAwait(false); return(result.Stack[0].Value.ToString()); }