Skip to content
This repository has been archived by the owner on Nov 14, 2023. It is now read-only.

Commit

Permalink
Merge pull request #219 from irisnet/develop
Browse files Browse the repository at this point in the history
R4R: merge to master
  • Loading branch information
kaifei Hu authored Jul 2, 2020
2 parents 4860445 + 607e914 commit 5b0d719
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion service/handler/account.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"github.com/irisnet/irishub-sync/util/helper"
)

// TODO: sync only save account address, let app to update balance, delegation, unbondingDelegation info
func SaveOrUpdateAccountBalanceInfo(accounts []string, height, timestamp int64) {
var (
accountModel document.Account
Expand All @@ -33,7 +34,8 @@ func SaveOrUpdateAccountDelegationInfo(docTx document.CommonTx) {
accountModel document.Account
)
switch docTx.Type {
case constant.TxTypeStakeDelegate, constant.TxTypeStakeBeginUnbonding, constant.TxTypeBeginRedelegate:
case constant.TxTypeStakeDelegate, constant.TxTypeStakeBeginUnbonding, constant.TxTypeBeginRedelegate,
constant.TxTypeStakeCreateValidator:
delegator = docTx.From
}
if delegator == "" {
Expand Down

0 comments on commit 5b0d719

Please sign in to comment.