wallet-connect-button-react 1.1.1 → 1.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/WalletConnectButton.d.ts +2 -2
- package/dist/index.esm.js +5 -3
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +5 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -532,7 +532,7 @@ function useSearchParams() {
|
|
|
532
532
|
|
|
533
533
|
function WalletConnectButton(_a) {
|
|
534
534
|
var _this = this;
|
|
535
|
-
var
|
|
535
|
+
var label = _a.label, clientId = _a.clientId, onSuccess = _a.onSuccess, apiKey = _a.apiKey, walletConnectHost = _a.walletConnectHost, lang = _a.lang;
|
|
536
536
|
var _b = useSearchParams(), searchParams = _b[0], setSearchParams = _b[1], removeSearchParam = _b[2];
|
|
537
537
|
var _c = require$$0.useState(false), loading = _c[0], setLoading = _c[1];
|
|
538
538
|
var _d = require$$0.useState(null), error = _d[0], setError = _d[1];
|
|
@@ -608,8 +608,10 @@ function WalletConnectButton(_a) {
|
|
|
608
608
|
console.log("Disclosed attributes:", data);
|
|
609
609
|
// Extract age_over_18 from nested response structure
|
|
610
610
|
onSuccess(data);
|
|
611
|
-
// Remove session_token from URL after successful retrieval
|
|
611
|
+
// Remove session_token and nonce from URL after successful retrieval
|
|
612
612
|
removeSearchParam('session_token');
|
|
613
|
+
if (nonce)
|
|
614
|
+
removeSearchParam('nonce');
|
|
613
615
|
setLoading(false);
|
|
614
616
|
})
|
|
615
617
|
.catch(function (error) {
|
|
@@ -628,7 +630,7 @@ function WalletConnectButton(_a) {
|
|
|
628
630
|
if (error) {
|
|
629
631
|
return (jsxRuntimeExports.jsx("div", { className: "attributes", children: jsxRuntimeExports.jsxs("div", { className: "verification-card", children: [jsxRuntimeExports.jsx("h2", { children: "Error" }), jsxRuntimeExports.jsxs("p", { children: ["An error occurred while verifying your attributes: ", error] })] }) }));
|
|
630
632
|
}
|
|
631
|
-
return (jsxRuntimeExports.jsx("nl-wallet-button", { ref: buttonRef, text:
|
|
633
|
+
return (jsxRuntimeExports.jsx("nl-wallet-button", { ref: buttonRef, text: label, usecase: clientId, "start-url": "".concat(walletConnectHost || "https://wallet-connect.eu", "/api/create-session?lang=en&return_url=").concat(encodeURIComponent(window.location.href)), lang: lang || "nl" }));
|
|
632
634
|
}
|
|
633
635
|
|
|
634
636
|
var nlWalletWeb$1 = {};
|