mirror of
https://github.com/mempool/mempool.git
synced 2025-03-03 17:47:01 +01:00
fix txConfirmed type
This commit is contained in:
parent
9d4b58604b
commit
8b1dff6d15
3 changed files with 5 additions and 5 deletions
|
@ -6,7 +6,7 @@ export interface WebsocketResponse {
|
||||||
block?: BlockExtended;
|
block?: BlockExtended;
|
||||||
blocks?: BlockExtended[];
|
blocks?: BlockExtended[];
|
||||||
conversions?: any;
|
conversions?: any;
|
||||||
txConfirmed?: string | boolean;
|
txConfirmed?: string;
|
||||||
historicalDate?: string;
|
historicalDate?: string;
|
||||||
mempoolInfo?: MempoolInfo;
|
mempoolInfo?: MempoolInfo;
|
||||||
vBytesPerSecond?: number;
|
vBytesPerSecond?: number;
|
||||||
|
|
|
@ -92,7 +92,7 @@ export class StateService {
|
||||||
|
|
||||||
networkChanged$ = new ReplaySubject<string>(1);
|
networkChanged$ = new ReplaySubject<string>(1);
|
||||||
lightningChanged$ = new ReplaySubject<boolean>(1);
|
lightningChanged$ = new ReplaySubject<boolean>(1);
|
||||||
blocks$: ReplaySubject<[BlockExtended, string | boolean]>;
|
blocks$: ReplaySubject<[BlockExtended, string]>;
|
||||||
transactions$ = new ReplaySubject<TransactionStripped>(6);
|
transactions$ = new ReplaySubject<TransactionStripped>(6);
|
||||||
conversions$ = new ReplaySubject<any>(1);
|
conversions$ = new ReplaySubject<any>(1);
|
||||||
bsqPrice$ = new ReplaySubject<number>(1);
|
bsqPrice$ = new ReplaySubject<number>(1);
|
||||||
|
@ -163,7 +163,7 @@ export class StateService {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
this.blocks$ = new ReplaySubject<[BlockExtended, boolean]>(this.env.KEEP_BLOCKS_AMOUNT);
|
this.blocks$ = new ReplaySubject<[BlockExtended, string]>(this.env.KEEP_BLOCKS_AMOUNT);
|
||||||
|
|
||||||
if (this.env.BASE_MODULE === 'bisq') {
|
if (this.env.BASE_MODULE === 'bisq') {
|
||||||
this.network = this.env.BASE_MODULE;
|
this.network = this.env.BASE_MODULE;
|
||||||
|
|
|
@ -241,7 +241,7 @@ export class WebsocketService {
|
||||||
blocks.forEach((block: BlockExtended) => {
|
blocks.forEach((block: BlockExtended) => {
|
||||||
if (block.height > this.stateService.latestBlockHeight) {
|
if (block.height > this.stateService.latestBlockHeight) {
|
||||||
maxHeight = Math.max(maxHeight, block.height);
|
maxHeight = Math.max(maxHeight, block.height);
|
||||||
this.stateService.blocks$.next([block, false]);
|
this.stateService.blocks$.next([block, '']);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.stateService.updateChainTip(maxHeight);
|
this.stateService.updateChainTip(maxHeight);
|
||||||
|
@ -258,7 +258,7 @@ export class WebsocketService {
|
||||||
if (response.block) {
|
if (response.block) {
|
||||||
if (response.block.height > this.stateService.latestBlockHeight) {
|
if (response.block.height > this.stateService.latestBlockHeight) {
|
||||||
this.stateService.updateChainTip(response.block.height);
|
this.stateService.updateChainTip(response.block.height);
|
||||||
this.stateService.blocks$.next([response.block, response.txConfirmed]);
|
this.stateService.blocks$.next([response.block, response.txConfirmed || '']);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (response.txConfirmed) {
|
if (response.txConfirmed) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue