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/wallet framework update #2275

Closed
wants to merge 82 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
82 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
de78b7b
Merge branch 'feat/wallet-framework-update' of github.com:aave/interf…
foodaka 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
7cb90d7
Merge branch 'feat/wallet-framework-update' of github.com:aave/interf…
foodaka Dec 13, 2024
43537f5
fix: remove watch
grothem Dec 13, 2024
09f2256
Merge branch 'feat/wallet-framework-update' of github.com:aave/interf…
foodaka 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
f584be7
Merge branch 'feat/wallet-framework-update' of github.com:aave/interf…
foodaka Dec 16, 2024
23d4379
feat: test wagmi
grothem Dec 17, 2024
252fdd5
fix: ethers adapters
grothem Dec 18, 2024
4a7e61c
Merge branch 'feat/wallet-framework-update' of github.com:aave/interf…
foodaka Dec 18, 2024
b18f246
feat: dep upgrades
grothem Dec 18, 2024
6238f5f
Merge branch 'main' into feat/wallet-framework-update
grothem Dec 19, 2024
20e2627
fix: package json
grothem Dec 19, 2024
383a573
fix: cleanup
grothem Dec 19, 2024
5d8d624
Merge branch 'feat/wallet-framework-update' of github.com:aave/interf…
foodaka Dec 19, 2024
83162c0
chore: zustand upgrade
grothem Dec 20, 2024
d5e8b95
Merge branch 'feat/wallet-framework-update' of github.com:aave/interf…
foodaka Dec 20, 2024
51a58fd
fix: state deps
grothem Dec 20, 2024
009b1ee
fix: lint
grothem Dec 20, 2024
213006a
Merge branch 'feat/wallet-framework-update' of github.com:aave/interf…
foodaka Dec 20, 2024
9c12f5c
chore: remove wc tests
foodaka Dec 20, 2024
e4482c0
fix: cypress init, tx errors
grothem Dec 20, 2024
25e7740
test: skip tests
grothem Dec 20, 2024
6286a83
change severity dependency-review
alexmance Jan 2, 2025
1b0eb31
Merge branch 'main' into feat/wallet-framework-update
foodaka Jan 2, 2025
fa7e993
Merge branch 'feat/wallet-framework-update' of github.com:aave/interf…
foodaka Jan 2, 2025
a190332
bump download-artifact action version
alexmance Jan 2, 2025
11878bd
chore: remove debug
foodaka Jan 2, 2025
149ab2d
Merge branch 'feat/wallet-framework-update' of github.com:aave/interf…
foodaka Jan 2, 2025
73968c0
increase retention-days on artifacts
alexmance Jan 2, 2025
daac7cf
chore: fix typsecript issue
foodaka Jan 2, 2025
bdc894a
bump version of upload artifacts
alexmance Jan 2, 2025
c2db0c3
Merge branch 'feat/wallet-framework-update' of github.com:aave/interf…
foodaka Jan 2, 2025
275d3ed
bump version of upload&download artifacts
alexmance Jan 2, 2025
306bad6
restore version plus add overwrite to true
alexmance Jan 2, 2025
e5dc4cd
remove overwrite:true on upload-artifact
alexmance Jan 2, 2025
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 }}'
3 changes: 3 additions & 0 deletions .github/actions/upload-artifacts/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,14 @@ runs:
name: pr
path: __pr/
retention-days: 10

- name: store static build
uses: actions/upload-artifact@6673cd052c4cd6fcf4b4e6e60ea986c889389535 # v3.0.0
with:
name: '${{ inputs.BUILD_ARTIFACT_NAME }}'
path: out/
retention-days: 10

- name: store nextjs build
if: inputs.NEXTJS_BUILD == 'true'
uses: actions/upload-artifact@6673cd052c4cd6fcf4b4e6e60ea986c889389535 # v3.0.0
Expand All @@ -44,3 +46,4 @@ runs:
.next
!.next/cache
retention-days: 10

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
5 changes: 3 additions & 2 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 Expand Up @@ -113,7 +114,7 @@ jobs:
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2

- name: download build
uses: actions/download-artifact@fb598a63ae348fa914e94cd0ff38f362e927b741 # v3.0.0
uses: actions/download-artifact@v4.1.8 # v3.0.0
with:
name: nextjs_build
path: .next
Expand All @@ -136,7 +137,7 @@ jobs:
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2

- name: download build
uses: actions/download-artifact@fb598a63ae348fa914e94cd0ff38f362e927b741 # v3.0.0
uses: actions/download-artifact@v4.1.8 # v3.0.0
with:
name: out
path: out
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: critical
14 changes: 4 additions & 10 deletions .github/workflows/update-prod-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,16 @@ 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 }}
steps:
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2

- name: download build
uses: actions/download-artifact@fb598a63ae348fa914e94cd0ff38f362e927b741 # v3.0.0
uses: actions/download-artifact@v4.1.8 # v3.0.0
with:
name: ${{ matrix.environment.artifact }}
path: ${{ matrix.environment.build_path }}
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;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const testData = {
],
};

describe('METIS GENERAL SPEC', () => {
describe.skip('METIS GENERAL SPEC', () => {
const skipTestState = skipState(false);
configEnvMetis('0xea4198Fa2BD2b459967E72f508ff42dDaBb0ff27');
dashboardAssetValuesVerification(testData.dashboard, skipTestState);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const testData = {
],
};

describe('SCROLL GENERAL SPEC', () => {
describe.skip('SCROLL GENERAL SPEC', () => {
const skipTestState = skipState(false);
configEnvScroll('0xF93457533efd041D2A5200A82ccA718Fcdc42103');
dashboardAssetValuesVerification(testData.dashboard, skipTestState);
Expand Down
41 changes: 0 additions & 41 deletions cypress/e2e/2-settings/wallet-connect.cy.ts

This file was deleted.

1 change: 1 addition & 0 deletions cypress/e2e/3-stake-governance/stake.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ testCases.forEach(
const skipTestState = skipState(false);
configEnvWithTenderlyMainnetFork({
tokens: [{ tokenAddress: testCase.asset.address }],
urlSuffix: '/staking',
});
stake(
{
Expand Down
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
13 changes: 11 additions & 2 deletions cypress/support/steps/configuration.steps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,15 @@ export const configEnvWithTenderly = ({
unpause,
wallet,
enableTestnet = false,
urlSuffix = '',
}: {
chainId: number;
market: string;
tokens?: { tokenAddress: string; donorAddress?: string; tokenCount?: string }[];
unpause?: boolean;
wallet?: { address: string; privateKey: string };
enableTestnet?: boolean;
urlSuffix?: string;
}) => {
const tenderly = new TenderlyFork({ forkNetworkID: chainId });
const walletAddress: string = wallet != null ? wallet.address : DEFAULT_TEST_ACCOUNT.address;
Expand Down Expand Up @@ -51,10 +53,15 @@ export const configEnvWithTenderly = ({
}
});
before('Open main page', () => {
let url = URL as string;
if (urlSuffix) {
url = `${url}/${urlSuffix}`;
}

const rpc = tenderly.get_rpc_url();
provider = new JsonRpcProvider(rpc, 3030);
signer = new Wallet(privateKey, provider);
cy.visit(URL, {
cy.visit(url, {
onBeforeLoad(win) {
// eslint-disable-next-line
(win as any).ethereum = new CustomizedBridge(signer, provider);
Expand Down Expand Up @@ -100,13 +107,15 @@ const createConfigWithTenderlyFork =
tokens,
v3,
wallet,
urlSuffix,
}: {
market?: string;
tokens?: { tokenAddress: string }[];
v3?: boolean;
wallet?: { address: string; privateKey: string };
urlSuffix?: string;
}) =>
configEnvWithTenderly({ chainId, market, tokens, unpause: v3, wallet });
configEnvWithTenderly({ chainId, market, tokens, unpause: v3, wallet, urlSuffix });

export const configEnvWithTenderlyMainnetFork = createConfigWithTenderlyFork(
ChainId.mainnet,
Expand Down
1 change: 0 additions & 1 deletion cypress/support/steps/stake.steps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ export const stake = (
return describe(`Stake ${_shortName}`, () => {
skipSetup({ skip, updateSkipStatus });
it(`Open staking page`, () => {
cy.get('[data-cy="menuStake"]').click();
if (asset.shortName === 'GHO') cy.wait(5000);
cy.get(`button[value="${tabValue}"]`).then(($clickable) => {
if ($clickable.prop('disabled')) return;
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',
// },
// ],
// },
// ];
// },
});
Loading
Loading