diff --git a/starcoin-scan-api/src/main/java/org/starcoin/scan/service/TokenService.java b/starcoin-scan-api/src/main/java/org/starcoin/scan/service/TokenService.java index e01ce06..b1a2083 100644 --- a/starcoin-scan-api/src/main/java/org/starcoin/scan/service/TokenService.java +++ b/starcoin-scan-api/src/main/java/org/starcoin/scan/service/TokenService.java @@ -446,6 +446,7 @@ private Result searchStatistic(SearchResponse searchResponse, St } } result.setContents(statistics); + result.setTotal(searchResponse.getHits().getTotalHits().value); return result; } diff --git a/starcoin-scan-api/src/main/java/org/starcoin/scan/service/TransactionService.java b/starcoin-scan-api/src/main/java/org/starcoin/scan/service/TransactionService.java index 8ed937f..df784ca 100644 --- a/starcoin-scan-api/src/main/java/org/starcoin/scan/service/TransactionService.java +++ b/starcoin-scan-api/src/main/java/org/starcoin/scan/service/TransactionService.java @@ -286,6 +286,7 @@ public Result getTransferCount(String network, String typeTag) { if (aggregation instanceof ParsedValueCount) { tokenTransfer.setTransfers(((ParsedValueCount) aggregation).getValue()); tokenTransfer.setTypeTag(typeTag); + result.setTotal(searchResponse.getHits().getTotalHits().value); result.setContents(Collections.singletonList(tokenTransfer)); } } catch (IOException e) {