From 29a9f73ffd1e376c8eb9f3987ec7eca6c79fad33 Mon Sep 17 00:00:00 2001 From: leej1012 Date: Tue, 14 Nov 2023 18:11:50 +0800 Subject: [PATCH] Add vmType in getOep4Balance2 --- .../src/main/java/com/github/ontio/model/dto/BalanceDto.java | 5 ++++- .../com/github/ontio/service/impl/AddressServiceImpl.java | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/back-end-projects/Explorer/src/main/java/com/github/ontio/model/dto/BalanceDto.java b/back-end-projects/Explorer/src/main/java/com/github/ontio/model/dto/BalanceDto.java index a63f12b9..0e6c119f 100644 --- a/back-end-projects/Explorer/src/main/java/com/github/ontio/model/dto/BalanceDto.java +++ b/back-end-projects/Explorer/src/main/java/com/github/ontio/model/dto/BalanceDto.java @@ -24,11 +24,14 @@ public class BalanceDto { private String contractHash; + private String vmType; + @Builder - public BalanceDto(BigDecimal balance, String assetName, String assetType, String contractHash) { + public BalanceDto(BigDecimal balance, String assetName, String assetType, String contractHash, String vmType) { this.balance = balance; this.assetName = assetName; this.assetType = assetType; this.contractHash = contractHash; + this.vmType = vmType; } } diff --git a/back-end-projects/Explorer/src/main/java/com/github/ontio/service/impl/AddressServiceImpl.java b/back-end-projects/Explorer/src/main/java/com/github/ontio/service/impl/AddressServiceImpl.java index 018c05da..af013b32 100644 --- a/back-end-projects/Explorer/src/main/java/com/github/ontio/service/impl/AddressServiceImpl.java +++ b/back-end-projects/Explorer/src/main/java/com/github/ontio/service/impl/AddressServiceImpl.java @@ -608,6 +608,7 @@ private List getOep4Balance2(String address, Oep4 oep4) { .assetType(ConstantParam.ASSET_TYPE_OEP4) .balance(balance) .contractHash(oep4.getContractHash()) + .vmType(oep4.getVmCategory()) .build(); balanceList.add(balanceDto); return balanceList;