Skip to content

Commit 914271b

Browse files
committed
boltcard detection
1 parent 814464b commit 914271b

File tree

4 files changed

+12
-11
lines changed

4 files changed

+12
-11
lines changed

assets_js_bitrequest_fetchblocks.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@ function process_lightning_payment(rd, api_data, rdo) {
8989
error_default = tl("unabletoconnect"),
9090
tx_hash = rd.txhash,
9191
is_lightning_hash = tx_hash && tx_hash.slice(0, 9) === "lightning";
92-
9392
if (rdo.pending === "scanning") {
9493
$.ajax({
9594
"method": "POST",

assets_js_bitrequest_sockets.js

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -523,12 +523,15 @@ async function process_nfc_payment(proxy_host, proxy_key, payment_id, node_id, i
523523
"boltcard": true,
524524
"x-api": proxy_key
525525
};
526-
const fetch_id = get_request_id();
527-
if (fetch_id) {
528-
update_request({
529-
"requestid": fetch_id,
530-
"boltcard": true
531-
}, false);
526+
if (request_type === "incoming") {
527+
invoice_data.b11 = true;
528+
const fetch_id = get_request_id();
529+
if (fetch_id) {
530+
update_request({
531+
"requestid": fetch_id,
532+
"boltcard": true
533+
}, false);
534+
}
532535
}
533536
$.ajax({
534537
"method": "POST",

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ <h2 class="tl_page4">Accept crypto anywhere</h2>
126126
</div>
127127
</div>
128128
<div class="proceed icon-arrow-right2"></div>
129-
<a href="https://www.bitrequest.io/privacy" target="_blank" id="home_privacy" class="exit">Privacy</a>
129+
<a href="https://www.bitrequest.io/privacy" target="_blank" id="home_privacy" class="exit">Privacy v0.242</a>
130130
</div>
131131
<div id="entername" class="startpanel" data-next="choosecurrency" data-prev="intro">
132132
<div class="panelwrap flex">

proxy/v1/ln/api/index.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -255,14 +255,14 @@
255255

256256
if ($invoice) {
257257
// Store invoice tracking data if bolt11 is requested
258-
if (!empty($pdat["boltcard"])) {
258+
if (!empty($pdat["b11"])) {
259259
$path = "cache/tx/" . $post_pid;
260260
if (file_exists($path)) {
261261
$s_content = [
262262
"pid" => $post_pid,
263263
"rqtype" => "outgoing",
264264
"proxy" => $server_host,
265-
"boltcard" => true,
265+
"boltcard" => isset($_POST["boltcard"]),
266266
"status" => "pending",
267267
"bolt11" => $invoice["bolt11"],
268268
"hash" => $invoice["hash"],
@@ -373,7 +373,6 @@
373373
"pid" => $get_pid,
374374
"rqtype" => $type_text,
375375
"proxy" => $server_host,
376-
"boltcard" => false,
377376
"status" => "pending",
378377
"bolt11" => $pr,
379378
"hash" => $hash,

0 commit comments

Comments
 (0)