Skip to content

Commit

Permalink
- Removed lint dependency
Browse files Browse the repository at this point in the history
- Change "origin" to "snapId"
  • Loading branch information
codebycarson committed Jan 4, 2024
1 parent 5b327c1 commit 028bdef
Show file tree
Hide file tree
Showing 7 changed files with 77 additions and 62 deletions.
4 changes: 2 additions & 2 deletions packages/core/src/lib/mmSnap/snapWallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ export class SnapWallet {
}
}

export async function getWallet(account_index = 0, origin: string): Promise<SnapWallet> {
const account: BIP44Node = await sendReqToSnap('getPrivateKey', { account_index }, origin);
export async function getWallet(account_index = 0, snapId: string): Promise<SnapWallet> {
const account: BIP44Node = await sendReqToSnap('getPrivateKey', { account_index }, snapId);

if (account.privateKey) {
return SnapWallet.create(account.privateKey);
Expand Down
5 changes: 0 additions & 5 deletions packages/metamask-snap/.eslintignore

This file was deleted.

44 changes: 0 additions & 44 deletions packages/metamask-snap/.eslintrc.js

This file was deleted.

3 changes: 0 additions & 3 deletions packages/metamask-snap/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@
"build:snap": "mm-snap build",
"build:clean": "yarn clean && yarn build",
"clean": "rimraf dist",
"lint": "yarn lint:eslint",
"lint:eslint": "eslint . --cache --ext js,ts",
"lint:fix": "yarn lint:eslint --fix",
"serve": "mm-snap serve",
"start": "mm-snap watch",
"test": "yarn test:snap",
Expand Down
2 changes: 1 addition & 1 deletion packages/metamask-snap/snap.manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/template-snap-monorepo.git"
},
"source": {
"shasum": "KnMVkpwhQT8eqt/6n1ynSYr0uvueW31mo6eRjg4sesY=",
"shasum": "8x/y6X8Re9ZD9X/Ug1hu9QCMGs53PrM/NAFULstl48U=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
4 changes: 2 additions & 2 deletions packages/metamask-snap/src/ui.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,8 @@ export const getAminoPanel = (signDoc: StdSignDoc) => {
JSON.stringify(
signDoc.msgs.map((msg) => {
try {
let bufferObj = Buffer.from(msg.value.data, 'base64');
let data = bufferObj.toString('utf8');
const bufferObj = Buffer.from(msg.value.data, 'base64');
const data = bufferObj.toString('utf8');
return { ...msg, value: { ...msg.value, data } };
} catch {
return msg;
Expand Down
77 changes: 72 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3171,14 +3171,14 @@
esquery "^1.4.0"
jsdoc-type-pratt-parser "~3.1.0"

"@eslint-community/eslint-utils@^4.2.0":
"@eslint-community/eslint-utils@^4.1.2", "@eslint-community/eslint-utils@^4.2.0", "@eslint-community/eslint-utils@^4.4.0":
version "4.4.0"
resolved "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz#a23514e8fb9af1269d5f7788aa556798d61c6b59"
integrity sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==
dependencies:
eslint-visitor-keys "^3.3.0"

"@eslint-community/regexpp@^4.4.0", "@eslint-community/regexpp@^4.6.1":
"@eslint-community/regexpp@^4.4.0", "@eslint-community/regexpp@^4.6.0", "@eslint-community/regexpp@^4.6.1":
version "4.10.0"
resolved "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.10.0.tgz#548f6de556857c8bb73bbee70c35dc82a2e74d63"
integrity sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA==
Expand Down Expand Up @@ -6994,12 +6994,17 @@ buffers@~0.1.1:
resolved "https://registry.npmjs.org/buffers/-/buffers-0.1.1.tgz#b24579c3bed4d6d396aeee6d9a8ae7f5482ab7bb"
integrity sha512-9q/rDEGSb/Qsvv2qvzIzdluL5k7AaJOTrw23z9reQthrbF7is4CtlT0DXyO1oei2DCp4uojjzQ7igaSHp1kAEQ==

builtin-modules@^3.3.0:
version "3.3.0"
resolved "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.3.0.tgz#cae62812b89801e9656336e46223e030386be7b6"
integrity sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw==

builtin-status-codes@^3.0.0:
version "3.0.0"
resolved "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz#85982878e21b98e1c66425e03d0174788f569ee8"
integrity sha512-HpGFw18DgFWlncDfjTa2rcQ4W88O1mC8e8yZ2AvQY5KDaktSTwo+KRf6nHK6FRI5FyRyb/5T6+TSxfP7QyGsmQ==

builtins@^5.0.0:
builtins@^5.0.0, builtins@^5.0.1:
version "5.0.1"
resolved "https://registry.npmjs.org/builtins/-/builtins-5.0.1.tgz#87f6db9ab0458be728564fa81d876d8d74552fa9"
integrity sha512-qwVpFEHNfhYJIzNRBvd2C1kyo6jz3ZSMPyyuR47OPdiKWlbYnZNyDWuyR175qDnAJLiCo5fBBqPb3RiXgWlkOQ==
Expand Down Expand Up @@ -8580,6 +8585,11 @@ escodegen@^2.0.0, escodegen@^2.1.0:
optionalDependencies:
source-map "~0.6.1"

eslint-compat-utils@^0.1.2:
version "0.1.2"
resolved "https://registry.npmjs.org/eslint-compat-utils/-/eslint-compat-utils-0.1.2.tgz#f45e3b5ced4c746c127cf724fb074cd4e730d653"
integrity sha512-Jia4JDldWnFNIru1Ehx1H5s9/yxiRHY/TimCuUc0jNexew3cF1gI6CYZil1ociakfWO3rRqFjl1mskBblB3RYg==

[email protected]:
version "8.1.0"
resolved "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.1.0.tgz#4ef1eaf97afe5176e6a75ddfb57c335121abc5a6"
Expand All @@ -8606,6 +8616,15 @@ eslint-module-utils@^2.7.3, eslint-module-utils@^2.8.0:
dependencies:
debug "^3.2.7"

eslint-plugin-es-x@^7.5.0:
version "7.5.0"
resolved "https://registry.npmjs.org/eslint-plugin-es-x/-/eslint-plugin-es-x-7.5.0.tgz#d08d9cd155383e35156c48f736eb06561d07ba92"
integrity sha512-ODswlDSO0HJDzXU0XvgZ3lF3lS3XAZEossh15Q2UHjwrJggWeBoKqqEsLTZLXl+dh5eOAozG0zRcYtuE35oTuQ==
dependencies:
"@eslint-community/eslint-utils" "^4.1.2"
"@eslint-community/regexpp" "^4.6.0"
eslint-compat-utils "^0.1.2"

eslint-plugin-es@^3.0.0:
version "3.0.1"
resolved "https://registry.npmjs.org/eslint-plugin-es/-/eslint-plugin-es-3.0.1.tgz#75a7cdfdccddc0589934aeeb384175f221c57893"
Expand Down Expand Up @@ -8695,6 +8714,23 @@ [email protected]:
minimatch "^3.1.2"
semver "^6.3.0"

eslint-plugin-n@^16.6.1:
version "16.6.1"
resolved "https://registry.npmjs.org/eslint-plugin-n/-/eslint-plugin-n-16.6.1.tgz#b16e0033bc9ce592b1c3512cb1cee24f84ecb5ae"
integrity sha512-M1kE5bVQRLBMDYRZwDhWzlzbp370SRRRC1MHqq4I3L2Tatey+9/2csc5mwLDPlmhJaDvkojbrNUME5/llpRyDg==
dependencies:
"@eslint-community/eslint-utils" "^4.4.0"
builtins "^5.0.1"
eslint-plugin-es-x "^7.5.0"
get-tsconfig "^4.7.0"
globals "^13.24.0"
ignore "^5.2.4"
is-builtin-module "^3.2.1"
is-core-module "^2.12.1"
minimatch "^3.1.2"
resolve "^1.22.2"
semver "^7.5.3"

eslint-plugin-node@^11.1.0:
version "11.1.0"
resolved "https://registry.npmjs.org/eslint-plugin-node/-/eslint-plugin-node-11.1.0.tgz#c95544416ee4ada26740a30474eefc5402dc671d"
Expand All @@ -8714,6 +8750,11 @@ eslint-plugin-prettier@^4.2.1:
dependencies:
prettier-linter-helpers "^1.0.0"

eslint-plugin-promise@^6.1.1:
version "6.1.1"
resolved "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-6.1.1.tgz#269a3e2772f62875661220631bd4dafcb4083816"
integrity sha512-tjqWDwVZQo7UIPMeDReOpUgHCmCiH+ePnVT+5zVapL0uuHnegBUs2smM13CzOs2Xb5+MHMRFTs9v24yjba4Oig==

[email protected]:
version "4.6.0"
resolved "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.6.0.tgz#4c3e697ad95b77e93f8646aaa1630c1ba607edd3"
Expand Down Expand Up @@ -9627,6 +9668,13 @@ get-symbol-description@^1.0.0:
call-bind "^1.0.2"
get-intrinsic "^1.1.1"

get-tsconfig@^4.7.0:
version "4.7.2"
resolved "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.7.2.tgz#0dcd6fb330391d46332f4c6c1bf89a6514c2ddce"
integrity sha512-wuMsz4leaj5hbGgg4IvDU0bqJagpftG5l5cXIAvo8uZrqn0NJqwtfupTN00VnkQJPcIRrxYrm1Ue24btpCha2A==
dependencies:
resolve-pkg-maps "^1.0.0"

get-uri@^6.0.1:
version "6.0.2"
resolved "https://registry.npmjs.org/get-uri/-/get-uri-6.0.2.tgz#e019521646f4a8ff6d291fbaea2c46da204bb75b"
Expand Down Expand Up @@ -9737,6 +9785,13 @@ globals@^13.19.0:
dependencies:
type-fest "^0.20.2"

globals@^13.24.0:
version "13.24.0"
resolved "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz#8432a19d78ce0c1e833949c36adb345400bb1171"
integrity sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==
dependencies:
type-fest "^0.20.2"

globalthis@^1.0.1, globalthis@^1.0.3:
version "1.0.3"
resolved "https://registry.npmjs.org/globalthis/-/globalthis-1.0.3.tgz#5852882a52b80dc301b0660273e1ed082f0b6ccf"
Expand Down Expand Up @@ -10336,12 +10391,19 @@ is-buffer@^2.0.0:
resolved "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.5.tgz#ebc252e400d22ff8d77fa09888821a24a658c191"
integrity sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==

is-builtin-module@^3.2.1:
version "3.2.1"
resolved "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-3.2.1.tgz#f03271717d8654cfcaf07ab0463faa3571581169"
integrity sha512-BSLE3HnV2syZ0FK0iMA/yUGplUeMmNz4AW5fnTunbCIqZi4vG3WjJT9FHMy5D69xmAYBHXQhJdALdpwVxV501A==
dependencies:
builtin-modules "^3.3.0"

is-callable@^1.1.3, is-callable@^1.1.4, is-callable@^1.2.7:
version "1.2.7"
resolved "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz#3bc2a85ea742d9e36205dcacdd72ca1fdc51b055"
integrity sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==

is-core-module@^2.13.0, is-core-module@^2.13.1, is-core-module@^2.8.1:
is-core-module@^2.12.1, is-core-module@^2.13.0, is-core-module@^2.13.1, is-core-module@^2.8.1:
version "2.13.1"
resolved "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz#ad0d7532c6fea9da1ebdc82742d74525c6273384"
integrity sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==
Expand Down Expand Up @@ -13712,12 +13774,17 @@ resolve-from@^5.0.0:
resolved "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz#c35225843df8f776df21c57557bc087e9dfdfc69"
integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==

resolve-pkg-maps@^1.0.0:
version "1.0.0"
resolved "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz#616b3dc2c57056b5588c31cdf4b3d64db133720f"
integrity sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==

resolve.exports@^2.0.0:
version "2.0.2"
resolved "https://registry.npmjs.org/resolve.exports/-/resolve.exports-2.0.2.tgz#f8c934b8e6a13f539e38b7098e2e36134f01e800"
integrity sha512-X2UW6Nw3n/aMgDVy+0rSqgHlv39WZAlZrXCdnbyEiKm17DSqHX4MmQMaST3FbeWR5FTuRcUwYAziZajji0Y7mg==

resolve@^1.1.4, resolve@^1.1.6, resolve@^1.10.0, resolve@^1.10.1, resolve@^1.14.2, resolve@^1.17.0, resolve@^1.19.0, resolve@^1.20.0, resolve@^1.22.0, resolve@^1.22.3, resolve@^1.22.4, resolve@^1.4.0:
resolve@^1.1.4, resolve@^1.1.6, resolve@^1.10.0, resolve@^1.10.1, resolve@^1.14.2, resolve@^1.17.0, resolve@^1.19.0, resolve@^1.20.0, resolve@^1.22.0, resolve@^1.22.2, resolve@^1.22.3, resolve@^1.22.4, resolve@^1.4.0:
version "1.22.8"
resolved "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz#b6c87a9f2aa06dfab52e3d70ac8cde321fa5a48d"
integrity sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==
Expand Down

0 comments on commit 028bdef

Please sign in to comment.