From 8742a9b9b5048f8ba31f88c4adde76dc351cfa28 Mon Sep 17 00:00:00 2001 From: Korbinian Kasberger Date: Mon, 24 Jul 2023 13:14:03 +0200 Subject: [PATCH 01/75] feat(nft-bridge): initial UI setup for NFT bridge, fetching images, update dependencies --- packages/bridge-ui-v2/package.json | 18 +- packages/bridge-ui-v2/src/app.html | 2 +- .../Activities/ListWithDetailsView.svelte | 272 ++++++++-------- .../src/components/Bridge/AddressInput.svelte | 71 +++++ .../src/components/Bridge/Bridge.svelte | 26 +- .../src/components/Bridge/BridgeTabs.svelte | 19 ++ .../src/components/Bridge/NFTBridge.svelte | 130 ++++++++ .../src/components/Bridge/NFTIdInput.svelte | 36 +++ .../src/components/Header/Header.svelte | 22 +- .../components/LinkButton/LinkButton.svelte | 2 +- .../SideNavigation/SideNavigation.svelte | 66 ++-- packages/bridge-ui-v2/src/i18n/en.json | 75 +++-- .../src/libs/token/detectContractType.ts | 62 ++++ .../src/libs/token/fetch1155Images.ts | 47 +++ .../src/libs/token/fetchErc721Images.ts | 44 +++ packages/bridge-ui-v2/src/libs/token/index.ts | 3 + .../bridge-ui-v2/src/routes/nft/+page.svelte | 8 + packages/bridge-ui-v2/src/stores/index.ts | 1 + packages/bridge-ui-v2/src/stores/nfts.ts | 5 + pnpm-lock.yaml | 296 ++++++++++-------- 20 files changed, 857 insertions(+), 348 deletions(-) create mode 100644 packages/bridge-ui-v2/src/components/Bridge/AddressInput.svelte create mode 100644 packages/bridge-ui-v2/src/components/Bridge/BridgeTabs.svelte create mode 100644 packages/bridge-ui-v2/src/components/Bridge/NFTBridge.svelte create mode 100644 packages/bridge-ui-v2/src/components/Bridge/NFTIdInput.svelte create mode 100644 packages/bridge-ui-v2/src/libs/token/detectContractType.ts create mode 100644 packages/bridge-ui-v2/src/libs/token/fetch1155Images.ts create mode 100644 packages/bridge-ui-v2/src/libs/token/fetchErc721Images.ts create mode 100644 packages/bridge-ui-v2/src/routes/nft/+page.svelte create mode 100644 packages/bridge-ui-v2/src/stores/nfts.ts diff --git a/packages/bridge-ui-v2/package.json b/packages/bridge-ui-v2/package.json index 9f689a0e0f8..14428d577b6 100644 --- a/packages/bridge-ui-v2/package.json +++ b/packages/bridge-ui-v2/package.json @@ -21,9 +21,9 @@ }, "devDependencies": { "@playwright/test": "^1.28.1", - "@sveltejs/adapter-auto": "^2.0.0", + "@sveltejs/adapter-auto": "^2.1.0", "@sveltejs/adapter-static": "^2.0.2", - "@sveltejs/kit": "^1.5.0", + "@sveltejs/kit": "^1.22.3", "@types/debug": "^4.1.7", "@typescript-eslint/eslint-plugin": "^5.45.0", "@typescript-eslint/parser": "^5.45.0", @@ -35,17 +35,19 @@ "eslint-config-prettier": "^8.5.0", "eslint-plugin-simple-import-sort": "^10.0.0", "eslint-plugin-svelte": "^2.26.0", + "ethereum-address": "^0.0.4", "postcss": "^8.4.24", - "prettier": "^2.8.0", - "prettier-plugin-svelte": "^2.8.1", - "svelte": "^3.54.0", - "svelte-check": "^3.4.4", + "prettier": "^3.0.0", + "prettier-plugin-svelte": "^3.0.0", + "svelte": "^4.1.0", + "svelte-check": "^3.4.6", "tailwindcss": "^3.3.2", "tslib": "^2.4.1", - "typescript": "^5.0.0", + "typescript": "^5.1.6", "vite": "^4.3.0", "vite-tsconfig-paths": "^4.2.0", - "vitest": "^0.32.2" + "vitest": "^0.32.2", + "vitest-fetch-mock": "^0.2.2" }, "type": "module", "dependencies": { diff --git a/packages/bridge-ui-v2/src/app.html b/packages/bridge-ui-v2/src/app.html index be167ec1d9b..39b9d4df542 100644 --- a/packages/bridge-ui-v2/src/app.html +++ b/packages/bridge-ui-v2/src/app.html @@ -1,4 +1,4 @@ - + diff --git a/packages/bridge-ui-v2/src/components/Activities/ListWithDetailsView.svelte b/packages/bridge-ui-v2/src/components/Activities/ListWithDetailsView.svelte index 021b55d32c4..f664644387f 100644 --- a/packages/bridge-ui-v2/src/components/Activities/ListWithDetailsView.svelte +++ b/packages/bridge-ui-v2/src/components/Activities/ListWithDetailsView.svelte @@ -25,150 +25,148 @@
-
+ + + + + +
2.5 BLL
+ +
+ + {$t('activities.status.failed')} +
+ + + + +