Skip to content

Commit

Permalink
Added tests for parser
Browse files Browse the repository at this point in the history
  • Loading branch information
SamvelRaja Sakthivel authored and SamvelRaja Sakthivel committed Aug 9, 2023
1 parent 87940db commit d4eb76b
Show file tree
Hide file tree
Showing 11 changed files with 4,184 additions and 42 deletions.
3 changes: 2 additions & 1 deletion packages/snap/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
"lint:misc": "prettier '**/*.json' '**/*.md' '!CHANGELOG.md' --ignore-path .gitignore",
"serve": "mm-snap serve",
"start": "mm-snap watch",
"test": "jest --coverage"
"test": "jest",
"test-coverage": "jest --coverage"
},
"dependencies": {
"@cosmjs/stargate": "^0.30.1",
Expand Down
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/leapwallet/cosmos-metamask-snap.git"
},
"source": {
"shasum": "C1WeriAbceTZ6AIoijURGy4ke3uhJbYz5L2U2itp620=",
"shasum": "F0492Mnms6SXudIoIzEscTpuhAoD5bTnBf+U+v6IX5Q=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
7 changes: 2 additions & 5 deletions packages/snap/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import parser from './helpers/parser';
import { validateChainId } from './helpers/validateChainId';
import { generateWallet } from './wallet/wallet';

interface RequestParams<T> {
export interface RequestParams<T> {
readonly signDoc: T;
readonly signerAddress: string;
}
Expand All @@ -23,7 +23,7 @@ interface RequestParams<T> {
* @returns The result of `snap_dialog`.
* @throws If the request method is not valid for this snap.
*/
const onRpcRequest: OnRpcRequestHandler = async ({
export const onRpcRequest: OnRpcRequestHandler = async ({
origin,
request,
}) => {
Expand Down Expand Up @@ -127,6 +127,3 @@ const onRpcRequest: OnRpcRequestHandler = async ({
throw new Error('Method not found.');
}
};


export default onRpcRequest;
Loading

0 comments on commit d4eb76b

Please sign in to comment.