Skip to content

Commit

Permalink
fix: replace contracts for the packages of safe-global
Browse files Browse the repository at this point in the history
  • Loading branch information
GiambiHuang committed Aug 20, 2024
1 parent 3e460b6 commit a14e6da
Show file tree
Hide file tree
Showing 42 changed files with 7,760 additions and 1,515 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"routes": "node scripts/generate-routes.js > src/config/routes.ts && prettier -w src/config/routes.ts && cat src/config/routes.ts",
"css-vars": "npx -y tsx ./scripts/css-vars.ts > ./src/styles/vars.css && prettier -w src/styles/vars.css",
"generate-types": "typechain --target ethers-v6 --out-dir src/types/contracts ./node_modules/@safe-global/safe-deployments/dist/assets/**/*.json ./node_modules/@safe-global/safe-modules-deployments/dist/assets/**/*.json ./node_modules/@openzeppelin/contracts/build/contracts/ERC20.json ./node_modules/@openzeppelin/contracts/build/contracts/ERC721.json",
"after-install": "yarn generate-types",
"after-install": "yarn replace && yarn generate-types",
"postinstall": "yarn after-install",
"analyze": "cross-env ANALYZE=true yarn build",
"cypress:open": "cross-env TZ=UTC cypress open --e2e",
Expand Down
57 changes: 57 additions & 0 deletions public/images/9901.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 3 additions & 2 deletions scripts/replace-contracts.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/sh
# replace-contracts.sh
cp -r ./v1.4.1 ./node_modules/@safe-global/safe-deployments/dist/assets
cp -r ./v1.3.0 ./node_modules/@safe-global/safe-deployments/dist/assets
cp -r ./zytron/safe-deployments/v1.3.0 ./node_modules/@safe-global/safe-deployments/dist/assets
cp -r ./zytron/protocol-kit/v1.3.0 ./node_modules/@safe-global/protocol-kit/node_modules/@safe-global/safe-deployments/dist/assets
cp -r ./zytron/api-kit/v1.3.0 ./node_modules/@safe-global/api-kit/node_modules/@safe-global/safe-deployments/dist/assets
5 changes: 2 additions & 3 deletions src/components/common/Footer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { useRouter } from 'next/router'
import css from './styles.module.css'
import { AppRoutes } from '@/config/routes'
import packageJson from '../../../../package.json'
import AppstoreButton from '../AppStoreButton'
import ExternalLink from '../ExternalLink'
import MUILink from '@mui/material/Link'
import { HELP_CENTER_URL, IS_DEV, IS_OFFICIAL_HOST } from '@/config/constants'
Expand Down Expand Up @@ -83,9 +82,9 @@ const Footer = (): ReactElement | null => {
<SvgIcon component={GitHubIcon} inheritViewBox fontSize="inherit" sx={{ mr: 0.5 }} /> v{packageJson.version}
</ExternalLink>
</li>
<li>
{/* <li>
<AppstoreButton placement="footer" />
</li>
</li> */}
</ul>
</footer>
)
Expand Down
5 changes: 5 additions & 0 deletions src/components/welcome/MyAccounts/useAllSafes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ const useAllSafes = (): SafeItems | undefined => {
const { configs } = useChains()
const undeployedSafes = useAppSelector(selectUndeployedSafes)

console.log(allOwned, allOwnedLoading)
console.log(allAdded)
console.log(configs)
console.log(undeployedSafes)

return useMemo<SafeItems | undefined>(() => {
if (walletAddress && (allOwned === undefined || allOwnedLoading)) {
return undefined
Expand Down
1 change: 1 addition & 0 deletions src/components/welcome/WelcomeLogin/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ const WelcomeLogin = () => {
useEffect(() => {
if (!shouldRedirect) return

console.log(wallet, isLoaded, hasSafes)
if (wallet && isLoaded) {
if (hasSafes) {
router.push({ pathname: AppRoutes.welcome.accounts, query: router.query })
Expand Down
3 changes: 3 additions & 0 deletions src/hooks/loadables/useLoadChains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ import { logError, Errors } from '@/services/exceptions'

const getConfigs = async (): Promise<ChainInfo[]> => {
const data = await getChainsConfig()
for (const chain of data.results) {
!chain.chainLogoUri && (chain.chainLogoUri = '/images/9901.svg')
}
return data.results || []
}

Expand Down
2 changes: 1 addition & 1 deletion src/hooks/useChainId.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { parsePrefixedAddress } from '@/utils/addresses'
import useWallet from './wallets/useWallet'
import useChains from './useChains'

const defaultChainId = IS_PRODUCTION ? chains.eth : chains.sep
const defaultChainId = IS_PRODUCTION ? '9901' : '9901'

// Use the location object directly because Next.js's router.query is available only on mount
const getLocationQuery = (): ParsedUrlQuery => {
Expand Down
195 changes: 0 additions & 195 deletions v1.4.1/create_call.json

This file was deleted.

Loading

0 comments on commit a14e6da

Please sign in to comment.