Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/why did you render #2289

Open
wants to merge 51 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
87ca615
feat: bump react 18 and next
foodaka Nov 28, 2024
b88911d
feat: deps
foodaka Nov 28, 2024
11947b6
chore: fix lint issue
foodaka Nov 28, 2024
8109938
chore: bump next
foodaka Nov 28, 2024
c0bdce7
chore: bump next v
foodaka Nov 28, 2024
32c93c2
feat: init
foodaka Nov 29, 2024
3dce4ef
feat: fixes
foodaka Nov 29, 2024
095f46e
chore: cleanup 2x
foodaka Dec 2, 2024
420f6e8
fix: link type
foodaka Dec 2, 2024
801ace5
chore: fixes
foodaka Dec 2, 2024
f9ce949
fix: no ssr
foodaka Dec 2, 2024
4881d9b
fix: safe local
foodaka Dec 3, 2024
14bf1a6
fix: cypress
foodaka Dec 3, 2024
f29de1e
fix: types 18 upgrade
foodaka Dec 3, 2024
d5b7164
fix: bridge type
foodaka Dec 3, 2024
9cb2be2
fix: bridge
foodaka Dec 9, 2024
702433e
change dependency-review parameter
alexmance Dec 9, 2024
01abe3f
fix: donor addresses
foodaka Dec 9, 2024
7033e4b
Merge branch 'feat/wallet-framework-update' of github.com:aave/interf…
foodaka Dec 9, 2024
cd3a9cb
feat: read mode only connector fix
JoaquinBattilana Dec 9, 2024
072b62a
Merge branch 'feat/wallet-framework-update' of github.com:aave/interf…
JoaquinBattilana Dec 9, 2024
ce8711d
Merge branch 'feat/wallet-framework-update' of github.com:aave/interf…
foodaka Dec 9, 2024
d579bc0
feat: connect kit - wip
grothem Dec 10, 2024
5e7c2bc
feat: read mode onlY (#2282)
JoaquinBattilana Dec 10, 2024
ccf5621
Merge branch 'feat/wallet-framework-update' of github.com:aave/interf…
foodaka Dec 11, 2024
71f8fe2
fix: connect kit/wagmi fixes
grothem Dec 11, 2024
fba44a0
Merge branch 'feat/wallet-framework-update' of github.com:aave/interf…
foodaka Dec 11, 2024
34f6b52
feat: read mode only connector
JoaquinBattilana Dec 12, 2024
d2ad847
feat: properly close menus
JoaquinBattilana Dec 12, 2024
368a43c
Merge branch 'feat/wallet-framework-update' of github.com:aave/interf…
foodaka Dec 12, 2024
e1549b1
feat: config for cypress test
grothem Dec 12, 2024
9a9bba3
fix: falsy loading state
foodaka Dec 12, 2024
dcefa4e
fix: merge
foodaka Dec 12, 2024
815ae2f
feat: cleanup
grothem Dec 12, 2024
a1f0e55
fix: default import lint
grothem Dec 12, 2024
08dc934
feat: eslint
JoaquinBattilana Dec 13, 2024
e985004
feat: merged with main
JoaquinBattilana Dec 13, 2024
551da1f
Merge branch 'main' into feat/wallet-framework-update
grothem Dec 13, 2024
41a3a2e
fix: package.json
grothem Dec 13, 2024
da5a8f9
add cypress envar
alexmance Dec 13, 2024
8cace18
feat: read only
grothem Dec 13, 2024
13e61c9
add cypress envar on build actions
alexmance Dec 13, 2024
1df98e0
add cypress envar on build actions
alexmance Dec 13, 2024
a54adce
fix: use signer
grothem Dec 13, 2024
43537f5
fix: remove watch
grothem Dec 13, 2024
4886a32
fix: clear watch
grothem Dec 13, 2024
0c0673a
fix: remove unused prop
grothem Dec 13, 2024
a68154f
fix: error parsing
grothem Dec 13, 2024
94c61a6
fix: husky version
grothem Dec 13, 2024
f94bc1c
feat: added why did you render
JoaquinBattilana Dec 16, 2024
9baafb1
feat: added ssr to wagmi
JoaquinBattilana Dec 17, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ NEXT_PUBLIC_WALLET_CONNECT_PROJECT_ID=
NEXT_PUBLIC_MIXPANEL=
NEXT_PUBLIC_FIAT_ON_RAMP=true
NEXT_PUBLIC_SUBGRAPH_API_KEY=
NEXT_PUBLIC_IS_CYPRESS_ENABLED=false
5 changes: 5 additions & 0 deletions .github/actions/build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ inputs:
description: subgraph api key
required: false
default: ''
NEXT_PUBLIC_IS_CYPRESS_ENABLED:
description: enables cypress
required: false
default: 'true'

runs:
using: 'composite'
Expand Down Expand Up @@ -84,3 +88,4 @@ runs:
NEXT_PUBLIC_FIAT_ON_RAMP: 'false'
NEXT_PUBLIC_WALLET_CONNECT_PROJECT_ID: '${{ inputs.NEXT_PUBLIC_WALLET_CONNECT_PROJECT_ID }}'
NEXT_PUBLIC_SUBGRAPH_API_KEY: '${{ inputs.NEXT_PUBLIC_SUBGRAPH_API_KEY }}'
NEXT_PUBLIC_IS_CYPRESS_ENABLED: '${{ inputs.NEXT_PUBLIC_IS_CYPRESS_ENABLED }}'
1 change: 1 addition & 0 deletions .github/workflows/build-test-deploy-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ jobs:
NEXT_PUBLIC_FIAT_ON_RAMP: 'false'
NEXT_PUBLIC_WALLET_CONNECT_PROJECT_ID: ${{ secrets.WALLET_CONNECT_PROJECT_ID }}
NEXT_PUBLIC_SUBGRAPH_API_KEY: ${{ secrets.NEXT_PUBLIC_SUBGRAPH_API_KEY }}
NEXT_PUBLIC_IS_CYPRESS_ENABLED: 'true'

- name: Upload artifacts
uses: ./.github/actions/upload-artifacts
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/build-test-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ jobs:
NEXT_PUBLIC_FIAT_ON_RAMP: 'false'
NEXT_PUBLIC_WALLET_CONNECT_PROJECT_ID: ${{ secrets.WALLET_CONNECT_PROJECT_ID }}
NEXT_PUBLIC_SUBGRAPH_API_KEY: ${{ secrets.NEXT_PUBLIC_SUBGRAPH_API_KEY }}
NEXT_PUBLIC_IS_CYPRESS_ENABLED: 'false'

- name: Upload artifacts
uses: ./.github/actions/upload-artifacts
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,5 @@ jobs:
uses: actions/checkout@v3
- name: 'Dependency Review'
uses: actions/dependency-review-action@v2
with:
fail-on-severity: high
12 changes: 3 additions & 9 deletions .github/workflows/update-prod-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,8 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
environment: [
{
name: 'Production',
domain: 'app.aave.com',
artifact: 'out',
build_path: 'out'
}
]
environment:
[{ name: 'Production', domain: 'app.aave.com', artifact: 'out', build_path: 'out' }]
environment:
name: ${{ matrix.environment.name }}
url: https://${{ matrix.environment.domain }}
Expand Down Expand Up @@ -64,4 +58,4 @@ jobs:
artifacts: app.tar.gz
bodyFile: release-notes.md
commit: '${{ github.sha }}'
tag: '${{ env.TAG }}'
tag: '${{ env.TAG }}'
1 change: 1 addition & 0 deletions custom.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@ namespace NodeJS {
NEXT_PUBLIC_WALLET_CONNECT_PROJECT_ID: string;
NEXT_PUBLIC_FIAT_ON_RAMP: string;
NEXT_PUBLIC_SUBGRAPH_API_KEY: string;
NEXT_PUBLIC_IS_CYPRESS_ENABLED: string;
}
}
4 changes: 2 additions & 2 deletions cypress/e2e/4-gho-ethereum/helpers/token.helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,12 @@ const donors: Donors = {
},
aMATICPolygonV2: {
name: 'aMATIC',
donorWalletAddress: '0x7068Ea5255cb05931EFa8026Bd04b18F3DeB8b0B',
donorWalletAddress: '0xaFDAbFb6227507fF6522b8a242168F6b5F353a6E',
tokenAddress: '0x8dF3aad3a84da6b69A4DA8aeC3eA40d9091B2Ac4',
},
aAVAXAvalancheV2: {
name: 'aAVAX',
donorWalletAddress: '0xe5dbFF893E6120C0d013FB046cd755990E4BE9a9',
donorWalletAddress: '0x36cc7B13029B5DEe4034745FB4F24034f3F2ffc6',
tokenAddress: '0xDFE521292EcE2A4f44242efBcD66Bc594CA9714B',
},
};
Expand Down
1 change: 1 addition & 0 deletions cypress/support/commands.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import 'cypress-wait-until';
// import { Provider } from '@ethersproject/providers';

import { CustomizedBridge } from './tools/bridge';

Expand Down
25 changes: 16 additions & 9 deletions cypress/support/tools/bridge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export class CustomizedBridge extends Eip1193Bridge {
chainId: number;

constructor(signer: Signer, provider?: providers.Provider, chainId?: number) {
super(signer, provider);
super(signer as any, provider);
this.chainId = chainId || 3030;
}

Expand Down Expand Up @@ -76,14 +76,17 @@ export class CustomizedBridge extends Eip1193Bridge {
);
return tx;
}
if (method === 'eth_chainId') {
if (isCallbackForm) {
// @ts-ignore
callback(null, { result: this.chainId });
} else {
return Promise.resolve(this.chainId);
}
}
// if (method === 'eth_chainId') {
// const result = await this.provider.getNetwork();
// const chainId = utils.hexValue(result.chainId);

// if (isCallbackForm) {
// // @ts-ignore
// callback(null, { result: chainId });
// } else {
// return Promise.resolve(chainId);
// }
// }
if (method === 'eth_sendTransaction') {
if (!this.signer) {
throw new Error('eth_sendTransaction requires an account');
Expand All @@ -98,6 +101,10 @@ export class CustomizedBridge extends Eip1193Bridge {
const req = JsonRpcProvider.hexlifyTransaction(params[0], { from: true, gas: true });

req.gasLimit = req.gas;
// @ts-ignore
// Work around to force the chainId to be used for the fork environments
req.chainId = this.chainId;

delete req.gas;

const tx = await this.signer.sendTransaction(req);
Expand Down
1 change: 1 addition & 0 deletions cypress/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"compilerOptions": {
"noEmit": true,
"types": ["cypress", "cypress-wait-until"],
"sourceMap": false,
},
"include": [
"../node_modules/cypress",
Expand Down
23 changes: 23 additions & 0 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,33 @@ module.exports = withBundleAnalyzer({
],
});
config.experiments = { topLevelAwait: true };
config.resolve.fallback = { fs: false, net: false, tls: false };
return config;
},
reactStrictMode: true,
// assetPrefix: "./",
trailingSlash: true,
pageExtensions,
// NOTE: Needed for SAFE testing locally
// async headers() {
// return [
// {
// source: '/manifest.json',
// headers: [
// {
// key: 'Access-Control-Allow-Origin',
// value: '*',
// },
// {
// key: 'Access-Control-Allow-Methods',
// value: 'GET',
// },
// {
// key: 'Access-Control-Allow-Headers',
// value: 'X-Requested-With, content-type, Authorization',
// },
// ],
// },
// ];
// },
});
31 changes: 12 additions & 19 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,14 @@
"@emotion/server": "latest",
"@emotion/styled": "11.10.4",
"@gelatonetwork/relay-sdk": "^5.5.5",
"@gnosis.pm/safe-apps-web3-react": "^1.2.0",
"@heroicons/react": "^1.0.6",
"@lingui/react": "^3.14.0",
"@mui/icons-material": "^5.10.14",
"@mui/lab": "5.0.0-alpha.103",
"@mui/material": "^5.10.9",
"@paraswap/sdk": "6.10.0",
"@safe-global/safe-apps-provider": "^0.18.4",
"@safe-global/safe-apps-sdk": "^9.1.0",
"@tanstack/react-query": "^4.28.0",
"@visx/annotation": "^3.3.0",
"@visx/axis": "^2.14.0",
Expand All @@ -57,16 +58,8 @@
"@visx/scale": "^2.2.2",
"@visx/shape": "^2.12.2",
"@visx/tooltip": "^2.16.0",
"@walletconnect/ethereum-provider": "^2.13.3",
"@walletconnect/modal": "2.7.0",
"@web3-react/abstract-connector": "^6.0.7",
"@web3-react/core": "^6.1.9",
"@web3-react/frame-connector": "^6.0.9",
"@web3-react/injected-connector": "^6.0.7",
"@web3-react/torus-connector": "^6.2.9",
"@web3-react/types": "^6.0.7",
"@web3-react/walletlink-connector": "^6.2.14",
"blo": "^1.1.1",
"connectkit": "^1.8.2",
"d3-array": "^3.2.0",
"d3-time-format": "^4.1.0",
"dayjs": "^1.11.5",
Expand All @@ -78,25 +71,27 @@
"immer": "^9.0.15",
"micro-memoize": "^4.1.2",
"mixpanel-browser": "^2.45.0",
"next": "12.1.1",
"react": "latest",
"next": "12.3.4",
"react": "^18.0.0",
"react-cookie-consent": "^8.0.1",
"react-dom": "latest",
"react-dom": "^18.0.0",
"react-infinite-scroller": "^1.2.6",
"react-lazy-load": "^4.0.1",
"react-markdown": "^8.0.7",
"react-number-format": "^4.9.1",
"reflect-metadata": "^0.1.13",
"remark-gfm": "^3.0.1",
"tiny-invariant": "^1.3.1",
"viem": "2.x",
"wagmi": "^2.13.5",
"zustand": "^4.1.4"
},
"devDependencies": {
"@babel/core": "^7.19.3",
"@babel/plugin-proposal-class-properties": "^7.18.6",
"@commitlint/cli": "^17.3.0",
"@commitlint/config-conventional": "^17.1.0",
"@ethersproject/experimental": "^5.5.0",
"@ethersproject/experimental": "^5.7.0",
"@ethersproject/providers": "^5.5.3",
"@lingui/cli": "^3.15.0",
"@lingui/macro": "^3.15.0",
Expand All @@ -113,6 +108,7 @@
"@types/react": "latest",
"@types/react-infinite-scroller": "^1.2.3",
"@typescript-eslint/eslint-plugin": "^5.38.1",
"@welldone-software/why-did-you-render": "^8.0.3",
"axios": "^1.6.2",
"babel-plugin-macros": "^3.1.0",
"cypress": "10.9.0",
Expand All @@ -125,15 +121,12 @@
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-simple-import-sort": "^8.0.0",
"husky": ">=8",
"husky": "^8.0.3",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"lint-staged": "^13.0.3",
"prettier": "^2.8.1",
"typescript": "^4.9.4"
},
"resolutions": {
"@web3-react/walletlink-connector/@coinbase/wallet-sdk": "3.1.0"
"typescript": "^5.0.4"
},
"contributors": [
"Anastasia Khovaeva <[email protected]>",
Expand Down
Loading
Loading