Skip to content

Commit

Permalink
[DDW-419] Optimized wallet data polling
Browse files Browse the repository at this point in the history
  • Loading branch information
nikolaglumac committed Oct 16, 2020
1 parent 836e5cc commit a233cc5
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Changelog

### Chores

- Optimized wallet data polling ([PR 2208](https://github.com/input-output-hk/daedalus/pull/2208))
- Updated `cardano-launcher` to version `0.20201014.0` ([PR 2205](https://github.com/input-output-hk/daedalus/pull/2205))
- Updated `cardano-wallet` to version `2020-10-13` ([PR 2205](https://github.com/input-output-hk/daedalus/pull/2205))
- Update Nix installation instructions ([PR 2200](https://github.com/input-output-hk/daedalus/pull/2200))
Expand Down
4 changes: 2 additions & 2 deletions source/renderer/app/stores/AddressesStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ export default class AddressesStore extends Store {

@action _refreshAddresses = () => {
if (this.stores.networkStatus.isConnected) {
const { all } = this.stores.wallets;
for (const wallet of all) {
const wallet = this.stores.wallets.active;
if (wallet) {
const { id: walletId, isLegacy } = wallet;
const allRequest = this._getAddressesAllRequest(walletId);
allRequest.invalidate({ immediately: false });
Expand Down
4 changes: 2 additions & 2 deletions source/renderer/app/stores/TransactionsStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,8 @@ export default class TransactionsStore extends Store {

@action _refreshTransactionData = async () => {
if (this.stores.networkStatus.isConnected) {
const { all: wallets } = this.stores.wallets;
for (const wallet of wallets) {
const wallet = this.stores.wallets.active;
if (wallet) {
const recentRequest = this._getTransactionsRecentRequest(wallet.id);
recentRequest.execute({
walletId: wallet.id,
Expand Down
1 change: 1 addition & 0 deletions source/renderer/app/stores/WalletsStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -1015,6 +1015,7 @@ export default class WalletsStore extends Store {
this.stores.addresses.lastGeneratedAddress = null;
if (this.active) {
this.activeValue = formattedWalletAmount(this.active.amount);
this.refreshWalletsData();
}
} else if (hasActiveWalletBeenUpdated) {
// Active wallet has been updated
Expand Down

0 comments on commit a233cc5

Please sign in to comment.