Skip to content

Commit

Permalink
chore: adopt new ens graph api, static graphql codegen (#1588)
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielSinclair authored Jun 22, 2024
1 parent 58c087c commit de6f3c1
Show file tree
Hide file tree
Showing 15 changed files with 6,881 additions and 41 deletions.
1 change: 1 addition & 0 deletions .env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ declare global {
RPC_PROXY_API_KEY: string;
RPC_PROXY_BASE_URL: string;
RPC_PROXY_ENABLED: 'true' | 'false';
GRAPH_ENS_API_KEY: string;
// Firebase Remote Config
FIREBASE_API_KEY_BX: string;
FIREBASE_AUTH_DOMAIN_BX: string;
Expand Down
2 changes: 1 addition & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ docs/
.env.d.ts
scripts/
static/
__generated__
src/core/graphql/__generated__/
6 changes: 0 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,6 @@ jobs:
- name: Set IS_TESTING=true
run: |
sed -i 's/IS_TESTING.*/IS_TESTING=true/g' .env
- name: Graphql Setup
run: yarn graphql-setup
- name: Fetch networks
run: yarn fetch:networks
- name: Build the extension
Expand Down Expand Up @@ -413,8 +411,6 @@ jobs:
target: wasm32-unknown-unknown
profile: minimal
override: true
- name: Graphql Setup
run: yarn graphql-setup
- name: Fetch networks
run: yarn fetch:networks
- name: Install Anvil
Expand Down Expand Up @@ -451,8 +447,6 @@ jobs:
run: tar xzf node_modules.tar.gz
- name: DS Setup
run: yarn ds:install
- name: Graphql Setup
run: yarn graphql-setup
- name: Fetch networks
run: yarn fetch:networks
- name: Lint
Expand Down
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ yarn-error.log
build/
screenshots/

src/core/graphql/__generated__/

# Anvil logs
anvil*.log

Expand Down
2 changes: 1 addition & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
build/
__generated__
src/core/graphql/__generated__/
2 changes: 1 addition & 1 deletion e2e/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -739,7 +739,7 @@ export async function connectToTestDapp(driver: WebDriver) {

const mmButton = await querySelector(
driver,
'[data-testid="rk-wallet-option-rainbow"]',
'[data-testid="rk-wallet-option-me.rainbow"]',
);
await waitAndClick(mmButton, driver);

Expand Down
2 changes: 1 addition & 1 deletion e2e/serial/dappInteractions/1_appInteractionsFlow.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ describe.runIf(browser !== 'firefox')('App interactions flow', () => {
await driver.navigate().refresh();
}

const expectedNetwork = 'Network: Ethereum - homestead';
const expectedNetwork = 'Network: Ethereum';
const network = await querySelector(driver, '[id="network"]');
const actualNetwork = await network.getText();
expect(actualNetwork).toEqual(expectedNetwork);
Expand Down
2 changes: 1 addition & 1 deletion e2e/serial/dappInteractions/3_dappAccountsSwitcher.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ describe.runIf(browser !== 'firefox')('Dapp accounts switcher flow', () => {
});
expect(walletItemBadge).toBeTruthy();
await goToTestApp(driver);
const expectedNetwork = 'Network: Polygon - matic';
const expectedNetwork = 'Network: Polygon';
const network = await querySelector(driver, '[id="network"]');
const actualNetwork = await network.getText();
expect(actualNetwork).toEqual(expectedNetwork);
Expand Down
10 changes: 6 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@
"playground:ds": "PLAYGROUND=ds webpack --config ./webpack.config.dev.js --watch",
"lint": "eslint --cache --max-warnings 0",
"typecheck": "tsc --noEmit",
"// Fetch backend networks": "",
"// Fetch backend networks": "",
"fetch:networks": "node scripts/networks.js",
"// Design System scripts": "",
"// GraphQL scripts": "",
"graphql-setup": "yarn graphql-codegen:install && yarn graphql-codegen",
"graphql-codegen:install": "yarn install --cwd src/core/graphql",
"graphql-codegen": "cd src/core/graphql && yarn codegen",
"graphql-codegen": "export GRAPH_ENS_API_KEY=$(grep GRAPH_ENS_API_KEY .env | cut -d '=' -f2) && cd src/core/graphql && yarn codegen",
"ds:install": "yarn install --cwd src/design-system/docs",
"ds": "cd src/design-system/docs && yarn dev",
"ds:build": "cd src/design-system/docs && yarn build",
Expand All @@ -45,7 +45,7 @@
"// Checks the lockfile for changes": "",
"check-lockfile": "./scripts/check-lockfile.sh",
"// Installs deps, runs allowed scripts, patches packages and generates lavamoat policies": "",
"setup": "yarn install && yarn ds:install && yarn graphql-setup && yarn ds:generate-symbols && yarn fetch:networks && yarn allow-scripts && yarn patch-package && yarn policy",
"setup": "yarn install && yarn ds:install && yarn ds:generate-symbols && yarn fetch:networks && yarn allow-scripts && yarn patch-package && yarn policy",
"// runs audit against dep. tree": "",
"audit:ci": "yarn audit-ci --moderate --config audit-ci.jsonc",
"// Generates a zip file based on the build folder ready to upload to the chrome web store": "",
Expand Down Expand Up @@ -134,6 +134,7 @@
"firebase": "9.18.0",
"framer-motion": "10.2.3",
"graphql-request": "5.2.0",
"graphql-tag": "^2.11.0",
"i18n-js": "4.1.1",
"idna-uts46-hx": "3.5.0",
"imgix-core-js": "2.3.2",
Expand Down Expand Up @@ -229,7 +230,8 @@
"webpack-bundle-analyzer": "4.8.0",
"webpack-cli": "5.1.4",
"webpack-extension-reloader": "rainbow-me/webpack-extension-reloader#23fc3ed1f59f295702d459ad58aec90d6f0a3551",
"worker-loader": "3.0.8"
"worker-loader": "3.0.8",
"@graphql-eslint/eslint-plugin": "3.10.7"
},
"resolutions": {
"tar": "6.2.1",
Expand Down
Loading

0 comments on commit de6f3c1

Please sign in to comment.