From 30d9412d8d98f6f8f7a5a8294a36630906273ab1 Mon Sep 17 00:00:00 2001 From: TheDude Date: Sat, 10 Sep 2022 21:07:50 +0100 Subject: [PATCH] Added decimal places to the token response (#161) Co-authored-by: TheDude --- src/Blockcore.Indexer.Cirrus/Models/QueryStandardToken.cs | 2 ++ src/Blockcore.Indexer.Cirrus/Storage/Mongo/CirrusMongoData.cs | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Blockcore.Indexer.Cirrus/Models/QueryStandardToken.cs b/src/Blockcore.Indexer.Cirrus/Models/QueryStandardToken.cs index 4d029ab3..49b8fcf6 100644 --- a/src/Blockcore.Indexer.Cirrus/Models/QueryStandardToken.cs +++ b/src/Blockcore.Indexer.Cirrus/Models/QueryStandardToken.cs @@ -9,4 +9,6 @@ public class QueryStandardToken public long TotalSupply { get; set; } public string Address { get; set; } public long Amount { get; set; } + + public long Decimals { get; set; } } diff --git a/src/Blockcore.Indexer.Cirrus/Storage/Mongo/CirrusMongoData.cs b/src/Blockcore.Indexer.Cirrus/Storage/Mongo/CirrusMongoData.cs index 4b534af6..16846120 100644 --- a/src/Blockcore.Indexer.Cirrus/Storage/Mongo/CirrusMongoData.cs +++ b/src/Blockcore.Indexer.Cirrus/Storage/Mongo/CirrusMongoData.cs @@ -417,7 +417,8 @@ public async Task> GetStandardTokensForAddressAs Amount = _.AmountChangesHistory.Sum(a => a.Amount), Name = smartContract.Name, Symbol = smartContract.Symbol, - TotalSupply = smartContract.TotalSupply + TotalSupply = smartContract.TotalSupply, + Decimals = smartContract.Decimals }; });