Send empty list of transactions if data isn't available yet
This commit is contained in:
		
							parent
							
								
									967a2a4461
								
							
						
					
					
						commit
						ebda00dc74
					
				@ -116,12 +116,10 @@ class WebsocketHandler {
 | 
			
		||||
              const index = parsedMessage['track-mempool-block'];
 | 
			
		||||
              client['track-mempool-block'] = index;
 | 
			
		||||
              const mBlocksWithTransactions = mempoolBlocks.getMempoolBlocksWithTransactions();
 | 
			
		||||
              if (mBlocksWithTransactions[index]) {
 | 
			
		||||
              response['projected-block-transactions'] = {
 | 
			
		||||
                index: index,
 | 
			
		||||
                  blockTransactions: mBlocksWithTransactions[index].transactions
 | 
			
		||||
                blockTransactions: mBlocksWithTransactions[index]?.transactions || [],
 | 
			
		||||
              };
 | 
			
		||||
              }
 | 
			
		||||
            } else {
 | 
			
		||||
              client['track-mempool-block'] = null;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user