lnbits / lnurlp

MIT License
9 stars 8 forks source link

fix possible duplicate lnaddress when update pay link #8

Closed Bashy closed 1 year ago

Bashy commented 1 year ago

Addressing issue #7 ,

  1. if "lnaddress" in kwargs was never True since lnaddress is not a part of the schema, username is though always present

    • with an empty string when there's no lnaddress bound to the pay link
    • with username part of the lnaddress with a lnaddress is bind to the pay link
    • and check_lnaddress_update(username: str, id: str) was thus never triggered
  2. check_lnaddress_update(username: str, id: str) doesn't make sense since id is not changed during the update, and the couple username and id is expected to be always unique.