[esplora] initialize default socket config to axiosConfigWithUnixSocket
This commit is contained in:
		
							parent
							
								
									44a0913b81
								
							
						
					
					
						commit
						b6f1fd5a4a
					
				@ -23,6 +23,10 @@ class ElectrsApi implements AbstractBitcoinApi {
 | 
			
		||||
  unixSocketRetryTimeout;
 | 
			
		||||
  activeAxiosConfig;
 | 
			
		||||
 | 
			
		||||
  constructor() {
 | 
			
		||||
    this.activeAxiosConfig = this.axiosConfigWithUnixSocket;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  fallbackToTcpSocket() {
 | 
			
		||||
    if (!this.unixSocketRetryTimeout) {
 | 
			
		||||
      logger.err(`Unable to connect to esplora unix socket. Falling back to tcp socket. Retrying unix socket in ${config.ESPLORA.RETRY_UNIX_SOCKET_AFTER} seconds`);
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user