[rpc] Fix an rpc endpoint bug (#3741)

pull/3744/head v4.1.1
Jacky Wang 3 years ago committed by GitHub
parent c005b3b002
commit 99334272e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      rpc/staking.go

@ -601,7 +601,7 @@ func (s *PublicStakingService) GetDelegationsByValidator(
delAddr, _ := internal_common.AddressToBech32(delegation.DelegatorAddress)
// Skip delegations with zero amount and empty undelegation
if delegation.Amount.Cmp(common.Big0) == 0 || len(undelegations) == 0 {
if delegation.Amount.Cmp(common.Big0) == 0 && len(undelegations) == 0 {
continue
}

Loading…
Cancel
Save