Skip to content

Commit

Permalink
Merge pull request #18 from hax0rbana-adam/basic-fixes
Browse files Browse the repository at this point in the history
Fixed integration with lnbits to create a lightning wallet
  • Loading branch information
supertestnet authored Nov 6, 2023
2 parents d485368 + b13769e commit b23b084
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -660,7 +660,8 @@
}
async function makeLNWallet( identifier ) {
identifier = identifier.substring( 0, 15 );
var mywallet = await getData( "https://legend.lnbits.com/wallet?nme=" + identifier );
var myaccount = JSON.parse(await postData( "https://legend.lnbits.com/api/v1/account", '{"name":"'+identifier+'"}', content_type = "application/json"))
var mywallet = await getData( "https://legend.lnbits.com/wallet?usr="+myaccount["user"]+"&wal="+myaccount["id"]);
var key1prep = mywallet.split( "Wallet ID:" );
wallet_id = key1prep[ 1 ].substring( 14, 46 );
var key2prep = mywallet.split( "Admin key:" );
Expand Down

0 comments on commit b23b084

Please sign in to comment.