From aba3e2f5f34cef3da99916181fb921d0d91bf5a3 Mon Sep 17 00:00:00 2001 From: Esteban Date: Tue, 19 Mar 2024 12:15:18 -0400 Subject: [PATCH] nano alias --- index.html | 26 +++++++++++++------------- latest.js | 4 +++- 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/index.html b/index.html index 9dcde11..b41b781 100644 --- a/index.html +++ b/index.html @@ -460,20 +460,20 @@

NanoPay.js

setTimeout(() => { NanoPay.open({ - address: '@development', // required + alias: true, // required // amount: 30, // required - notify: 'support@nano.to', - contact: true, - // random: false, - strings: { - email_placeholder: 'Required *', - shipping_placeholder: 'Required *', - }, - line_items: [ - { name: "Shirt (X-Small)", price: 0.122 }, - { name: "Mens Shoes (9.5)", price: 0 } - ], - shipping: 0.011, + // notify: 'support@nano.to', + // contact: true, + // // random: false, + // strings: { + // email_placeholder: 'Required *', + // shipping_placeholder: 'Required *', + // }, + // line_items: [ + // { name: "Shirt (X-Small)", price: 0.122 }, + // { name: "Mens Shoes (9.5)", price: 0 } + // ], + // shipping: 0.011, // currency: 'EUR', success: (block) => { document.getElementById('success').innerText = 'Success' diff --git a/latest.js b/latest.js index cd4f672..788a79f 100644 --- a/latest.js +++ b/latest.js @@ -722,7 +722,9 @@ }) } - if (rpc_checkout && rpc_checkout.id) localStorage.setItem('NanoPayCheckoutId', rpc_checkout.id) + // needs more testing + // goal is to prevent un-intentional browser refresh from breaking checkout flow + // if (rpc_checkout && rpc_checkout.id) localStorage.setItem('NanoPayCheckoutId', rpc_checkout.id) }