Skip to content

Commit

Permalink
fix: linting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
compojoom committed Dec 18, 2024
1 parent c92793f commit 1b8af74
Show file tree
Hide file tree
Showing 14 changed files with 107 additions and 45 deletions.
2 changes: 1 addition & 1 deletion apps/web/next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ const nextConfig = {
cacheGroups: {
...config.optimization.splitChunks.cacheGroups,
customModule: {
test: /[\\/]node_modules[\\/](@safe-global|ethers)[\\/]/,
test: /[\\/]..[\\/]..[\\/]node_modules[\\/](@safe-global|ethers)[\\/]/,
name: 'protocol-kit-ethers',
chunks: 'all',
},
Expand Down
4 changes: 2 additions & 2 deletions apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,10 @@
"@walletconnect/core": "^2.17.2",
"@walletconnect/utils": "^2.17.3",
"@web3-onboard/coinbase": "^2.4.1",
"@web3-onboard/core": "^2.21.4",
"@web3-onboard/core": "2.21.4",
"@web3-onboard/injected-wallets": "^2.11.2",
"@web3-onboard/ledger": "2.3.2",
"@web3-onboard/trezor": "^2.4.2",
"@web3-onboard/trezor": "2.4.3",
"@web3-onboard/walletconnect": "^2.6.1",
"blo": "^1.1.1",
"classnames": "^2.5.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,7 @@ import type {
SafeInfoExtended,
} from '@safe-global/safe-apps-sdk'
import { Methods, RPC_CALLS } from '@safe-global/safe-apps-sdk'
import type {
Permission,
PermissionRequest,
} from 'node_modules/@safe-global/safe-apps-sdk/dist/types/types/permissions'
import type { Permission, PermissionRequest } from '@safe-global/safe-apps-sdk/dist/types/types/permissions'
import type { SafeSettings } from '@safe-global/safe-apps-sdk'
import AppCommunicator from '@/services/safe-apps/AppCommunicator'
import { Errors, logError } from '@/services/exceptions'
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/components/safe-apps/PermissionsPrompt.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { ReactElement } from 'react'
import type { PermissionRequest } from 'node_modules/@safe-global/safe-apps-sdk/dist/types/types/permissions'
import type { PermissionRequest } from '@safe-global/safe-apps-sdk/dist/types/types/permissions'
import { Button, Dialog, DialogActions, DialogContent, Divider, Typography } from '@mui/material'

import { ModalDialogTitle } from '@/components/common/ModalDialog'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { faker } from '@faker-js/faker'
import { id, zeroPadValue } from 'ethers'
import { JsonRpcProvider } from 'ethers'
import cloneDeep from 'lodash/cloneDeep'
import type { Delay, TransactionAddedEvent } from 'node_modules/@gnosis.pm/zodiac/dist/cjs/types/Delay'
import type { Delay, TransactionAddedEvent } from '@gnosis.pm/zodiac/dist/cjs/types/Delay'
import type { TransactionReceipt } from 'ethers'

import {
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/features/recovery/services/recovery-sender.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { getModuleInstance, KnownContracts } from '@gnosis.pm/zodiac'
import type { SafeInfo } from '@safe-global/safe-gateway-typescript-sdk'
import type { SafeTransaction } from '@safe-global/safe-core-sdk-types'
import type { TransactionAddedEvent } from 'node_modules/@gnosis.pm/zodiac/dist/cjs/types/Delay'
import type { TransactionAddedEvent } from '@gnosis.pm/zodiac/dist/cjs/types/Delay'
import type { Eip1193Provider, TransactionResponse } from 'ethers'

import { didReprice, didRevert } from '@/utils/ethers-utils'
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/features/recovery/services/recovery-state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import memoize from 'lodash/memoize'
import { getMultiSendCallOnlyDeployment } from '@safe-global/safe-deployments'
import type { SafeInfo } from '@safe-global/safe-gateway-typescript-sdk'
import type { Delay } from '@gnosis.pm/zodiac'
import type { TransactionAddedEvent } from 'node_modules/@gnosis.pm/zodiac/dist/cjs/types/Delay'
import type { TransactionAddedEvent } from '@gnosis.pm/zodiac/dist/cjs/types/Delay'
import { toBeHex, type JsonRpcProvider, type TransactionReceipt } from 'ethers'
import { trimTrailingSlash } from '@/utils/url'
import { sameAddress } from '@/utils/addresses'
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/features/swap/helpers/utils.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { DataDecoded, Order as SwapOrder } from '@safe-global/safe-gateway-typescript-sdk'
import { formatUnits } from 'ethers'
import type { AnyAppDataDocVersion, latest, LatestAppDataDocVersion } from 'node_modules/@cowprotocol/app-data'
import type { AnyAppDataDocVersion, latest, LatestAppDataDocVersion } from '@cowprotocol/app-data'

import { TradeType, UiOrderType } from '@/features/swap/types'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import type {
Permission,
PermissionCaveat,
PermissionRequest,
} from 'node_modules/@safe-global/safe-apps-sdk/dist/types/types/permissions'
} from '@safe-global/safe-apps-sdk/dist/types/types/permissions'

import { PermissionStatus } from '@/components/safe-apps/types'
import useLocalStorage from '@/services/local-storage/useLocalStorage'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ export function firebaseMessagingSw() {
self.registration.showNotification(notification.title || '', {
icon: ICON_PATH,
body: notification.body,
image: notification.image,
data,
})
})
Expand Down
1 change: 0 additions & 1 deletion apps/web/src/store/batchSlice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ export const batchSlice = createSlice({
state[chainId][safeAddress].push({
id: Math.random().toString(36).slice(2),
timestamp: Date.now(),
// @ts-expect-error
txDetails,
})
},
Expand Down
9 changes: 9 additions & 0 deletions apps/web/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,15 @@
"@/*": [
"./src/*"
],
"@safe-global/safe-apps-sdk/*": [
"../../node_modules/@safe-global/safe-apps-sdk/*"
],
"@gnosis.pm/zodiac/*": [
"../../node_modules/@gnosis.pm/zodiac/*"
],
"@cowprotocol/app-data": [
"../../node_modules/@cowprotocol/app-data"
],
"@/public/*": [
"./public/*"
]
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
"@safe-global/safe-core-sdk-types/ethers": "6.13.4",
"@safe-global/protocol-kit/ethers": "6.13.4",
"@safe-global/api-kit/ethers": "6.13.4",
"@gnosis.pm/zodiac/ethers": "6.13.4"
"@gnosis.pm/zodiac/ethers": "6.13.4",
"@cowprotocol/events": "1.3.0"
},
"devDependencies": {
"husky": "^9.1.6",
Expand Down
115 changes: 86 additions & 29 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1516,19 +1516,10 @@ __metadata:
languageName: node
linkType: hard

"@cowprotocol/events@npm:^1.3.0":
version: 1.5.0
resolution: "@cowprotocol/events@npm:1.5.0"
dependencies:
"@cowprotocol/types": "npm:^1.2.0"
checksum: 10/01a29e411e260a04fb1abc5eb756c2db7c25687ab03c4007fb0413fbc86cb2af8128dcc9a0302d5136b446ff73834138d84648a48b487be7eafc119fa526928a
languageName: node
linkType: hard

"@cowprotocol/types@npm:^1.2.0":
version: 1.2.0
resolution: "@cowprotocol/types@npm:1.2.0"
checksum: 10/0a5c19c625c194037f49661b260a1e82700b4888111398424341bb66624b4ca5a317ce19cd3b021c1b9e389bc357cbd1f82987918f7f92e3f9ba9c99b024ee35
"@cowprotocol/events@npm:1.3.0":
version: 1.3.0
resolution: "@cowprotocol/events@npm:1.3.0"
checksum: 10/c91a8dfbb1d0dba753e4080efbe044c42f20a3564550fe72ddc14c31432fd5b8da1ef40a0e62396016bc59785b57d9cdbf86c814e3cd1fe381389ee22ea6ded2
languageName: node
linkType: hard

Expand Down Expand Up @@ -2726,6 +2717,33 @@ __metadata:
languageName: node
linkType: hard

"@ethersproject/providers@npm:5.5.2":
version: 5.5.2
resolution: "@ethersproject/providers@npm:5.5.2"
dependencies:
"@ethersproject/abstract-provider": "npm:^5.5.0"
"@ethersproject/abstract-signer": "npm:^5.5.0"
"@ethersproject/address": "npm:^5.5.0"
"@ethersproject/basex": "npm:^5.5.0"
"@ethersproject/bignumber": "npm:^5.5.0"
"@ethersproject/bytes": "npm:^5.5.0"
"@ethersproject/constants": "npm:^5.5.0"
"@ethersproject/hash": "npm:^5.5.0"
"@ethersproject/logger": "npm:^5.5.0"
"@ethersproject/networks": "npm:^5.5.0"
"@ethersproject/properties": "npm:^5.5.0"
"@ethersproject/random": "npm:^5.5.0"
"@ethersproject/rlp": "npm:^5.5.0"
"@ethersproject/sha2": "npm:^5.5.0"
"@ethersproject/strings": "npm:^5.5.0"
"@ethersproject/transactions": "npm:^5.5.0"
"@ethersproject/web": "npm:^5.5.0"
bech32: "npm:1.1.4"
ws: "npm:7.4.6"
checksum: 10/25d7f15b0a9eb72410f90ce06cffd887c11c8abfa9699895defdb52424836af52b689c31ff13bd413c932f1ddf4bb21143739fdbf753360fe60c3c018ba3a83b
languageName: node
linkType: hard

"@ethersproject/providers@npm:5.5.3":
version: 5.5.3
resolution: "@ethersproject/providers@npm:5.5.3"
Expand Down Expand Up @@ -5885,10 +5903,10 @@ __metadata:
"@walletconnect/core": "npm:^2.17.2"
"@walletconnect/utils": "npm:^2.17.3"
"@web3-onboard/coinbase": "npm:^2.4.1"
"@web3-onboard/core": "npm:^2.21.4"
"@web3-onboard/core": "npm:2.21.4"
"@web3-onboard/injected-wallets": "npm:^2.11.2"
"@web3-onboard/ledger": "npm:2.3.2"
"@web3-onboard/trezor": "npm:^2.4.2"
"@web3-onboard/trezor": "npm:2.4.3"
"@web3-onboard/walletconnect": "npm:^2.6.1"
blo: "npm:^1.1.1"
classnames: "npm:^2.5.1"
Expand Down Expand Up @@ -9213,7 +9231,7 @@ __metadata:
languageName: node
linkType: hard

"@web3-onboard/common@npm:^2.2.3, @web3-onboard/common@npm:^2.4.1":
"@web3-onboard/common@npm:^2.2.3, @web3-onboard/common@npm:^2.3.3, @web3-onboard/common@npm:^2.3.4, @web3-onboard/common@npm:^2.4.1":
version: 2.4.2
resolution: "@web3-onboard/common@npm:2.4.2"
dependencies:
Expand All @@ -9223,13 +9241,15 @@ __metadata:
languageName: node
linkType: hard

"@web3-onboard/core@npm:^2.21.4":
version: 2.23.0
resolution: "@web3-onboard/core@npm:2.23.0"
"@web3-onboard/core@npm:2.21.4":
version: 2.21.4
resolution: "@web3-onboard/core@npm:2.21.4"
dependencies:
"@web3-onboard/common": "npm:^2.4.1"
"@web3-onboard/common": "npm:^2.3.4"
bignumber.js: "npm:^9.0.0"
bnc-sdk: "npm:^4.6.7"
bowser: "npm:^2.11.0"
ethers: "npm:5.5.3"
eventemitter3: "npm:^4.0.7"
joi: "npm:17.9.1"
lodash.merge: "npm:^4.6.2"
Expand All @@ -9238,12 +9258,11 @@ __metadata:
rxjs: "npm:^7.5.5"
svelte: "npm:^3.49.0"
svelte-i18n: "npm:^3.3.13"
viem: "npm:2.12.0"
checksum: 10/4b3c1fdb186c8523d6aa59895be204886ea38ae995f946132b17c6f0509e075e508437548b61b374f09746dba95e0d9fda85c4c9bb4f309263a2e5e29c5b6397
checksum: 10/77011b7b7b365f2c743b537b42359d66d24776e62238348c795b2c84512fda8f525dcfa0d8802a131e5071d6d99bab4adc330edb0834affa32d3c15c6bcc8805
languageName: node
linkType: hard

"@web3-onboard/hw-common@npm:^2.0.4, @web3-onboard/hw-common@npm:^2.3.2":
"@web3-onboard/hw-common@npm:^2.0.4, @web3-onboard/hw-common@npm:^2.3.0":
version: 2.3.3
resolution: "@web3-onboard/hw-common@npm:2.3.3"
dependencies:
Expand Down Expand Up @@ -9286,20 +9305,20 @@ __metadata:
languageName: node
linkType: hard

"@web3-onboard/trezor@npm:^2.4.2":
version: 2.4.6
resolution: "@web3-onboard/trezor@npm:2.4.6"
"@web3-onboard/trezor@npm:2.4.3":
version: 2.4.3
resolution: "@web3-onboard/trezor@npm:2.4.3"
dependencies:
"@ethereumjs/tx": "npm:^3.4.0"
"@ethersproject/providers": "npm:^5.5.0"
"@trezor/connect-web": "npm:^9.0.11"
"@web3-onboard/common": "npm:^2.4.1"
"@web3-onboard/hw-common": "npm:^2.3.2"
"@web3-onboard/common": "npm:^2.3.3"
"@web3-onboard/hw-common": "npm:^2.3.0"
buffer: "npm:^6.0.3"
eth-crypto: "npm:^2.1.0"
ethereumjs-util: "npm:^7.1.3"
hdkey: "npm:^2.0.1"
checksum: 10/aa8c7100c84742633a3d02807b4f1574400b1608b55736afa6b35233c1fce7988f6c6b0bb468c6527390d108232141fa9dbe15a64dcc42ea58f64b4189a6912e
checksum: 10/48b5cd480683ad606236a7c50a0a9bf52ac4de8e65cc6b83d7d8c2f4c916d5b189a4aca21d22552166284aed3a8378fef9cc7d0f9718383abecc81bc1446b542
languageName: node
linkType: hard

Expand Down Expand Up @@ -13831,6 +13850,44 @@ __metadata:
languageName: node
linkType: hard

"ethers@npm:5.5.3":
version: 5.5.3
resolution: "ethers@npm:5.5.3"
dependencies:
"@ethersproject/abi": "npm:5.5.0"
"@ethersproject/abstract-provider": "npm:5.5.1"
"@ethersproject/abstract-signer": "npm:5.5.0"
"@ethersproject/address": "npm:5.5.0"
"@ethersproject/base64": "npm:5.5.0"
"@ethersproject/basex": "npm:5.5.0"
"@ethersproject/bignumber": "npm:5.5.0"
"@ethersproject/bytes": "npm:5.5.0"
"@ethersproject/constants": "npm:5.5.0"
"@ethersproject/contracts": "npm:5.5.0"
"@ethersproject/hash": "npm:5.5.0"
"@ethersproject/hdnode": "npm:5.5.0"
"@ethersproject/json-wallets": "npm:5.5.0"
"@ethersproject/keccak256": "npm:5.5.0"
"@ethersproject/logger": "npm:5.5.0"
"@ethersproject/networks": "npm:5.5.2"
"@ethersproject/pbkdf2": "npm:5.5.0"
"@ethersproject/properties": "npm:5.5.0"
"@ethersproject/providers": "npm:5.5.2"
"@ethersproject/random": "npm:5.5.1"
"@ethersproject/rlp": "npm:5.5.0"
"@ethersproject/sha2": "npm:5.5.0"
"@ethersproject/signing-key": "npm:5.5.0"
"@ethersproject/solidity": "npm:5.5.0"
"@ethersproject/strings": "npm:5.5.0"
"@ethersproject/transactions": "npm:5.5.0"
"@ethersproject/units": "npm:5.5.0"
"@ethersproject/wallet": "npm:5.5.0"
"@ethersproject/web": "npm:5.5.1"
"@ethersproject/wordlists": "npm:5.5.0"
checksum: 10/75412f0dd60f0a21c2e8ade37781b6f67a84377d0b5452cf4c4d73596e6c2626966f666d491e53c55e124621ce3b72edf0001c683f2ef9ef08da79b5a3a02ace
languageName: node
linkType: hard

"ethers@npm:5.5.4":
version: 5.5.4
resolution: "ethers@npm:5.5.4"
Expand Down

0 comments on commit 1b8af74

Please sign in to comment.