@nibgate/sdk 0.2.33 → 0.2.34

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nibgate/sdk",
3
- "version": "0.2.33",
3
+ "version": "0.2.34",
4
4
  "description": "Framework-agnostic browser and server package for creator-owned gated content, unlock events, and receipts.",
5
5
  "type": "module",
6
6
  "sideEffects": [
@@ -214,7 +214,9 @@ export function renderDefaultUnlockUI(container, resource, options = {}) {
214
214
  }
215
215
 
216
216
  label.addEventListener('click', (e) => {
217
- if (!ctrl.getWalletAddress()) {
217
+ if (e.target.dataset.nibgateDisconnect !== undefined) {
218
+ ctrl.disconnect().then(updateLabel);
219
+ } else if (!ctrl.getWalletAddress()) {
218
220
  ctrl.connect().then(updateLabel).catch(() => updateLabel());
219
221
  }
220
222
  });