Skip to content

Commit

Permalink
Merge pull request #1542 from input-output-hk/feat/lw-11530-initializ…
Browse files Browse the repository at this point in the history
…e-drep-provider

Explain why it is not necessary to call setStatInitialized() for TrackedDrepProvider.
  • Loading branch information
rhyslbw authored Dec 6, 2024
2 parents 05bf34c + d27dab2 commit f56823d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/wallet/src/Wallets/BaseWallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -525,6 +525,10 @@ export class BaseWallet implements ObservableWallet {
utxoProvider: this.utxoProvider
});

// When the rewardAccounts delegation tracker is initialized, it will invoke drepInfo$
// with an empty array, since there aren't any drepDelegatees yet.
// This will not perform network requests, but will initialize the TrackedDrepProvider.
// For this reason, we do not have to explicitly call this.drepProvider.setStatInitialized
const drepInfo$ = createDrepInfoColdObservable({
drepProvider: this.drepProvider,
logger: contextLogger(this.#logger, 'drepInfo$'),
Expand Down

0 comments on commit f56823d

Please sign in to comment.