- There is nothing there...
+ Your past transactions
- >
- ) : (
-
-
-
- Nfts in transit ({bridgeRequestData.length})
-
-
- {
- if (value) {
- setDisplayOption(value);
- }
- }}
- aria-label="Display options"
- className="hidden overflow-hidden rounded-md border border-[#d3e2e1] dark:border-dark-blue-600 sm:flex"
- type="single"
- value={displayOption}
- >
-
-
-
-
-
-
-
-
-
+
- {displayOption === "card" ? (
-
- {bridgeRequestData.map((bridgeRequest, index) => {
- return (
-
- );
- })}
-
- ) : (
-
-
-
-
- Nfts in transit ({bridgeRequestData.length})
-
-
- Transfer status
-
-
- Arrival
-
-
- Grid options
-
-
-
+
-
- {bridgeRequestData.map((bridgeRequest, index) => {
- return (
-
-
-
-
-
-
- {bridgeRequest.sourceCollection}
-
-
- No Nft name
-
-
-
- |
-
-
- {/* TODO @YohanTz: Extract this badge to its own component (used in cards also) */}
-
- {bridgeRequest.status}
-
- |
-
-
-
-
- Estimated arrival
-
-
- {bridgeRequest.statusTimestamp}
-
-
- {/* */}
-
- |
-
- +
- |
-
- );
- })}
-
-
- )}
+
+ {bridgeRequests.map((bridgeRequest) => {
+ return (
+
+ );
+ })}
+
);
}
diff --git a/apps/web/src/app/(routes)/lounge/_components/NftTransferModal.tsx b/apps/web/src/app/(routes)/lounge/_components/NftTransferModal.tsx
deleted file mode 100644
index 07ce1fd0..00000000
--- a/apps/web/src/app/(routes)/lounge/_components/NftTransferModal.tsx
+++ /dev/null
@@ -1,104 +0,0 @@
-import { Modal, Typography } from "design-system";
-import Image from "next/image";
-
-import useCurrentChain from "~/app/_hooks/useCurrentChain";
-
-import { CHAIN_LOGOS_BY_NAME } from "../../../_lib/utils/connectors";
-
-interface NftTransferModalProps {
- image?: string;
- isOpen: boolean;
- name: string;
- onOpenChange: (open: boolean) => void;
-}
-
-export default function NftTransferModal({
- image,
- isOpen,
- name,
- onOpenChange,
-}: NftTransferModalProps) {
- const { sourceChain, targetChain } = useCurrentChain();
- return (
-
-
-
-
- {image ? (
-
- ) : (
-
- No metadata
-
- )}
-
-
-
- {name}
-
- Migration in Progress
-
-
- Your asset cross the bridge, the small walk will take 15 minutes
-
-
-
-
- {/*
*/}
-
-
-
- 🌈
- Assets en route to {targetChain}
-
-
-
-
-
-
- Transaction sent
- 1/1
-
-
-
- Transaction confirmed
-
- 1/1
-
-
-
- Nfts received on {targetChain}
-
- 1/1
-
-
-
-
- Note that it will not cancel the gas fee.
-
- {/* */}
-
-
-
- );
-}
diff --git a/apps/web/src/app/(routes)/lounge/_components/NftCardStatus.tsx b/apps/web/src/app/(routes)/lounge/_components/NftTransferStatus.tsx
similarity index 86%
rename from apps/web/src/app/(routes)/lounge/_components/NftCardStatus.tsx
rename to apps/web/src/app/(routes)/lounge/_components/NftTransferStatus.tsx
index a807fa94..514b04d9 100644
--- a/apps/web/src/app/(routes)/lounge/_components/NftCardStatus.tsx
+++ b/apps/web/src/app/(routes)/lounge/_components/NftTransferStatus.tsx
@@ -23,14 +23,18 @@ const variantsToStatusText: Record
= {
};
interface NftCardStatusProps {
+ className?: string;
status: keyof typeof variants;
}
-export default function NftCardStatus({ status }: NftCardStatusProps) {
+export default function NftCardStatus({
+ className,
+ status,
+}: NftCardStatusProps) {
return (
<>
diff --git a/apps/web/src/app/(routes)/lounge/page.tsx b/apps/web/src/app/(routes)/lounge/page.tsx
index 63f36ea1..e523f2ca 100644
--- a/apps/web/src/app/(routes)/lounge/page.tsx
+++ b/apps/web/src/app/(routes)/lounge/page.tsx
@@ -1,10 +1,13 @@
"use client";
+import Link from "next/link";
+
import Footer from "~/app/_components/Footer";
import MainPageContainer from "../../_components/MainPageContainer";
import Banner from "./_components/Banner";
import ChainSwitch from "./_components/ChainSwitch";
+// import NftTransferList from "./_components/NftTransferList";
import NftTransferList from "./_components/NftTransferList";
export default function Page() {
@@ -12,9 +15,12 @@ export default function Page() {
<>
+
+ CHECK
+
-
+
diff --git a/apps/web/src/app/(routes)/providers.tsx b/apps/web/src/app/(routes)/providers.tsx
index 42c43fd9..dd70fe8f 100644
--- a/apps/web/src/app/(routes)/providers.tsx
+++ b/apps/web/src/app/(routes)/providers.tsx
@@ -37,6 +37,7 @@ interface ProvidersProps {
export default function Providers({ children }: ProvidersProps) {
return (
- Starklane is not available on this chain.
+ Arklane is not available on this chain.
You must switch to Ethereum Mainnet to transfer your Nfts.
diff --git a/apps/web/src/app/_lib/utils/connectors.ts b/apps/web/src/app/_lib/utils/connectors.ts
index 3de0330f..e03fc30d 100644
--- a/apps/web/src/app/_lib/utils/connectors.ts
+++ b/apps/web/src/app/_lib/utils/connectors.ts
@@ -1,7 +1,7 @@
import { InjectedConnector as InjectedStarknetConnector } from "@starknet-react/core";
import { type StaticImageData } from "next/image";
import {
- // coinbaseWallet,
+ // coinbaseWallet,
injected,
} from "wagmi/connectors";
// import { WalletConnectConnector } from "wagmi/connectors/walletConnect";
@@ -23,7 +23,7 @@ export const ethereumConnectors = [
// new WalletConnectConnector({ options: { projectId: walletConnectProjectId } }),
// coinbaseWallet({
// // TODO @YohanTz: handle `darkMode` for coinbase wallet modal
- // appName: "Starklane",
+ // appName: "Arklane",
// darkMode: true,
// }),
];
diff --git a/apps/web/src/server/api/routers/bridgeRequest.ts b/apps/web/src/server/api/routers/bridgeRequest.ts
index d0743929..f7e8da89 100644
--- a/apps/web/src/server/api/routers/bridgeRequest.ts
+++ b/apps/web/src/server/api/routers/bridgeRequest.ts
@@ -26,12 +26,16 @@ type BridgeRequestApiResponse = Array<{
hash: string;
to: string;
};
+ token_ids: Array;
}>;
type BridgeRequestResponse = {
- sourceCollection: string;
+ collectionName: string;
+ collectionSourceAddress: string;
status: BridgeRequestEventStatus;
statusTimestamp: number;
+ tokenIds: Array;
+ totalCount: number;
};
export const bridgeRequestRouter = createTRPCRouter({
@@ -42,7 +46,7 @@ export const bridgeRequestRouter = createTRPCRouter({
const bridgeRequestsResponse = await fetch(
`${
- process.env.NEXT_PUBLIC_STARKLANE_API_DOMAIN ?? ""
+ process.env.NEXT_PUBLIC_ARKLANE_API_DOMAIN ?? ""
}/requests/${address}`,
{
headers: {
@@ -58,18 +62,47 @@ export const bridgeRequestRouter = createTRPCRouter({
const bridgeRequests =
(await bridgeRequestsResponse.json()) as BridgeRequestApiResponse;
+ // if (
+ // bridgeRequests[0] !== undefined &&
+ // bridgeRequests[0]?.req.chain_src === "eth"
+ // ) {
+ // }
return bridgeRequests.map((bridgeRequest) => {
const lastBridgeRequestEvent =
bridgeRequest.events[bridgeRequest.events.length - 1];
+
+ console.log(bridgeRequest.events[0]?.tx_hash);
+
return {
- // sourceCollection: bridgeRequest.req.collection_src ?? "",
- sourceCollection: bridgeRequest.req.hash ?? "",
+ collectionName: "",
+ collectionSourceAddress: bridgeRequest.req.collection_src,
status: lastBridgeRequestEvent?.label ?? "error",
statusTimestamp: lastBridgeRequestEvent?.block_timestamp ?? 0,
+ tokenIds: bridgeRequest.token_ids,
+ totalCount: bridgeRequest.token_ids.length,
};
});
}),
- // getAll: publicProcedure.query(({ ctx }) => {
- // return ctx.prisma.example.findMany();
- // }),
+ getHasBrigeRequestIndexed: publicProcedure
+ .input(z.object({ transactionHash: z.string() }))
+ .query(async ({ input }): Promise => {
+ const { transactionHash } = input;
+
+ const bridgeRequestIndexedResponse = await fetch(
+ `${
+ process.env.NEXT_PUBLIC_ARKLANE_API_DOMAIN ?? ""
+ }/tx/${transactionHash}`,
+ {
+ headers: {
+ "Content-Type": "application/json",
+ },
+ }
+ );
+
+ if (bridgeRequestIndexedResponse.status !== 200) {
+ return false;
+ }
+
+ return true;
+ }),
});
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 7f46267c..957cbdcc 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -23,7 +23,7 @@ importers:
version: 3.2.5
turbo:
specifier: latest
- version: 1.10.3
+ version: 1.12.3
apps/web:
dependencies:
@@ -33,6 +33,9 @@ importers:
'@heroicons/react':
specifier: ^2.0.18
version: 2.0.18(react@18.2.0)
+ '@radix-ui/react-collapsible':
+ specifier: ^1.0.3
+ version: 1.0.3(@types/react-dom@18.2.4)(@types/react@18.2.6)(react-dom@18.2.0)(react@18.2.0)
'@radix-ui/react-dialog':
specifier: ^1.0.4
version: 1.0.4(@types/react-dom@18.2.4)(@types/react@18.2.6)(react-dom@18.2.0)(react@18.2.0)
@@ -1729,6 +1732,7 @@ packages:
/@emotion/memoize@0.7.4:
resolution: {integrity: sha512-Ja/Vfqe3HpuzRsG1oBtWTHk2PGZ7GR+2Vz5iYGelAw8dx32K0y7PjVuxK6z1nMpZOqAFsRUPCkK1YjJ56qJlgw==}
+ requiresBuild: true
dev: false
optional: true
@@ -2903,6 +2907,34 @@ packages:
'@babel/runtime': 7.23.9
dev: false
+ /@radix-ui/react-collapsible@1.0.3(@types/react-dom@18.2.4)(@types/react@18.2.6)(react-dom@18.2.0)(react@18.2.0):
+ resolution: {integrity: sha512-UBmVDkmR6IvDsloHVN+3rtx4Mi5TFvylYXpluuv0f37dtaz3H99bp8No0LGXRigVpl3UAT4l9j6bIchh42S/Gg==}
+ peerDependencies:
+ '@types/react': '*'
+ '@types/react-dom': '*'
+ react: ^16.8 || ^17.0 || ^18.0
+ react-dom: ^16.8 || ^17.0 || ^18.0
+ peerDependenciesMeta:
+ '@types/react':
+ optional: true
+ '@types/react-dom':
+ optional: true
+ dependencies:
+ '@babel/runtime': 7.23.9
+ '@radix-ui/primitive': 1.0.1
+ '@radix-ui/react-compose-refs': 1.0.1(@types/react@18.2.6)(react@18.2.0)
+ '@radix-ui/react-context': 1.0.1(@types/react@18.2.6)(react@18.2.0)
+ '@radix-ui/react-id': 1.0.1(@types/react@18.2.6)(react@18.2.0)
+ '@radix-ui/react-presence': 1.0.1(@types/react-dom@18.2.4)(@types/react@18.2.6)(react-dom@18.2.0)(react@18.2.0)
+ '@radix-ui/react-primitive': 1.0.3(@types/react-dom@18.2.4)(@types/react@18.2.6)(react-dom@18.2.0)(react@18.2.0)
+ '@radix-ui/react-use-controllable-state': 1.0.1(@types/react@18.2.6)(react@18.2.0)
+ '@radix-ui/react-use-layout-effect': 1.0.1(@types/react@18.2.6)(react@18.2.0)
+ '@types/react': 18.2.6
+ '@types/react-dom': 18.2.4
+ react: 18.2.0
+ react-dom: 18.2.0(react@18.2.0)
+ dev: false
+
/@radix-ui/react-collection@1.0.3(@types/react-dom@18.2.4)(@types/react@18.2.6)(react-dom@18.2.0)(react@18.2.0):
resolution: {integrity: sha512-3SzW+0PW7yBBoQlT8wNcGtaxaD0XSu0uLUFgrtHY08Acx05TaHaOmVLR73c0j/cqpDy53KBMO7s0dx2wmOIDIA==}
peerDependencies:
@@ -10936,65 +10968,64 @@ packages:
tslib: 1.14.1
typescript: 5.3.3
- /turbo-darwin-64@1.10.3:
- resolution: {integrity: sha512-IIB9IomJGyD3EdpSscm7Ip1xVWtYb7D0x7oH3vad3gjFcjHJzDz9xZ/iw/qItFEW+wGFcLSRPd+1BNnuLM8AsA==}
+ /turbo-darwin-64@1.12.3:
+ resolution: {integrity: sha512-dDglIaux+A4jOnB9CDH69sujmrnuLJLrKw1t3J+if6ySlFuxSwC++gDq9TVuOZo2+S7lFkGh+x5ytn3wp+jE8Q==}
cpu: [x64]
os: [darwin]
requiresBuild: true
dev: true
optional: true
- /turbo-darwin-arm64@1.10.3:
- resolution: {integrity: sha512-SBNmOZU9YEB0eyNIxeeQ+Wi0Ufd+nprEVp41rgUSRXEIpXjsDjyBnKnF+sQQj3+FLb4yyi/yZQckB+55qXWEsw==}
+ /turbo-darwin-arm64@1.12.3:
+ resolution: {integrity: sha512-5TqqeujEyHMoVUWGzSzUl5ERSg7HDCdbU3gBs5ziWTpFRpeJ/+Y15kYyZJcMQcubRIH3Y1hL/yA5IhlGdgXOMA==}
cpu: [arm64]
os: [darwin]
requiresBuild: true
dev: true
optional: true
- /turbo-linux-64@1.10.3:
- resolution: {integrity: sha512-kvAisGKE7xHJdyMxZLvg53zvHxjqPK1UVj4757PQqtx9dnjYHSc8epmivE6niPgDHon5YqImzArCjVZJYpIGHQ==}
+ /turbo-linux-64@1.12.3:
+ resolution: {integrity: sha512-yUreU+/gq4vlBtcdyfjz7slwz4zM1RG8sSXvyHmAS+QXqSrGkegg4qLl2fRbv/c3EyA/XbfcZuD6tcrXkejr6g==}
cpu: [x64]
os: [linux]
requiresBuild: true
dev: true
optional: true
- /turbo-linux-arm64@1.10.3:
- resolution: {integrity: sha512-Qgaqln0IYRgyL0SowJOi+PNxejv1I2xhzXOI+D+z4YHbgSx87ox1IsALYBlK8VRVYY8VCXl+PN12r1ioV09j7A==}
+ /turbo-linux-arm64@1.12.3:
+ resolution: {integrity: sha512-XRwAsp2eRSqZmaMVNrmHoKqofeJMuD87zmefZLTRAObh38hIwKgyl2QRsJIbteob5RN77yFbv3lAJ36UIY5h7w==}
cpu: [arm64]
os: [linux]
requiresBuild: true
dev: true
optional: true
- /turbo-windows-64@1.10.3:
- resolution: {integrity: sha512-rbH9wManURNN8mBnN/ZdkpUuTvyVVEMiUwFUX4GVE5qmV15iHtZfDLUSGGCP2UFBazHcpNHG1OJzgc55GFFrUw==}
+ /turbo-windows-64@1.12.3:
+ resolution: {integrity: sha512-CPnRfnUCtmFeShOtUdMCthySjmyHaoTyh9JueiYFvtCNeO3WfDMj63dpOQstQWHdJFYmIrIGfhAclcds9ePQYA==}
cpu: [x64]
os: [win32]
requiresBuild: true
dev: true
optional: true
- /turbo-windows-arm64@1.10.3:
- resolution: {integrity: sha512-ThlkqxhcGZX39CaTjsHqJnqVe+WImjX13pmjnpChz6q5HHbeRxaJSFzgrHIOt0sUUVx90W/WrNRyoIt/aafniw==}
+ /turbo-windows-arm64@1.12.3:
+ resolution: {integrity: sha512-cYA/wlzvp4vlCNHYJ2AjNS3FLXWwUC/5CJompBkTeKFFB6AviE/iLkbIhFikCVSNXZk/3AGanpMUXIkt3bdlwg==}
cpu: [arm64]
os: [win32]
requiresBuild: true
dev: true
optional: true
- /turbo@1.10.3:
- resolution: {integrity: sha512-U4gKCWcKgLcCjQd4Pl8KJdfEKumpyWbzRu75A6FCj6Ctea1PIm58W6Ltw1QXKqHrl2pF9e1raAskf/h6dlrPCA==}
+ /turbo@1.12.3:
+ resolution: {integrity: sha512-a6q8I0TK9ohACYbkmxzG/JYPuDC4VCvfmXLTlf321qQ4BIAhoyaOj/O2g+zJ6L1vNYnZ82G4LrbMfgLLngbLsg==}
hasBin: true
- requiresBuild: true
optionalDependencies:
- turbo-darwin-64: 1.10.3
- turbo-darwin-arm64: 1.10.3
- turbo-linux-64: 1.10.3
- turbo-linux-arm64: 1.10.3
- turbo-windows-64: 1.10.3
- turbo-windows-arm64: 1.10.3
+ turbo-darwin-64: 1.12.3
+ turbo-darwin-arm64: 1.12.3
+ turbo-linux-64: 1.12.3
+ turbo-linux-arm64: 1.12.3
+ turbo-windows-64: 1.12.3
+ turbo-windows-arm64: 1.12.3
dev: true
/type-check@0.4.0:
diff --git a/turbo.json b/turbo.json
index c1d6fbbe..03c83f04 100644
--- a/turbo.json
+++ b/turbo.json
@@ -18,7 +18,7 @@
"HOSTNAME_L2",
"L2_DEPLOYER_PRIVATE_KEY",
"L2_DEPLOYER_ADDRESS",
- "NEXT_PUBLIC_STARKLANE_API_DOMAIN",
+ "NEXT_PUBLIC_ARKLANE_API_DOMAIN",
"GOERLI_ALCHEMY_KEY",
"MAINNET_ALCHEMY_KEY",
"L2_DEPLOYER_SALT",