Skip to content

Commit 625aa52

Browse files
committed
feat: add getAddress method
1 parent 81b7f91 commit 625aa52

File tree

4 files changed

+7
-4
lines changed

4 files changed

+7
-4
lines changed

packages/site/src/pages/index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,8 @@ const Index = () => {
111111
: snapsDetected;
112112

113113
const handleSendHelloClick = async () => {
114-
await invokeSnap({ method: 'hello' });
114+
const result = await invokeSnap({ method: 'getAddress' });
115+
console.log(result);
115116
};
116117

117118
const installSnap = async () => {

packages/snap/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "nomis",
3-
"version": "0.1.3",
3+
"version": "0.1.4",
44
"description": "Onchain Reputation and Decentralized Identity Protocol",
55
"repository": {
66
"type": "git",

packages/snap/snap.manifest.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{
2-
"version": "0.1.3",
2+
"version": "0.1.4",
33
"description": "Onchain Reputation and Decentralized Identity Protocol",
44
"proposedName": "Nomis Protocol",
55
"repository": {
66
"type": "git",
77
"url": "https://github.com/Nomis-cc/nomis-snaps.git"
88
},
99
"source": {
10-
"shasum": "xgurEG5jHmrFcnBO3CHBriCEkSOvJ8PdLRTWRtKoE7g=",
10+
"shasum": "DGI3POjXiBCuVZmCbG2cciqSi+qJdpVBgZixWcs6Ph8=",
1111
"location": {
1212
"npm": {
1313
"filePath": "dist/bundle.js",

packages/snap/src/index.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ import { convertCAIP2ToHex, getAccount, getChainId } from './utils';
1717

1818
export const onRpcRequest: OnRpcRequestHandler = async ({ request }) => {
1919
switch (request.method) {
20+
case 'getAddress':
21+
return await getAccount();
2022
default:
2123
throw new Error('Method not found.');
2224
}

0 commit comments

Comments
 (0)