Skip to content

Commit

Permalink
Merge pull request #10 from 0xPolygonID/fix/remove-patches
Browse files Browse the repository at this point in the history
Remove patches
  • Loading branch information
vmidyllic authored Jun 17, 2024
2 parents c80c25d + c0d331a commit 94b2464
Show file tree
Hide file tree
Showing 9 changed files with 2,320 additions and 2,356 deletions.
Binary file modified .yarn/install-state.gz
Binary file not shown.
5 changes: 1 addition & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@
"lint:fix": "yarn lint:eslint --fix && yarn lint:misc --write",
"lint:misc": "prettier '**/*.json' '**/*.md' '!**/CHANGELOG.md' '**/*.yml' --ignore-path .gitignore",
"start": "yarn workspaces foreach --parallel --interlaced --verbose run start",
"test": "yarn workspace snap run test",
"postinstall": "patch-package"
"test": "yarn workspace snap run test"
},
"devDependencies": {
"@lavamoat/allow-scripts": "^3.0.0",
Expand All @@ -43,8 +42,6 @@
"eslint-plugin-n": "^15.7.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-promise": "^6.1.1",
"patch-package": "^8.0.0",
"postinstall-postinstall": "^2.1.0",
"prettier": "^2.7.1",
"prettier-plugin-packagejson": "^2.2.18",
"sharp": "^0.30.7",
Expand Down
24 changes: 12 additions & 12 deletions packages/snap/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,30 +28,30 @@
"test": "jest"
},
"dependencies": {
"@0xpolygonid/js-sdk": "1.7.5",
"@iden3/js-crypto": "1.0.3",
"@iden3/js-iden3-core": "1.2.1",
"@iden3/js-jsonld-merklization": "1.1.2",
"@iden3/js-jwz": "1.3.0",
"@iden3/js-merkletree": "1.1.2",
"@metamask/snaps-sdk": "^2.1.0",
"@0xpolygonid/js-sdk": "1.15.2",
"@iden3/js-crypto": "1.1.0",
"@iden3/js-iden3-core": "1.3.1",
"@iden3/js-jsonld-merklization": "1.3.1",
"@iden3/js-jwz": "1.5.0",
"@iden3/js-merkletree": "1.2.0",
"@metamask/snaps-sdk": "^4.1.0",
"buffer": "^6.0.3",
"did-jwt": "6.11.6",
"did-jwt": "8.0.4",
"did-resolver": "4.1.0",
"ethers": "6.8.0",
"ffjavascript": "0.2.63",
"ffjavascript": "0.3.0",
"intl": "^1.2.5",
"rfc4648": "1.5.3",
"snarkjs": "0.7.3"
"snarkjs": "0.7.4"
},
"devDependencies": {
"@jest/globals": "^29.5.0",
"@metamask/auto-changelog": "^3.4.2",
"@metamask/auto-changelog": "^3.4.4",
"@metamask/eslint-config": "^12.0.0",
"@metamask/eslint-config-jest": "^12.0.0",
"@metamask/eslint-config-nodejs": "^12.0.0",
"@metamask/eslint-config-typescript": "^12.0.0",
"@metamask/snaps-cli": "^5.1.1",
"@metamask/snaps-cli": "^6.2.0",
"@metamask/snaps-jest": "^5.0.0",
"@typescript-eslint/eslint-plugin": "^5.42.1",
"@typescript-eslint/parser": "^5.42.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/0xPolygonID/snap-example.git"
},
"source": {
"shasum": "3jrDeMscWWv7axY5PJYYdGotbrUriI7ENao6v2t892Y=",
"shasum": "f26niGJ0TtSN9cuFh7Gmew9XzEW353HjtsD8g8bYB9I=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
5 changes: 2 additions & 3 deletions packages/snap/src/constants/common.constants.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import type { EthConnectionConfig } from '@0xpolygonid/js-sdk';

export const RHS_URL = 'https://rhs-staging.polygonid.me';
export const RPC_URL =
'https://polygon-mumbai.g.alchemy.com/v2/BI7_GYAO787OflUC7E6DhMJNkhkyq7kp';
export const RPC_URL = '';

export const defaultEthConnectionConfig: EthConnectionConfig = {
url: RPC_URL,
Expand All @@ -11,7 +10,7 @@ export const defaultEthConnectionConfig: EthConnectionConfig = {
maxGasPrice: '100000000000',
confirmationBlockCount: 5,
confirmationTimeout: 600000,
contractAddress: '0x134B1BE34911E39A8397ec6289782989729807a4',
contractAddress: '0x1a4cC30f2aA0377b0c3bc9848766D90cb4404124',
receiptTimeout: 600000,
rpcResponseTimeout: 5000,
waitReceiptCycleTime: 30000,
Expand Down
16 changes: 8 additions & 8 deletions packages/snap/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
hexToBytes,
FetchHandler,
byteDecoder,
base64UrlToBytes,
} from '@0xpolygonid/js-sdk';
import type { OnRpcRequestHandler } from '@metamask/snaps-sdk';
import {
Expand Down Expand Up @@ -65,14 +66,13 @@ export const onRpcRequest: OnRpcRequestHandler = async ({
const jwsPackerOpts: JWSPackerParams = {
alg: 'ES256K-R',
// eslint-disable-next-line id-denylist
signer: (_: any, msg: any) => {
return async () => {
const signature = (await ES256KSigner(
hexToBytes(privKey),
true,
)(msg)) as string;
return signature;
};
signer: async (_, data) => {
const signatureBase64 = await ES256KSigner(
hexToBytes(privKey),
true,
)(data);

return base64UrlToBytes(signatureBase64.toString());
},
};

Expand Down
11 changes: 0 additions & 11 deletions patches/@iden3+js-jsonld-merklization+1.1.2.patch

This file was deleted.

31 changes: 0 additions & 31 deletions patches/ffjavascript+0.2.63.patch

This file was deleted.

Loading

0 comments on commit 94b2464

Please sign in to comment.