Skip to content

Commit

Permalink
fix for account re-activation (#684)
Browse files Browse the repository at this point in the history
  • Loading branch information
muhamadazmy authored Apr 25, 2023
1 parent 9583031 commit f35e342
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion clients/tfchain-client-go/account.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,11 @@ func (s *Substrate) EnsureAccount(identity Identity, activationURL, termsAndCond
// then we activate the account.
if errors.Is(err, ErrAccountNotFound) || info.Data.Free.Cmp(reactivateAt) <= 0 {
// account activation
log.Info().Uint64("funds", info.Data.Free.Uint64()).Str("account", identity.Address()).Msg("activating account")
var free uint64
if info.Data.Free.Int != nil {
free = info.Data.Free.Uint64()
}
log.Info().Uint64("funds", free).Str("account", identity.Address()).Msg("activating account")
if err = s.activateAccount(identity, activationURL); err != nil {
return
}
Expand Down

0 comments on commit f35e342

Please sign in to comment.