diff --git a/packages/apps/.env b/.env similarity index 100% rename from packages/apps/.env rename to .env diff --git a/packages/apps/.env.development b/.env.development similarity index 100% rename from packages/apps/.env.development rename to .env.development diff --git a/packages/apps/.env.production b/.env.production similarity index 100% rename from packages/apps/.env.production rename to .env.production diff --git a/packages/apps/.env.test b/.env.test similarity index 100% rename from packages/apps/.env.test rename to .env.test diff --git a/packages/apps/.eslintrc.json b/.eslintrc.json similarity index 100% rename from packages/apps/.eslintrc.json rename to .eslintrc.json diff --git a/packages/apps/global.d.ts b/global.d.ts similarity index 100% rename from packages/apps/global.d.ts rename to global.d.ts diff --git a/packages/apps/jest.config.js b/jest.config.js similarity index 100% rename from packages/apps/jest.config.js rename to jest.config.js diff --git a/packages/apps/jest.setup.js b/jest.setup.js similarity index 99% rename from packages/apps/jest.setup.js rename to jest.setup.js index 5f4ebe034..8361e3585 100644 --- a/packages/apps/jest.setup.js +++ b/jest.setup.js @@ -76,7 +76,7 @@ const config = { // An enum that specifies notification mode. Requires { notify: true } // notifyMode: "failure-change", // A preset that is used as a base for Jest's configuration - // preset: undefined, + preset: "ts-jest", // Run tests from one or more projects // projects: undefined, // Use this configuration option to add custom reporters to Jest @@ -106,7 +106,7 @@ const config = { // A list of paths to snapshot serializer modules Jest should use for snapshot testing // snapshotSerializers: [], // The test environment that will be used for testing - // testEnvironment: "jsdom", + testEnvironment: "node", // Options that will be passed to the testEnvironment // testEnvironmentOptions: {}, // Adds a location field to test results diff --git a/packages/apps/next.config.js b/next.config.js similarity index 85% rename from packages/apps/next.config.js rename to next.config.js index f46922245..9dd90f86f 100644 --- a/packages/apps/next.config.js +++ b/next.config.js @@ -1,5 +1,6 @@ /** @type {import('next').NextConfig} */ const nextConfig = { + distDir: "/packages/apps/.next", webpack: (config) => { config.externals.push("lokijs", "encoding", "pino-pretty"); return config; diff --git a/package-lock.json b/package-lock.json index eb1ee7d16..a9e6667ac 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6,14 +6,45 @@ "": { "name": "helix-ui", "license": "MIT", - "workspaces": [ - "packages/*" - ], + "dependencies": { + "@apollo/client": "^3.8.2", + "@floating-ui/react": "^0.25.2", + "@polkadot/api": "^10.11.1", + "@rainbow-me/rainbowkit": "^1.3.0", + "date-fns": "^2.30.0", + "date-fns-tz": "^2.0.0", + "graphql": "^16.8.0", + "next": "14.0.3", + "react": "18.2.0", + "react-dom": "18.2.0", + "react-jazzicon": "^1.0.4", + "react-transition-group": "^4.4.5", + "sharp": "^0.32.6", + "viem": "^1.19.9", + "wagmi": "^1.4.7" + }, "devDependencies": { + "@jest/globals": "^29.7.0", + "@types/node": "^20.5.0", + "@types/react": "^18.2.20", + "@types/react-dom": "^18.2.7", + "@types/react-transition-group": "^4.4.6", + "autoprefixer": "^10.4.15", + "eslint": "^8.47.0", + "eslint-config-next": "^13.4.16", + "eslint-config-prettier": "^9.0.0", "husky": "^8.0.0", + "jest": "^29.7.0", "lint-staged": "^14.0.0", + "postcss": "^8.4.27", "prettier": "3.0.1", - "prettier-plugin-tailwindcss": "^0.5.2" + "prettier-plugin-tailwindcss": "^0.5.2", + "tailwindcss": "^3.3.3", + "ts-jest": "^29.1.1", + "typescript": "^5.1.6" + }, + "engines": { + "node": ">=16.8.0" } }, "node_modules/@aashutoshrathi/word-wrap": { @@ -4683,10 +4714,6 @@ "node": ">= 8" } }, - "node_modules/apps": { - "resolved": "packages/apps", - "link": true - }, "node_modules/arch": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/arch/-/arch-2.2.0.tgz", @@ -5281,6 +5308,18 @@ "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" } }, + "node_modules/bs-logger": { + "version": "0.2.6", + "resolved": "https://registry.npmjs.org/bs-logger/-/bs-logger-0.2.6.tgz", + "integrity": "sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog==", + "dev": true, + "dependencies": { + "fast-json-stable-stringify": "2.x" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/bs58": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz", @@ -7710,10 +7749,6 @@ "node": ">= 0.4" } }, - "node_modules/helix.js": { - "resolved": "packages/helix.js", - "link": true - }, "node_modules/hey-listen": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/hey-listen/-/hey-listen-1.0.8.tgz", @@ -9987,6 +10022,12 @@ "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", "integrity": "sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ==" }, + "node_modules/lodash.memoize": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", + "integrity": "sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag==", + "dev": true + }, "node_modules/lodash.merge": { "version": "4.6.2", "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", @@ -10047,6 +10088,12 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/make-error": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", + "dev": true + }, "node_modules/make-plural": { "version": "7.3.0", "resolved": "https://registry.npmjs.org/make-plural/-/make-plural-7.3.0.tgz", @@ -10083,6 +10130,11 @@ "node": ">= 8" } }, + "node_modules/mersenne-twister": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/mersenne-twister/-/mersenne-twister-1.1.0.tgz", + "integrity": "sha512-mUYWsMKNrm4lfygPkL3OfGzOPTR2DBlTkBNHM//F6hGp8cLThY897crAlk3/Jo17LEOOjQUrNAx6DvgO77QJkA==" + }, "node_modules/micromatch": { "version": "4.0.5", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", @@ -11633,6 +11685,18 @@ "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" }, + "node_modules/react-jazzicon": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/react-jazzicon/-/react-jazzicon-1.0.4.tgz", + "integrity": "sha512-/3kWv5vtAhI18GBFoqjpxRTtL+EImuB73PAC02r/zJQ6E+PAUmoBx8edYvTCIYHwS01uFf6N3elTDqSrVPwg4w==", + "dependencies": { + "mersenne-twister": "^1.1.0" + }, + "peerDependencies": { + "react": ">=17.0.0", + "react-dom": ">=17.0.0" + } + }, "node_modules/react-remove-scroll": { "version": "2.5.4", "resolved": "https://registry.npmjs.org/react-remove-scroll/-/react-remove-scroll-2.5.4.tgz", @@ -12938,6 +13002,49 @@ "node": ">=8" } }, + "node_modules/ts-jest": { + "version": "29.1.1", + "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.1.1.tgz", + "integrity": "sha512-D6xjnnbP17cC85nliwGiL+tpoKN0StpgE0TeOjXQTU6MVCfsB4v7aW05CgQ/1OywGb0x/oy9hHFnN+sczTiRaA==", + "dev": true, + "dependencies": { + "bs-logger": "0.x", + "fast-json-stable-stringify": "2.x", + "jest-util": "^29.0.0", + "json5": "^2.2.3", + "lodash.memoize": "4.x", + "make-error": "1.x", + "semver": "^7.5.3", + "yargs-parser": "^21.0.1" + }, + "bin": { + "ts-jest": "cli.js" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "@babel/core": ">=7.0.0-beta.0 <8", + "@jest/types": "^29.0.0", + "babel-jest": "^29.0.0", + "jest": "^29.0.0", + "typescript": ">=4.3 <6" + }, + "peerDependenciesMeta": { + "@babel/core": { + "optional": true + }, + "@jest/types": { + "optional": true + }, + "babel-jest": { + "optional": true + }, + "esbuild": { + "optional": true + } + } + }, "node_modules/tsconfig-paths": { "version": "3.14.2", "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.14.2.tgz", @@ -13888,6 +13995,7 @@ }, "packages/apps": { "version": "0.1.0", + "extraneous": true, "dependencies": { "@apollo/client": "^3.8.2", "@floating-ui/react": "^0.25.2", @@ -13924,6 +14032,7 @@ }, "packages/helix.js": { "version": "0.1.0", + "extraneous": true, "license": "MIT" } } diff --git a/package.json b/package.json index b48899126..dde9b907a 100644 --- a/package.json +++ b/package.json @@ -3,21 +3,18 @@ "description": "Helix UI", "private": true, "scripts": { - "dev:apps": "npm run dev -w apps", - "build:apps": "npm run build -w apps", - "start:apps": "npm run start -w apps", - "dev:apps:test": "npm run dev:test -w apps", - "build:apps:test": "npm run build:test -w apps", - "start:apps:test": "npm run start:test -w apps", + "dev:apps": "next dev -p 3030", + "build:apps": "next build", + "start:apps": "next start", + "dev:apps:test": "NODE_ENV=test next dev -p 3030", + "build:apps:test": "NODE_ENV=test next build", + "start:apps:test": "NODE_ENV=test next start", "prettier": "prettier '**/*.{js,jsx,ts,tsx,json}' --write", - "lint": "npm run lint -w apps", - "test": "npm run test -w apps", + "lint": "next lint", + "test": "jest", "bootstrap": "npm install", "prepare": "husky install" }, - "workspaces": [ - "packages/*" - ], "repository": { "type": "git", "url": "git+https://github.com/helix-bridge/helix-ui.git" @@ -25,17 +22,51 @@ "keywords": [ "helix", "helix-ui", - "helix.js" + "helixbridge" ], "license": "MIT", "bugs": { "url": "https://github.com/helix-bridge/helix-ui/issues" }, "homepage": "https://github.com/helix-bridge/helix-ui#readme", + "dependencies": { + "@apollo/client": "^3.8.2", + "@floating-ui/react": "^0.25.2", + "@polkadot/api": "^10.11.1", + "@rainbow-me/rainbowkit": "^1.3.0", + "date-fns": "^2.30.0", + "date-fns-tz": "^2.0.0", + "graphql": "^16.8.0", + "next": "14.0.3", + "react": "18.2.0", + "react-dom": "18.2.0", + "react-jazzicon": "^1.0.4", + "react-transition-group": "^4.4.5", + "sharp": "^0.32.6", + "viem": "^1.19.9", + "wagmi": "^1.4.7" + }, "devDependencies": { + "@jest/globals": "^29.7.0", + "@types/node": "^20.5.0", + "@types/react": "^18.2.20", + "@types/react-dom": "^18.2.7", + "@types/react-transition-group": "^4.4.6", + "autoprefixer": "^10.4.15", + "eslint": "^8.47.0", + "eslint-config-next": "^13.4.16", + "eslint-config-prettier": "^9.0.0", "husky": "^8.0.0", + "jest": "^29.7.0", "lint-staged": "^14.0.0", + "postcss": "^8.4.27", "prettier": "3.0.1", - "prettier-plugin-tailwindcss": "^0.5.2" + "prettier-plugin-tailwindcss": "^0.5.2", + "tailwindcss": "^3.3.3", + "ts-jest": "^29.1.1", + "typescript": "^5.1.6" + }, + "engines": { + "node": ">=16.8.0" } } diff --git a/packages/apps/.gitignore b/packages/apps/.gitignore deleted file mode 100644 index 8f322f0d8..000000000 --- a/packages/apps/.gitignore +++ /dev/null @@ -1,35 +0,0 @@ -# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. - -# dependencies -/node_modules -/.pnp -.pnp.js - -# testing -/coverage - -# next.js -/.next/ -/out/ - -# production -/build - -# misc -.DS_Store -*.pem - -# debug -npm-debug.log* -yarn-debug.log* -yarn-error.log* - -# local env files -.env*.local - -# vercel -.vercel - -# typescript -*.tsbuildinfo -next-env.d.ts diff --git a/packages/apps/README.md b/packages/apps/README.md index d8ab34fcf..677894154 100644 --- a/packages/apps/README.md +++ b/packages/apps/README.md @@ -1 +1 @@ -# Helix Apps +## For distDir \ No newline at end of file diff --git a/packages/apps/package.json b/packages/apps/package.json deleted file mode 100644 index c1783d774..000000000 --- a/packages/apps/package.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "name": "apps", - "version": "0.1.0", - "private": true, - "scripts": { - "dev": "next dev -p 3030", - "build": "next build", - "start": "next start", - "dev:test": "NODE_ENV=test next dev -p 3030", - "build:test": "NODE_ENV=test next build", - "start:test": "NODE_ENV=test next start", - "lint": "next lint", - "test": "jest" - }, - "dependencies": { - "@apollo/client": "^3.8.2", - "@floating-ui/react": "^0.25.2", - "@polkadot/api": "^10.11.1", - "@rainbow-me/rainbowkit": "^1.3.0", - "date-fns": "^2.30.0", - "date-fns-tz": "^2.0.0", - "graphql": "^16.8.0", - "next": "14.0.3", - "react": "18.2.0", - "react-dom": "18.2.0", - "react-transition-group": "^4.4.5", - "sharp": "^0.32.6", - "viem": "^1.19.9", - "wagmi": "^1.4.7" - }, - "devDependencies": { - "@types/node": "^20.5.0", - "@types/react": "^18.2.20", - "@types/react-dom": "^18.2.7", - "@types/react-transition-group": "^4.4.6", - "autoprefixer": "^10.4.15", - "eslint": "^8.47.0", - "eslint-config-next": "^13.4.16", - "eslint-config-prettier": "^9.0.0", - "jest": "^29.7.0", - "postcss": "^8.4.27", - "tailwindcss": "^3.3.3", - "typescript": "^5.1.6" - }, - "engines": { - "node": ">=16.8.0" - } -} diff --git a/packages/apps/src/components/user.tsx b/packages/apps/src/components/user.tsx deleted file mode 100644 index 69bac4766..000000000 --- a/packages/apps/src/components/user.tsx +++ /dev/null @@ -1,58 +0,0 @@ -import { useApp } from "@/hooks"; -import { UrlSearchParamKey } from "@/types"; -import Dropdown from "@/ui/dropdown"; -import { toShortAdrress } from "@/utils"; -import { useConnectModal } from "@rainbow-me/rainbowkit"; -import Image from "next/image"; -import Link from "next/link"; -import { PropsWithChildren } from "react"; -import { useAccount, useDisconnect } from "wagmi"; - -interface Props { - onComplete?: () => void; -} - -export default function User({ onComplete = () => undefined }: Props) { - const { setRecordsSearch } = useApp(); - - const { address } = useAccount(); - const { disconnect } = useDisconnect(); - const { openConnectModal } = useConnectModal(); - - return address ? ( - {toShortAdrress(address)}} - sameWidth - > - { - setRecordsSearch(address); - onComplete(); - }} - className="user-dropdown-item" - > - History - History - - - - ) : ( - - ); -} - -function LabelSpan({ children }: PropsWithChildren) { - return {children}; -} - -function ChildSpan({ children }: PropsWithChildren) { - return {children}; -} diff --git a/packages/apps/src/config/chains/mumbai.ts b/packages/apps/src/config/chains/mumbai.ts deleted file mode 100644 index befe0a677..000000000 --- a/packages/apps/src/config/chains/mumbai.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { ChainConfig, ChainID } from "@/types/chain"; - -export const mumbaiChain: ChainConfig = { - /** - * Chain - */ - id: ChainID.MUMBAI, - network: "mumbai", - name: "Mumbai", - nativeCurrency: { - name: "MATIC", - symbol: "MATIC", - decimals: 18, - }, - rpcUrls: { - default: { - http: ["https://rpc.ankr.com/polygon_mumbai"], - webSocket: [], - }, - public: { - http: ["https://rpc.ankr.com/polygon_mumbai"], - webSocket: [], - }, - }, - blockExplorers: { - default: { - name: "Polygonscan", - url: "https://mumbai.polygonscan.com/", - }, - }, - testnet: true, - - /** - * Custom - */ - logo: "polygon.png", - tokens: [], -}; diff --git a/packages/apps/src/providers/app-provider.tsx b/packages/apps/src/providers/app-provider.tsx deleted file mode 100644 index b8b96fef1..000000000 --- a/packages/apps/src/providers/app-provider.tsx +++ /dev/null @@ -1,21 +0,0 @@ -"use client"; - -import { Dispatch, PropsWithChildren, SetStateAction, createContext, useState } from "react"; - -interface AppCtx { - recordsSearch: string; - setRecordsSearch: Dispatch>; -} - -const defaultValue: AppCtx = { - recordsSearch: "", - setRecordsSearch: () => undefined, -}; - -export const AppContext = createContext(defaultValue); - -export default function AppProvider({ children }: PropsWithChildren) { - const [recordsSearch, setRecordsSearch] = useState(defaultValue.recordsSearch); - - return {children}; -} diff --git a/packages/apps/src/utils/address.ts b/packages/apps/src/utils/address.ts deleted file mode 100644 index 0fdde6025..000000000 --- a/packages/apps/src/utils/address.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { Address } from "viem"; - -export function toShortAdrress(address: Address) { - return address.length > 16 ? `${address.slice(0, 5)}...${address.slice(-4)}` : address; -} diff --git a/packages/helix.js/README.md b/packages/helix.js/README.md deleted file mode 100644 index 0167a1d75..000000000 --- a/packages/helix.js/README.md +++ /dev/null @@ -1 +0,0 @@ -# helix.js diff --git a/packages/helix.js/package.json b/packages/helix.js/package.json deleted file mode 100644 index 80e1ceeb2..000000000 --- a/packages/helix.js/package.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "name": "helix.js", - "version": "0.1.0", - "private": true, - "description": "helix.js", - "main": "dist/index.js", - "scripts": { - "build": "tsc", - "test": "echo \"Error: no test specified\" && exit 1" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/helix-bridge/helix-ui.git" - }, - "keywords": [ - "helix.js", - "helix" - ], - "license": "MIT", - "bugs": { - "url": "https://github.com/helix-bridge/helix-ui/issues" - }, - "homepage": "https://github.com/helix-bridge/helix-ui#readme" -} diff --git a/packages/helix.js/src/config/index.ts b/packages/helix.js/src/config/index.ts deleted file mode 100644 index cb0ff5c3b..000000000 --- a/packages/helix.js/src/config/index.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/packages/helix.js/src/index.ts b/packages/helix.js/src/index.ts deleted file mode 100644 index 9e034905e..000000000 --- a/packages/helix.js/src/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from "./types"; -export * from "./utils"; diff --git a/packages/helix.js/src/types/index.ts b/packages/helix.js/src/types/index.ts deleted file mode 100644 index cb0ff5c3b..000000000 --- a/packages/helix.js/src/types/index.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/packages/helix.js/src/utils/index.ts b/packages/helix.js/src/utils/index.ts deleted file mode 100644 index cb0ff5c3b..000000000 --- a/packages/helix.js/src/utils/index.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/packages/helix.js/tsconfig.json b/packages/helix.js/tsconfig.json deleted file mode 100644 index 58931dc2d..000000000 --- a/packages/helix.js/tsconfig.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "compilerOptions": { - "lib": ["ES2023"], - "module": "Node16", - "target": "ES2022", - - "strict": true, - "esModuleInterop": true, - "skipLibCheck": true, - "forceConsistentCasingInFileNames": true, - "moduleResolution": "Node16", - "resolveJsonModule": true, - - "outDir": "dist", - "declaration": true, - "declarationMap": true - }, - "include": ["./src/**/*"] -} diff --git a/packages/apps/postcss.config.js b/postcss.config.js similarity index 100% rename from packages/apps/postcss.config.js rename to postcss.config.js diff --git a/packages/apps/public/images/bridge/helix-horizontal.svg b/public/images/bridge/helix-horizontal.svg similarity index 100% rename from packages/apps/public/images/bridge/helix-horizontal.svg rename to public/images/bridge/helix-horizontal.svg diff --git a/packages/apps/public/images/bridge/helix-symbol.svg b/public/images/bridge/helix-symbol.svg similarity index 100% rename from packages/apps/public/images/bridge/helix-symbol.svg rename to public/images/bridge/helix-symbol.svg diff --git a/packages/apps/public/images/bridge/l2arbitrum-horizontal.png b/public/images/bridge/l2arbitrum-horizontal.png similarity index 100% rename from packages/apps/public/images/bridge/l2arbitrum-horizontal.png rename to public/images/bridge/l2arbitrum-horizontal.png diff --git a/packages/apps/public/images/bridge/l2arbitrum-symbol.png b/public/images/bridge/l2arbitrum-symbol.png similarity index 100% rename from packages/apps/public/images/bridge/l2arbitrum-symbol.png rename to public/images/bridge/l2arbitrum-symbol.png diff --git a/packages/apps/public/images/caret-down.svg b/public/images/caret-down.svg similarity index 100% rename from packages/apps/public/images/caret-down.svg rename to public/images/caret-down.svg diff --git a/packages/apps/public/images/caret-right.svg b/public/images/caret-right.svg similarity index 100% rename from packages/apps/public/images/caret-right.svg rename to public/images/caret-right.svg diff --git a/packages/apps/public/images/checked.svg b/public/images/checked.svg similarity index 100% rename from packages/apps/public/images/checked.svg rename to public/images/checked.svg diff --git a/packages/apps/public/images/clock.svg b/public/images/clock.svg similarity index 100% rename from packages/apps/public/images/clock.svg rename to public/images/clock.svg diff --git a/packages/apps/public/images/close-white.svg b/public/images/close-white.svg similarity index 100% rename from packages/apps/public/images/close-white.svg rename to public/images/close-white.svg diff --git a/packages/apps/public/images/close.svg b/public/images/close.svg similarity index 100% rename from packages/apps/public/images/close.svg rename to public/images/close.svg diff --git a/packages/apps/public/images/copy.svg b/public/images/copy.svg similarity index 100% rename from packages/apps/public/images/copy.svg rename to public/images/copy.svg diff --git a/packages/apps/public/images/disconnect.svg b/public/images/disconnect.svg similarity index 100% rename from packages/apps/public/images/disconnect.svg rename to public/images/disconnect.svg diff --git a/packages/apps/public/images/finished.svg b/public/images/finished.svg similarity index 100% rename from packages/apps/public/images/finished.svg rename to public/images/finished.svg diff --git a/packages/apps/public/images/history.svg b/public/images/history.svg similarity index 100% rename from packages/apps/public/images/history.svg rename to public/images/history.svg diff --git a/packages/apps/public/images/info.svg b/public/images/info.svg similarity index 100% rename from packages/apps/public/images/info.svg rename to public/images/info.svg diff --git a/packages/apps/public/images/logo.svg b/public/images/logo.svg similarity index 100% rename from packages/apps/public/images/logo.svg rename to public/images/logo.svg diff --git a/packages/apps/public/images/menu.svg b/public/images/menu.svg similarity index 100% rename from packages/apps/public/images/menu.svg rename to public/images/menu.svg diff --git a/packages/apps/public/images/my.svg b/public/images/my.svg similarity index 100% rename from packages/apps/public/images/my.svg rename to public/images/my.svg diff --git a/packages/apps/public/images/network/arbitrum.png b/public/images/network/arbitrum.png similarity index 100% rename from packages/apps/public/images/network/arbitrum.png rename to public/images/network/arbitrum.png diff --git a/packages/apps/public/images/network/base.png b/public/images/network/base.png similarity index 100% rename from packages/apps/public/images/network/base.png rename to public/images/network/base.png diff --git a/packages/apps/public/images/network/bsc.svg b/public/images/network/bsc.svg similarity index 100% rename from packages/apps/public/images/network/bsc.svg rename to public/images/network/bsc.svg diff --git a/packages/apps/public/images/network/crab.svg b/public/images/network/crab.svg similarity index 100% rename from packages/apps/public/images/network/crab.svg rename to public/images/network/crab.svg diff --git a/packages/apps/public/images/network/darwinia.png b/public/images/network/darwinia.png similarity index 100% rename from packages/apps/public/images/network/darwinia.png rename to public/images/network/darwinia.png diff --git a/packages/apps/public/images/network/ethereum.png b/public/images/network/ethereum.png similarity index 100% rename from packages/apps/public/images/network/ethereum.png rename to public/images/network/ethereum.png diff --git a/packages/apps/public/images/network/gnosis.png b/public/images/network/gnosis.png similarity index 100% rename from packages/apps/public/images/network/gnosis.png rename to public/images/network/gnosis.png diff --git a/packages/apps/public/images/network/linea.png b/public/images/network/linea.png similarity index 100% rename from packages/apps/public/images/network/linea.png rename to public/images/network/linea.png diff --git a/packages/apps/public/images/network/mantle.svg b/public/images/network/mantle.svg similarity index 100% rename from packages/apps/public/images/network/mantle.svg rename to public/images/network/mantle.svg diff --git a/packages/apps/public/images/network/optimism.png b/public/images/network/optimism.png similarity index 100% rename from packages/apps/public/images/network/optimism.png rename to public/images/network/optimism.png diff --git a/packages/apps/public/images/network/pangolin.png b/public/images/network/pangolin.png similarity index 100% rename from packages/apps/public/images/network/pangolin.png rename to public/images/network/pangolin.png diff --git a/packages/apps/public/images/network/pangoro.png b/public/images/network/pangoro.png similarity index 100% rename from packages/apps/public/images/network/pangoro.png rename to public/images/network/pangoro.png diff --git a/packages/apps/public/images/network/polygon.png b/public/images/network/polygon.png similarity index 100% rename from packages/apps/public/images/network/polygon.png rename to public/images/network/polygon.png diff --git a/packages/apps/public/images/network/scroll.png b/public/images/network/scroll.png similarity index 100% rename from packages/apps/public/images/network/scroll.png rename to public/images/network/scroll.png diff --git a/packages/apps/public/images/network/unknown.png b/public/images/network/unknown.png similarity index 100% rename from packages/apps/public/images/network/unknown.png rename to public/images/network/unknown.png diff --git a/packages/apps/public/images/network/zksync.png b/public/images/network/zksync.png similarity index 100% rename from packages/apps/public/images/network/zksync.png rename to public/images/network/zksync.png diff --git a/packages/apps/public/images/no-data.svg b/public/images/no-data.svg similarity index 100% rename from packages/apps/public/images/no-data.svg rename to public/images/no-data.svg diff --git a/packages/apps/public/images/notification/error.svg b/public/images/notification/error.svg similarity index 100% rename from packages/apps/public/images/notification/error.svg rename to public/images/notification/error.svg diff --git a/packages/apps/public/images/notification/info.svg b/public/images/notification/info.svg similarity index 100% rename from packages/apps/public/images/notification/info.svg rename to public/images/notification/info.svg diff --git a/packages/apps/public/images/notification/progress.svg b/public/images/notification/progress.svg similarity index 100% rename from packages/apps/public/images/notification/progress.svg rename to public/images/notification/progress.svg diff --git a/packages/apps/public/images/notification/success.svg b/public/images/notification/success.svg similarity index 100% rename from packages/apps/public/images/notification/success.svg rename to public/images/notification/success.svg diff --git a/packages/apps/public/images/notification/warn.svg b/public/images/notification/warn.svg similarity index 100% rename from packages/apps/public/images/notification/warn.svg rename to public/images/notification/warn.svg diff --git a/packages/apps/public/images/overview.svg b/public/images/overview.svg similarity index 100% rename from packages/apps/public/images/overview.svg rename to public/images/overview.svg diff --git a/packages/apps/public/images/pagination/next-page.svg b/public/images/pagination/next-page.svg similarity index 100% rename from packages/apps/public/images/pagination/next-page.svg rename to public/images/pagination/next-page.svg diff --git a/packages/apps/public/images/pagination/previous-page.svg b/public/images/pagination/previous-page.svg similarity index 100% rename from packages/apps/public/images/pagination/previous-page.svg rename to public/images/pagination/previous-page.svg diff --git a/packages/apps/public/images/refresh.svg b/public/images/refresh.svg similarity index 100% rename from packages/apps/public/images/refresh.svg rename to public/images/refresh.svg diff --git a/packages/apps/public/images/search.svg b/public/images/search.svg similarity index 100% rename from packages/apps/public/images/search.svg rename to public/images/search.svg diff --git a/packages/apps/public/images/social/discord.svg b/public/images/social/discord.svg similarity index 100% rename from packages/apps/public/images/social/discord.svg rename to public/images/social/discord.svg diff --git a/packages/apps/public/images/social/email.svg b/public/images/social/email.svg similarity index 100% rename from packages/apps/public/images/social/email.svg rename to public/images/social/email.svg diff --git a/packages/apps/public/images/social/github.svg b/public/images/social/github.svg similarity index 100% rename from packages/apps/public/images/social/github.svg rename to public/images/social/github.svg diff --git a/packages/apps/public/images/social/twitter.svg b/public/images/social/twitter.svg similarity index 100% rename from packages/apps/public/images/social/twitter.svg rename to public/images/social/twitter.svg diff --git a/packages/apps/public/images/status/pending.svg b/public/images/status/pending.svg similarity index 100% rename from packages/apps/public/images/status/pending.svg rename to public/images/status/pending.svg diff --git a/packages/apps/public/images/status/refunded.svg b/public/images/status/refunded.svg similarity index 100% rename from packages/apps/public/images/status/refunded.svg rename to public/images/status/refunded.svg diff --git a/packages/apps/public/images/status/success.svg b/public/images/status/success.svg similarity index 100% rename from packages/apps/public/images/status/success.svg rename to public/images/status/success.svg diff --git a/packages/apps/public/images/status/unknown.svg b/public/images/status/unknown.svg similarity index 100% rename from packages/apps/public/images/status/unknown.svg rename to public/images/status/unknown.svg diff --git a/packages/apps/public/images/switch.svg b/public/images/switch.svg similarity index 100% rename from packages/apps/public/images/switch.svg rename to public/images/switch.svg diff --git a/packages/apps/public/images/time.svg b/public/images/time.svg similarity index 100% rename from packages/apps/public/images/time.svg rename to public/images/time.svg diff --git a/packages/apps/public/images/token/bnb.svg b/public/images/token/bnb.svg similarity index 100% rename from packages/apps/public/images/token/bnb.svg rename to public/images/token/bnb.svg diff --git a/packages/apps/public/images/token/crab.svg b/public/images/token/crab.svg similarity index 100% rename from packages/apps/public/images/token/crab.svg rename to public/images/token/crab.svg diff --git a/packages/apps/public/images/token/eth.svg b/public/images/token/eth.svg similarity index 100% rename from packages/apps/public/images/token/eth.svg rename to public/images/token/eth.svg diff --git a/packages/apps/public/images/token/kton.svg b/public/images/token/kton.svg similarity index 100% rename from packages/apps/public/images/token/kton.svg rename to public/images/token/kton.svg diff --git a/packages/apps/public/images/token/matic.svg b/public/images/token/matic.svg similarity index 100% rename from packages/apps/public/images/token/matic.svg rename to public/images/token/matic.svg diff --git a/packages/apps/public/images/token/mnt.svg b/public/images/token/mnt.svg similarity index 100% rename from packages/apps/public/images/token/mnt.svg rename to public/images/token/mnt.svg diff --git a/packages/apps/public/images/token/ring.svg b/public/images/token/ring.svg similarity index 100% rename from packages/apps/public/images/token/ring.svg rename to public/images/token/ring.svg diff --git a/packages/apps/public/images/token/unknown.svg b/public/images/token/unknown.svg similarity index 100% rename from packages/apps/public/images/token/unknown.svg rename to public/images/token/unknown.svg diff --git a/packages/apps/public/images/token/usdc.svg b/public/images/token/usdc.svg similarity index 100% rename from packages/apps/public/images/token/usdc.svg rename to public/images/token/usdc.svg diff --git a/packages/apps/public/images/token/usdt.png b/public/images/token/usdt.png similarity index 100% rename from packages/apps/public/images/token/usdt.png rename to public/images/token/usdt.png diff --git a/packages/apps/public/images/token/usdt.svg b/public/images/token/usdt.svg similarity index 100% rename from packages/apps/public/images/token/usdt.svg rename to public/images/token/usdt.svg diff --git a/packages/apps/public/images/token/xdai.png b/public/images/token/xdai.png similarity index 100% rename from packages/apps/public/images/token/xdai.png rename to public/images/token/xdai.png diff --git a/packages/apps/public/images/transfer-to.svg b/public/images/transfer-to.svg similarity index 100% rename from packages/apps/public/images/transfer-to.svg rename to public/images/transfer-to.svg diff --git a/packages/apps/public/images/warning.svg b/public/images/warning.svg similarity index 100% rename from packages/apps/public/images/warning.svg rename to public/images/warning.svg diff --git a/packages/apps/public/next.svg b/public/next.svg similarity index 100% rename from packages/apps/public/next.svg rename to public/next.svg diff --git a/packages/apps/public/vercel.svg b/public/vercel.svg similarity index 100% rename from packages/apps/public/vercel.svg rename to public/vercel.svg diff --git a/packages/apps/src/__tests__/cross-config.spec.ts b/src/__tests__/cross-config.spec.ts similarity index 95% rename from packages/apps/src/__tests__/cross-config.spec.ts rename to src/__tests__/cross-config.spec.ts index dd409b413..75fb3a728 100644 --- a/packages/apps/src/__tests__/cross-config.spec.ts +++ b/src/__tests__/cross-config.spec.ts @@ -1,3 +1,4 @@ +import { describe, expect, it } from "@jest/globals"; import { getChainConfigs, getChainConfig } from "../utils/chain"; import type { ChainConfig } from "../types/chain"; diff --git a/packages/apps/src/__tests__/native-token-config.spec.ts b/src/__tests__/native-token-config.spec.ts similarity index 86% rename from packages/apps/src/__tests__/native-token-config.spec.ts rename to src/__tests__/native-token-config.spec.ts index 2f710055b..219f15698 100644 --- a/packages/apps/src/__tests__/native-token-config.spec.ts +++ b/src/__tests__/native-token-config.spec.ts @@ -1,3 +1,4 @@ +import { describe, expect, it } from "@jest/globals"; import { getChainConfigs } from "../utils/chain"; import type { ChainConfig } from "../types/chain"; diff --git a/packages/apps/src/abi/backing-dvmdvm.ts b/src/abi/backing-dvmdvm.ts similarity index 100% rename from packages/apps/src/abi/backing-dvmdvm.ts rename to src/abi/backing-dvmdvm.ts diff --git a/packages/apps/src/abi/backing-dvmevm.ts b/src/abi/backing-dvmevm.ts similarity index 100% rename from packages/apps/src/abi/backing-dvmevm.ts rename to src/abi/backing-dvmevm.ts diff --git a/packages/apps/src/abi/erc20.ts b/src/abi/erc20.ts similarity index 100% rename from packages/apps/src/abi/erc20.ts rename to src/abi/erc20.ts diff --git a/packages/apps/src/abi/faucet.ts b/src/abi/faucet.ts similarity index 100% rename from packages/apps/src/abi/faucet.ts rename to src/abi/faucet.ts diff --git a/packages/apps/src/abi/guard.ts b/src/abi/guard.ts similarity index 100% rename from packages/apps/src/abi/guard.ts rename to src/abi/guard.ts diff --git a/packages/apps/src/abi/inbox.ts b/src/abi/inbox.ts similarity index 100% rename from packages/apps/src/abi/inbox.ts rename to src/abi/inbox.ts diff --git a/packages/apps/src/abi/l1-gateway-router.ts b/src/abi/l1-gateway-router.ts similarity index 100% rename from packages/apps/src/abi/l1-gateway-router.ts rename to src/abi/l1-gateway-router.ts diff --git a/packages/apps/src/abi/lnaccess-controller.ts b/src/abi/lnaccess-controller.ts similarity index 100% rename from packages/apps/src/abi/lnaccess-controller.ts rename to src/abi/lnaccess-controller.ts diff --git a/packages/apps/src/abi/lnbridgev20-default.ts b/src/abi/lnbridgev20-default.ts similarity index 100% rename from packages/apps/src/abi/lnbridgev20-default.ts rename to src/abi/lnbridgev20-default.ts diff --git a/packages/apps/src/abi/lnbridgev20-opposite.ts b/src/abi/lnbridgev20-opposite.ts similarity index 100% rename from packages/apps/src/abi/lnbridgev20-opposite.ts rename to src/abi/lnbridgev20-opposite.ts diff --git a/packages/apps/src/abi/lpbridge-sub2eth.ts b/src/abi/lpbridge-sub2eth.ts similarity index 100% rename from packages/apps/src/abi/lpbridge-sub2eth.ts rename to src/abi/lpbridge-sub2eth.ts diff --git a/packages/apps/src/abi/lpbridge.ts b/src/abi/lpbridge.ts similarity index 100% rename from packages/apps/src/abi/lpbridge.ts rename to src/abi/lpbridge.ts diff --git a/packages/apps/src/abi/mappingtoken-dvmdvm.ts b/src/abi/mappingtoken-dvmdvm.ts similarity index 100% rename from packages/apps/src/abi/mappingtoken-dvmdvm.ts rename to src/abi/mappingtoken-dvmdvm.ts diff --git a/packages/apps/src/abi/mappingtoken-dvmevm.ts b/src/abi/mappingtoken-dvmevm.ts similarity index 100% rename from packages/apps/src/abi/mappingtoken-dvmevm.ts rename to src/abi/mappingtoken-dvmevm.ts diff --git a/packages/apps/src/app/error.tsx b/src/app/error.tsx similarity index 80% rename from packages/apps/src/app/error.tsx rename to src/app/error.tsx index 1fc398575..2b382b550 100644 --- a/packages/apps/src/app/error.tsx +++ b/src/app/error.tsx @@ -9,11 +9,11 @@ export default function Error({ error, reset }: { error: Error; reset: () => voi return (
-
+

Oops, something went wrong !

diff --git a/packages/apps/src/app/favicon.ico b/src/app/favicon.ico similarity index 100% rename from packages/apps/src/app/favicon.ico rename to src/app/favicon.ico diff --git a/packages/apps/src/app/globals.css b/src/app/globals.css similarity index 87% rename from packages/apps/src/app/globals.css rename to src/app/globals.css index 59cbc3b95..79d15bc77 100644 --- a/packages/apps/src/app/globals.css +++ b/src/app/globals.css @@ -41,15 +41,15 @@ body { /* Page */ .page-container { - @apply px-middle container mx-auto py-5; + @apply container mx-auto px-middle py-5; } /* User */ .user-connect-wallet { - @apply bg-primary gap-middle rounded-middle px-large lg:hover:bg-primary/80 flex h-9 shrink-0 items-center transition lg:h-8 lg:active:translate-y-1; + @apply flex h-9 shrink-0 items-center gap-middle rounded-middle bg-primary px-large transition lg:h-8 lg:hover:bg-primary/80 lg:active:translate-y-1; } .user-dropdown-item { - @apply gap-middle px-large py-small inline-flex items-center text-start transition hover:bg-white/10 lg:active:translate-y-1; + @apply inline-flex items-center gap-middle rounded-middle px-middle py-small text-start transition hover:bg-white/10 lg:active:translate-y-1; } .button { @@ -63,11 +63,11 @@ body { .valid-input-wrap { } .invalid-input-wrap { - @apply hover:border-app-red focus-within:border-app-red border-app-red; + @apply border-app-red focus-within:border-app-red hover:border-app-red; } .select { - @apply hover:border-primary focus-within:border-primary border transition duration-300 disabled:cursor-not-allowed disabled:opacity-60 lg:active:translate-y-1 lg:disabled:translate-y-0; + @apply border transition duration-300 focus-within:border-primary hover:border-primary disabled:cursor-not-allowed disabled:opacity-60 lg:active:translate-y-1 lg:disabled:translate-y-0; } } diff --git a/packages/apps/src/app/icon.svg b/src/app/icon.svg similarity index 100% rename from packages/apps/src/app/icon.svg rename to src/app/icon.svg diff --git a/packages/apps/src/app/layout.tsx b/src/app/layout.tsx similarity index 82% rename from packages/apps/src/app/layout.tsx rename to src/app/layout.tsx index 95dd544f9..8acca467c 100644 --- a/packages/apps/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -6,6 +6,7 @@ import Header from "@/components/header"; import RainbowProvider from "@/providers/rainbow-provider"; import GraphqlProvider from "@/providers/graphql-provider"; import AppProvider from "@/providers/app-provider"; +import TransferProvider from "@/providers/transfer-provider"; const ibm_plex_sans = IBM_Plex_Sans({ subsets: ["latin", "latin-ext"], @@ -24,9 +25,11 @@ export default function RootLayout({ children }: { children: React.ReactNode }) -
- {children} -