Skip to content

Commit

Permalink
Fixed typo
Browse files Browse the repository at this point in the history
  • Loading branch information
adi2011 authored and rustyrussell committed Aug 18, 2021
1 parent 9a69e1f commit eb34ad4
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions javascript/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -381,8 +381,11 @@ function decode(paymentReq){
tags.push(Buffer.concat([Buffer.from(tlvs.slice(0,2)),tlvs[2]]).toString('hex'));
}
final['offer_id']=merkle_calc(tags);
if(!'discription' in fin_content ||!'node_id' in fin_content){
throw Error('missing'+ !'discription' in fin_content?' discription':'' + !'node_id' in fin_content?' node_id':''+'!')
if(!('description' in fin_content)){
throw Error('missing description')
}
if(!('node_id' in fin_content)){
throw Error('missing node_id')
}
final['valid']='true'
if('signature' in fin_content){
Expand All @@ -401,6 +404,8 @@ function decode(paymentReq){

return final;
}
console.log(decode('lno1pqpq86q2fgcnqvpsd4ekzapqv4mx2uneyqcnqgryv9uhxtpqveex7mfqxyk55ctw95erqv339ss8qcteyqcksu3qvfjkvmmjv5s8gmeqxcczqum9vdhkuernypkxzar9zsg8yatnw3ujumm6d3skyuewdaexwxszqy9pcpgptlhxvqq7yp9e58aguqr0rcun0ajlvmzq3ek63cw2w282gv3z5uupmuwvgjtq2sqxqqqquyqq8ncyph3h0xskvfd69nppz2py2nxym7rlq255z4mevv5x7vqh077n792e3gcua5p734l7d2r0x7kat69gx6c3twqexgmplmmjz2tv9hne4j5s'));

function get_recurrence(address){
let decoded=decode(address);
if (!'recurrence' in decoded['contents']){
Expand Down

0 comments on commit eb34ad4

Please sign in to comment.