Fix duplicate CLN error
This commit is contained in:
		
							parent
							
								
									2051dd0e88
								
							
						
					
					
						commit
						8ea4d0c8a7
					
				@ -61,9 +61,7 @@ export const server = {
 | 
			
		||||
    { socket, rune, cert },
 | 
			
		||||
    { me, models, addWalletLog, cln: { createInvoice } }
 | 
			
		||||
  ) => {
 | 
			
		||||
    try {
 | 
			
		||||
    cert = ensureB64(cert)
 | 
			
		||||
 | 
			
		||||
    const inv = await createInvoice({
 | 
			
		||||
      socket,
 | 
			
		||||
      rune,
 | 
			
		||||
@ -74,11 +72,6 @@ export const server = {
 | 
			
		||||
    })
 | 
			
		||||
    await addWalletLog({ wallet: { type: 'CLN' }, level: 'SUCCESS', message: 'connected to CLN' }, { me, models })
 | 
			
		||||
    return inv
 | 
			
		||||
    } catch (err) {
 | 
			
		||||
      const details = err.details || err.message || err.toString?.()
 | 
			
		||||
      await addWalletLog({ wallet: { type: 'CLN' }, level: 'ERROR', message: `could not connect to CLN: ${details}` }, { me, models })
 | 
			
		||||
      throw err
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  createInvoice: async (
 | 
			
		||||
    { amount },
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user