addr_idx += 1;
addr_ty_table += "<div class='address-card'>" + value + "</div>";
};
+ var res = "<h2>It works!</h2>" + name + " was successfully resolved to the following addresses.<br>Your wallet should have automatically opened to pay, but if not, <a href=\"" + bip353 + "\">click here to do so.</a>";
if (base_and_params[0].length != 0) {
- push_table_entry("On-Chain Non-Private Address", "", base_and_params[0]);
+ if (base_and_params[0].startsWith("sp1q")) {
+ res += "<br>Note: the response included a Silent Payment address which was encoded in the \"body\" position in the URI (i.e. <span class='mono'>bitcoin:sp1q...</span>) rather than in the \"sp\" query parameter (i.e. <span class='mono'>bitcoin:?sp=sp1q...</span>). This is incorrect and may cause some wallets to fail to pay on-chain.";
+ push_table_entry("On-Chain Silent Payment", "", base_and_params[0]);
+ } else {
+ push_table_entry("On-Chain Non-Private Address", "", base_and_params[0]);
+ }
}
if (base_and_params.length > 1 && base_and_params[1].length > 0) {
for (const param of base_and_params[1].split("&")) {
}
}
}
- var res = "<h2>It works!</h2>" + name + " was successfully resolved to the following addresses.<br>Your wallet should have automatically opened to pay, but if not, <a href=\"" + bip353 + "\">click here to do so.</a>";
if (addr_ty_table != "") {
res += "<br>" + addr_ty_table;
}