Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | 43x 43x 43x 43x 43x | import { EMPTY, combineLatest, map } from 'rxjs';
import { InMemoryDocumentStore } from './InMemoryDocumentStore';
import { StakeSummary, SupplySummary } from '@cardano-sdk/core';
import { SupplyDistributionStores } from '../types';
export class InMemoryStakeSummaryStore extends InMemoryDocumentStore<StakeSummary> {}
export class InMemorySupplySummaryStore extends InMemoryDocumentStore<SupplySummary> {}
export const createInMemorySupplyDistributionStores = (): SupplyDistributionStores => ({
destroy() {
Iif (!this.destroyed) {
this.destroyed = true;
return combineLatest([this.stake.destroy(), this.lovelaceSupply.destroy()]).pipe(map(() => void 0));
}
return EMPTY;
},
destroyed: false,
lovelaceSupply: new InMemorySupplySummaryStore(),
stake: new InMemoryStakeSummaryStore()
});
|