Skip to content

Commit

Permalink
update rm vc msg
Browse files Browse the repository at this point in the history
  • Loading branch information
lukachi committed Feb 8, 2024
1 parent 225ba9a commit 4b46d40
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 6 deletions.
2 changes: 1 addition & 1 deletion packages/snap/snap.manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/rarimo/rarime.git"
},
"source": {
"shasum": "GXjkIUlw10uOTKYgvXjwAgAfyxq3NCnwNlQN/ITO7mU=",
"shasum": "gyaXRe+EzX9rFKfg0ApqQCMROn3lowG5zVyBMkvUuwc=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
24 changes: 19 additions & 5 deletions packages/snap/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
// eslint-disable-next-line import/no-unassigned-import
import './polyfill';
import { copyable, divider, heading, panel, text } from '@metamask/snaps-sdk';
import {
copyable,
divider,
heading,
panel,
text,
Component,
} from '@metamask/snaps-sdk';
import {
CheckCredentialExistenceRequestParams,
RemoveCredentialsRequestParams,
Expand Down Expand Up @@ -122,11 +129,18 @@ export const onRpcRequest = async ({
content: panel([
heading('Remove Credentials'),
divider(),
...vcs.map((el) => {
const vcTargetType = el.type[1];

return text(`${vcTargetType}\n`);
}),
...vcs.reduce((acc, el, idx) => {
const vcTargetType = el.type[1];
const vcID = el.id;

return acc.concat([
text(`**Credential #${idx + 1}**`),
text(`Type: ${vcTargetType}`),
text(`ID: ${vcID}`),
divider(),
]);
}, [] as Component[]),
]),
},
});
Expand Down

0 comments on commit 4b46d40

Please sign in to comment.