Verify invoice amount in lightning address withdrawal (#501)
* Verify invoice amount in lightning address withdrawal * Add benthecarman to contributors.txt
This commit is contained in:
		
							parent
							
								
									dde82e25a5
								
							
						
					
					
						commit
						a14341c742
					
				@ -336,6 +336,9 @@ export default {
 | 
				
			|||||||
        throw new Error('description hash does not match')
 | 
					        throw new Error('description hash does not match')
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      if (!decoded.mtokens || BigInt(decoded.mtokens) !== BigInt(milliamount)) {
 | 
				
			||||||
 | 
					        throw new Error('invoice has incorrect amount')
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
      // take pr and createWithdrawl
 | 
					      // take pr and createWithdrawl
 | 
				
			||||||
      return await createWithdrawal(parent, { invoice: res2.pr, maxFee }, { me, models, lnd })
 | 
					      return await createWithdrawal(parent, { invoice: res2.pr, maxFee }, { me, models, lnd })
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
				
			|||||||
@ -4,3 +4,4 @@ ekzyis
 | 
				
			|||||||
WeAreAllSatoshi
 | 
					WeAreAllSatoshi
 | 
				
			||||||
rleed
 | 
					rleed
 | 
				
			||||||
bitcoinplebdev
 | 
					bitcoinplebdev
 | 
				
			||||||
 | 
					benthecarman
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user