Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Install dependencies
run: npm install -g yarn && yarn
- name: Install Playwright Browsers
run: yarn playwright install --with-deps
run: yarn workspace @se-2/nextjs exec playwright install --with-deps
- name: Build Next.js app
run: yarn build
- name: Start Next.js app and run tests
Expand Down
6 changes: 0 additions & 6 deletions .lintstagedrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,9 @@ const buildNextEslintCommand = (filenames) =>

const checkTypesNextCommand = () => "yarn next:check-types";

const buildHardhatEslintCommand = (filenames) =>
`yarn hardhat:lint-staged --fix ${filenames
.map((f) => path.relative(path.join("packages", "hardhat"), f))
.join(" ")}`;

module.exports = {
"packages/nextjs/**/*.{ts,tsx}": [
buildNextEslintCommand,
checkTypesNextCommand,
],
"packages/hardhat/**/*.{ts,tsx}": [buildHardhatEslintCommand],
};
15 changes: 2 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,25 +1,14 @@
{
"name": "se-2",
"name": "address-vision",
"version": "0.0.1",
"private": true,
"workspaces": {
"packages": [
"packages/hardhat",
"packages/nextjs"
]
},
"scripts": {
"account": "yarn workspace @se-2/hardhat account",
"chain": "yarn workspace @se-2/hardhat chain",
"fork": "yarn workspace @se-2/hardhat fork",
"deploy": "yarn workspace @se-2/hardhat deploy",
"verify": "yarn workspace @se-2/hardhat verify",
"compile": "yarn workspace @se-2/hardhat compile",
"generate": "yarn workspace @se-2/hardhat generate",
"hardhat:lint": "yarn workspace @se-2/hardhat lint",
"hardhat:lint-staged": "yarn workspace @se-2/hardhat lint-staged",
"hardhat:test": "yarn workspace @se-2/hardhat test",
"test": "yarn hardhat:test",
"test": "yarn workspace @se-2/nextjs playwright",
"playwright": "yarn workspace @se-2/nextjs playwright",
"start": "yarn workspace @se-2/nextjs dev",
"next:lint": "yarn workspace @se-2/nextjs lint",
Expand Down
1 change: 1 addition & 0 deletions packages/nextjs/components/address-vision/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ export const Navbar = () => {
setInputValue(resolvedAddress);
}
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [ensName, resolvedAddress]);

useEffect(() => {
Expand Down
1 change: 1 addition & 0 deletions packages/nextjs/components/address-vision/NetworkCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ export const NetworkCard = ({ chain }: { chain: Chain }) => {
if (shouldFetch) {
setTokenBalances();
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [address, tokenBalancesData]);

if (nftData === undefined || tokenBalancesData === undefined || !shouldFetch) {
Expand Down
2 changes: 2 additions & 0 deletions packages/nextjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
"lint": "next lint",
"format": "prettier --write . '!(node_modules|.next|contracts)/**/*'",
"check-types": "tsc --noEmit --incremental",
"test": "playwright test",
"playwright": "playwright test",
"vercel": "vercel",
"vercel:yolo": "vercel --build-env NEXT_PUBLIC_IGNORE_BUILD_ERROR=true"
},
Expand Down
1 change: 1 addition & 0 deletions packages/nextjs/pages/[address].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ const AddressPage: NextPage<Props> = ({ address }) => {
} else if (isAddress(addyOrEns)) {
setResolvedAddress(addyOrEns);
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [router]);

let cardWidthClass = "lg:w-1/3";
Expand Down
Binary file removed packages/nextjs/public/assets/gradient-bg.png
Binary file not shown.
Binary file removed packages/nextjs/public/assets/switch-button-off.png
Binary file not shown.
Binary file removed packages/nextjs/public/assets/switch-button-on.png
Binary file not shown.
2 changes: 1 addition & 1 deletion packages/nextjs/tests/address.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ test.describe("Address Page", () => {
// Handle new page
const newPage = await pagePromise;
await newPage.waitForLoadState();
await expect(newPage).toHaveURL(new RegExp(`blockscan\\.com/address/${testAddress}`, "i"));
expect(newPage.url().toLowerCase()).toContain("blockscan.com/address/" + testAddress);
});

test("theme switcher works", async ({ page }) => {
Expand Down
22 changes: 11 additions & 11 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2947,6 +2947,15 @@ __metadata:
languageName: node
linkType: hard

"address-vision@workspace:.":
version: 0.0.0-use.local
resolution: "address-vision@workspace:."
dependencies:
husky: ^8.0.1
lint-staged: ^13.0.3
languageName: unknown
linkType: soft

"agent-base@npm:6, agent-base@npm:^6.0.2":
version: 6.0.2
resolution: "agent-base@npm:6.0.2"
Expand Down Expand Up @@ -9345,15 +9354,6 @@ __metadata:
languageName: node
linkType: hard

"se-2@workspace:.":
version: 0.0.0-use.local
resolution: "se-2@workspace:."
dependencies:
husky: ^8.0.1
lint-staged: ^13.0.3
languageName: unknown
linkType: soft

"secp256k1@npm:^5.0.0":
version: 5.0.0
resolution: "secp256k1@npm:5.0.0"
Expand Down Expand Up @@ -10662,9 +10662,9 @@ __metadata:
languageName: node
linkType: hard

"usehooks-ts@patch:usehooks-ts@npm:^2.7.2#./.yarn/patches/usehooks-ts-npm-2.7.2-fceffe0e43.patch::locator=se-2%40workspace%3A.":
"usehooks-ts@patch:usehooks-ts@npm:^2.7.2#./.yarn/patches/usehooks-ts-npm-2.7.2-fceffe0e43.patch::locator=address-vision%40workspace%3A.":
version: 2.9.1
resolution: "usehooks-ts@patch:usehooks-ts@npm%3A2.9.1#./.yarn/patches/usehooks-ts-npm-2.7.2-fceffe0e43.patch::version=2.9.1&hash=68bde7&locator=se-2%40workspace%3A."
resolution: "usehooks-ts@patch:usehooks-ts@npm%3A2.9.1#./.yarn/patches/usehooks-ts-npm-2.7.2-fceffe0e43.patch::version=2.9.1&hash=68bde7&locator=address-vision%40workspace%3A."
peerDependencies:
react: ^16.8.0 || ^17.0.0 || ^18.0.0
react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0
Expand Down