fix txConfirmed type
This commit is contained in:
		
							parent
							
								
									9d4b58604b
								
							
						
					
					
						commit
						8b1dff6d15
					
				@ -6,7 +6,7 @@ export interface WebsocketResponse {
 | 
			
		||||
  block?: BlockExtended;
 | 
			
		||||
  blocks?: BlockExtended[];
 | 
			
		||||
  conversions?: any;
 | 
			
		||||
  txConfirmed?: string | boolean;
 | 
			
		||||
  txConfirmed?: string;
 | 
			
		||||
  historicalDate?: string;
 | 
			
		||||
  mempoolInfo?: MempoolInfo;
 | 
			
		||||
  vBytesPerSecond?: number;
 | 
			
		||||
 | 
			
		||||
@ -92,7 +92,7 @@ export class StateService {
 | 
			
		||||
 | 
			
		||||
  networkChanged$ = new ReplaySubject<string>(1);
 | 
			
		||||
  lightningChanged$ = new ReplaySubject<boolean>(1);
 | 
			
		||||
  blocks$: ReplaySubject<[BlockExtended, string | boolean]>;
 | 
			
		||||
  blocks$: ReplaySubject<[BlockExtended, string]>;
 | 
			
		||||
  transactions$ = new ReplaySubject<TransactionStripped>(6);
 | 
			
		||||
  conversions$ = new ReplaySubject<any>(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') {
 | 
			
		||||
      this.network = this.env.BASE_MODULE;
 | 
			
		||||
 | 
			
		||||
@ -241,7 +241,7 @@ export class WebsocketService {
 | 
			
		||||
      blocks.forEach((block: BlockExtended) => {
 | 
			
		||||
        if (block.height > this.stateService.latestBlockHeight) {
 | 
			
		||||
          maxHeight = Math.max(maxHeight, block.height);
 | 
			
		||||
          this.stateService.blocks$.next([block, false]);
 | 
			
		||||
          this.stateService.blocks$.next([block, '']);
 | 
			
		||||
        }
 | 
			
		||||
      });
 | 
			
		||||
      this.stateService.updateChainTip(maxHeight);
 | 
			
		||||
@ -258,7 +258,7 @@ export class WebsocketService {
 | 
			
		||||
    if (response.block) {
 | 
			
		||||
      if (response.block.height > this.stateService.latestBlockHeight) {
 | 
			
		||||
        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) {
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user