mirror of
				https://github.com/bumi/lnrpc
				synced 2025-11-04 01:40:24 +00:00 
			
		
		
		
	Only load macaroon if file exists
This commit is contained in:
		
							parent
							
								
									7b10b8566d
								
							
						
					
					
						commit
						73e48ba671
					
				@ -40,7 +40,7 @@ module Lnrpc
 | 
			
		||||
        self.credentials = nil
 | 
			
		||||
      end
 | 
			
		||||
 | 
			
		||||
      unless options.has_key?(:macaroon)
 | 
			
		||||
      if !options.has_key?(:macaroon) && File.exists?(::File.expand_path(options[:macaroon_path] || DEFAULT_MACAROON_PATH))
 | 
			
		||||
        options[:macaroon] = ::File.read(::File.expand_path(options[:macaroon_path] || DEFAULT_MACAROON_PATH)).unpack("H*")
 | 
			
		||||
      end
 | 
			
		||||
      self.macaroon = options[:macaroon]
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user