Fix/wallet watcher panic (#3940)

* fix wallet watcher panic

* bump version
This commit is contained in:
frank 2023-08-24 10:57:10 +08:00 committed by GitHub
parent d900974519
commit 22cd90e878
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -1 +1 @@
0.165.0 0.165.1

View File

@ -180,7 +180,7 @@ func (s *Service) StartWalletWatcher() {
} }
return return
case event := <-events: case event := <-events:
if event.Type == transfer.EventNewTransfers && len(maxKnownBlocks) > 0 { if event.Type == transfer.EventNewTransfers && len(maxKnownBlocks) > 0 && event.BlockNumber != nil {
newBlocks := false newBlocks := false
for _, address := range event.Accounts { for _, address := range event.Accounts {
if _, ok := maxKnownBlocks[address]; !ok { if _, ok := maxKnownBlocks[address]; !ok {