Skip to content

Commit

Permalink
[APP-773] Display neturon all amount with token list
Browse files Browse the repository at this point in the history
  • Loading branch information
Kwonhyukjoon committed Jun 5, 2023
1 parent 18a582c commit 7ee6130
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,12 @@ private void onNativeGrpcItem(RecyclerView.ViewHolder viewHolder, ChainConfig ch

BigDecimal totalAmount = BigDecimal.ZERO;
if (asset != null) {
if (asset.origin_denom.equalsIgnoreCase(chainConfig.mainDenom())) {
if (chainConfig.baseChain().equals(NEUTRON_MAIN) || chainConfig.baseChain().equals(NEUTRON_TEST)) {
BigDecimal availableAmount = getBaseDao().getAvailable(chainConfig.mainDenom());
BigDecimal vestingAmount = getBaseDao().getNeutronVestingAmount();
BigDecimal bondAmount = getBaseDao().getVaultAmount();
totalAmount = availableAmount.add(bondAmount).add(vestingAmount);
} else if (asset.origin_denom.equalsIgnoreCase(chainConfig.mainDenom())) {
totalAmount = getBaseDao().getAllMainAsset(chainConfig.mainDenom());
} else {
totalAmount = getBaseDao().getAvailable(asset.origin_denom).add(getBaseDao().getVesting(asset.origin_denom));
Expand Down

0 comments on commit 7ee6130

Please sign in to comment.