@1sat/permission-module-ui 0.0.16 → 0.0.18
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/index.js +15 -0
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -468,8 +468,23 @@ function summarizeRequest(req) {
|
|
|
468
468
|
if (req.kind === "protocol") {
|
|
469
469
|
return summarizeProtocol(req);
|
|
470
470
|
}
|
|
471
|
+
if (req.kind === "basketAccess") {
|
|
472
|
+
return summarizeBasketAccess(req);
|
|
473
|
+
}
|
|
471
474
|
return summarizeSignature(req);
|
|
472
475
|
}
|
|
476
|
+
function summarizeBasketAccess(req) {
|
|
477
|
+
const intent = req.intent;
|
|
478
|
+
const baskets = intent.baskets ?? [];
|
|
479
|
+
return {
|
|
480
|
+
title: baskets.length === 1 ? "Grant Basket Access" : `Grant Access to ${baskets.length} Baskets`,
|
|
481
|
+
subtitle: `${shortenOriginator(req.originator)} wants to read and write 1Sat baskets`,
|
|
482
|
+
rows: baskets.map((b) => ({
|
|
483
|
+
key: b.basket,
|
|
484
|
+
value: b.description ?? "List, insert, and remove outputs"
|
|
485
|
+
}))
|
|
486
|
+
};
|
|
487
|
+
}
|
|
473
488
|
function tagValue(tags, key) {
|
|
474
489
|
if (!tags)
|
|
475
490
|
return;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@1sat/permission-module-ui",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.18",
|
|
4
4
|
"description": "React component for the 1Sat permission module's prompt UX",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
],
|
|
29
29
|
"license": "MIT",
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@1sat/permission-module": "0.0.
|
|
31
|
+
"@1sat/permission-module": "0.0.21"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
34
|
"react": "^18.0.0 || ^19.0.0"
|