fix(community_tokens): ignore wallet events from watch only accounts
Fixes #13407
This commit is contained in:
parent
b623c8fb2b
commit
5b8f37cba2
|
@ -334,6 +334,12 @@ QtObject:
|
|||
try:
|
||||
let dataMessageJson = parseJson(jsonMessage)
|
||||
let tokenDataPayload = fromJson(dataMessageJson, CommunityCollectiblesReceivedPayload)
|
||||
|
||||
let watchOnlyAccounts = self.walletAccountService.getWatchOnlyAccounts()
|
||||
if any(watchOnlyAccounts, proc (x: WalletAccountDto): bool = x.address == accounts[0]):
|
||||
# skip events on watch-only accounts
|
||||
return
|
||||
|
||||
for coll in tokenDataPayload.collectibles:
|
||||
if not coll.communityData.isSome():
|
||||
continue
|
||||
|
@ -406,6 +412,11 @@ QtObject:
|
|||
if len(tokenDataPayload.communityId) == 0:
|
||||
return
|
||||
|
||||
let watchOnlyAccounts = self.walletAccountService.getWatchOnlyAccounts()
|
||||
if any(watchOnlyAccounts, proc (x: WalletAccountDto): bool = x.address == accounts[0]):
|
||||
# skip events on watch-only accounts
|
||||
return
|
||||
|
||||
var accountName, accountAddress: string
|
||||
if len(accounts) > 0:
|
||||
accountAddress = accounts[0]
|
||||
|
|
Loading…
Reference in New Issue