diff --git a/.husky/pre-commit b/.husky/pre-commit index 6700f5128..dc0378c34 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,2 +1,4 @@ #!/bin/sh . "$(dirname "$0")/_/husky.sh" + +yarn lint-staged \ No newline at end of file diff --git a/.yarnrc b/.yarnrc index b16a8dd6e..1333f4e02 100644 --- a/.yarnrc +++ b/.yarnrc @@ -1,2 +1 @@ --add.exact true -ignore-scripts true diff --git a/package.json b/package.json index 840db8f88..e033d42ca 100644 --- a/package.json +++ b/package.json @@ -201,7 +201,7 @@ "eslint-plugin-react": "7.35.0", "eslint-plugin-react-hooks": "4.6.2", "eslint-plugin-unused-imports": "4.1.3", - "husky": "8.0.1", + "husky": "8.0.3", "jest": "29.2.0", "jest-environment-jsdom": "29.2.2", "lint-staged": "10.0.10", @@ -221,6 +221,11 @@ "preset": "emotion" } }, + "husky": { + "hooks": { + "pre-commit": "npm run lint-staged" + } + }, "resolutions": { "@babel/traverse": ">=7.23.2", "port-sdk/@saberhq/token-utils": "1.12.53", diff --git a/stores/useGovernanceAssetsStore.tsx b/stores/useGovernanceAssetsStore.tsx index 2427e584a..465deb385 100644 --- a/stores/useGovernanceAssetsStore.tsx +++ b/stores/useGovernanceAssetsStore.tsx @@ -179,9 +179,7 @@ const useGovernanceAssetsStore = create((set, _get) => ({ accounts.push(...governedTokenAccounts) const stakeAccounts = await loadStakeAccounts( connection, - governedTokenAccounts.filter( - (x) => x.isSol - ) + governedTokenAccounts.filter((x) => x.isSol) ) accounts.push(...stakeAccounts) @@ -774,6 +772,7 @@ const loadMintGovernanceAccounts = async ( const possibleMintAccount = possibleMintAccounts[index] const pk = possibleMintAccountPks[index] if (possibleMintAccount) { + // @ts-ignore const data = Buffer.from(possibleMintAccount.data) const parsedMintInfo = parseMintAccountData(data) as MintInfo const ownerGovernance = governances.find( diff --git a/yarn.lock b/yarn.lock index 1c8d2358e..2141f45f2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -11066,10 +11066,10 @@ humanize-ms@^1.2.1: dependencies: ms "^2.0.0" -husky@8.0.1: - version "8.0.1" - resolved "https://registry.yarnpkg.com/husky/-/husky-8.0.1.tgz#511cb3e57de3e3190514ae49ed50f6bc3f50b3e9" - integrity sha512-xs7/chUH/CKdOCs7Zy0Aev9e/dKOMZf3K1Az1nar3tzlv0jfqnYtu235bstsWTmXOR0EfINrPa97yy4Lz6RiKw== +husky@8.0.3: + version "8.0.3" + resolved "https://registry.yarnpkg.com/husky/-/husky-8.0.3.tgz#4936d7212e46d1dea28fef29bb3a108872cd9184" + integrity sha512-+dQSyqPh4x1hlO1swXBiNb2HzTDN1I2IGLQx1GrBuiqFJfoMrnZWwVmatvSiO+Iz8fBUnf+lekwNo4c2LlXItg== hyphenate-style-name@^1.0.0: version "1.0.4"