fix: use events for requesting data for new addresses instead of all accounts

This commit is contained in:
Sean Hagstrom 2024-06-28 13:07:03 +01:00
parent c18c731afc
commit 8a7e0f986d
No known key found for this signature in database
GPG Key ID: 5257FEDF56307320
2 changed files with 10 additions and 4 deletions

View File

@ -581,6 +581,12 @@
(into removed-account-addresses old-account-addresses))
(merge updated-accounts-by-address))))}
(seq new-account-addresses)
(assoc :fx refresh-accounts-fx-dispatches))))
(assoc :fx
(->> new-account-addresses
(mapcat (fn [address]
[[:dispatch [:wallet/get-wallet-token-for-account address]]
[:dispatch
[:wallet/request-new-collectibles-for-account-from-signal address]]
[:dispatch [:wallet/check-recent-history-for-account address]]])))))))
(rf/reg-event-fx :wallet/process-keypairs process-keypairs)

View File

@ -169,9 +169,9 @@
:type :seed
:lowest-operability :fully
:accounts [account]}}}}
:fx [[:dispatch [:wallet/get-wallet-token-for-all-accounts]]
[:dispatch [:wallet/request-collectibles-for-all-accounts {:new-request? true}]]
[:dispatch [:wallet/check-recent-history-for-all-accounts]]]})
:fx [[:dispatch [:wallet/get-wallet-token-for-account address]]
[:dispatch [:wallet/request-new-collectibles-for-account-from-signal address]]
[:dispatch [:wallet/check-recent-history-for-account address]]]})
(dispatch [event-id
[{:key-uid keypair-key-uid
:type "seed"