From 3025501523ab1e0c836d2bd04b4f10bf4ac71f1f Mon Sep 17 00:00:00 2001 From: Credence Date: Fri, 13 Dec 2024 18:36:50 +0100 Subject: [PATCH 1/5] landing: select lords by default for bridge in --- landing/src/components/modules/bridge-in.tsx | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/landing/src/components/modules/bridge-in.tsx b/landing/src/components/modules/bridge-in.tsx index d536786c6..8844fe5cc 100644 --- a/landing/src/components/modules/bridge-in.tsx +++ b/landing/src/components/modules/bridge-in.tsx @@ -38,8 +38,10 @@ export const BridgeIn = () => { const { computeTravelTime } = useTravel(); const { getRealmNameById } = useRealm(); const [isLoading, setIsLoading] = useState(false); - const [selectedResourceIds, setSelectedResourceIds] = useState([]); - const [selectedResourceAmounts, setSelectedResourceAmounts] = useState<{ [key: string]: number }>({}); + const [selectedResourceIds, setSelectedResourceIds] = useState([ResourcesIds.Lords]); + const [selectedResourceAmounts, setSelectedResourceAmounts] = useState<{ [key: string]: number }>({ + [ResourcesIds.Lords]: 0, + }); const [resourceAddresses, setResourceAddresses] = useState<{ [key: string]: string }>({}); const unselectedResources = useMemo( () => resources.filter((res) => !selectedResourceIds.includes(res.id)), @@ -151,8 +153,10 @@ export const BridgeIn = () => { const resp = await bridgeIntoRealm(validResources, ADMIN_BANK_ENTITY_ID, BigInt(realmEntityId!)); if (resp) { - setSelectedResourceIds([]); - setSelectedResourceAmounts({}); + setSelectedResourceIds([ResourcesIds.Lords]); + setSelectedResourceAmounts({ + [ResourcesIds.Lords]: 0, + }); } } catch (error) { console.error("Bridge into realm error:", error); From a7849cdd87368b5ac776e70e3ce47ee3ced36b9d Mon Sep 17 00:00:00 2001 From: Credence Date: Fri, 13 Dec 2024 18:39:47 +0100 Subject: [PATCH 2/5] landing: add connect wallet msgs --- landing/src/components/modules/bridge-in.tsx | 6 +++++- landing/src/components/modules/bridge-out-step-1.tsx | 2 +- landing/src/components/modules/bridge-out-step-2.tsx | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/landing/src/components/modules/bridge-in.tsx b/landing/src/components/modules/bridge-in.tsx index 8844fe5cc..1985126dd 100644 --- a/landing/src/components/modules/bridge-in.tsx +++ b/landing/src/components/modules/bridge-in.tsx @@ -190,7 +190,11 @@ export const BridgeIn = () => { setRealmEntityId(value)}> - + {address ? :
-- Connect your wallet --
}
{playerRealmsIdAndName.map((realm) => { diff --git a/landing/src/components/modules/bridge-out-step-2.tsx b/landing/src/components/modules/bridge-out-step-2.tsx index bd4fe55e6..e8503138f 100644 --- a/landing/src/components/modules/bridge-out-step-2.tsx +++ b/landing/src/components/modules/bridge-out-step-2.tsx @@ -142,7 +142,7 @@ export const BridgeOutStep2 = () => {
Withdraw To
-
{displayAddress(address || "")}
+
{address ? displayAddress(address || "") : " -- Connect your wallet --"}
@@ -308,7 +308,7 @@ export const BridgeOutStep2 = () => { className="w-full" > {isLoading && } - {isLoading ? "Sending to Wallet..." : "Send to Wallet (Final Step)"} + {isLoading ? "Sending to Wallet..." : "Send to Wallet"} From 50753b58825a7ae386654a41aaf6ea11706b0806 Mon Sep 17 00:00:00 2001 From: Credence Date: Fri, 13 Dec 2024 18:40:32 +0100 Subject: [PATCH 3/5] landing: update bridge section description --- landing/src/components/modules/bridge-in.tsx | 49 ++++++++++++++--- .../components/modules/bridge-out-step-1.tsx | 53 ++++++++++++++++++- .../components/modules/bridge-out-step-2.tsx | 36 ++++++++++++- 3 files changed, 128 insertions(+), 10 deletions(-) diff --git a/landing/src/components/modules/bridge-in.tsx b/landing/src/components/modules/bridge-in.tsx index 1985126dd..fefbc173e 100644 --- a/landing/src/components/modules/bridge-in.tsx +++ b/landing/src/components/modules/bridge-in.tsx @@ -172,12 +172,49 @@ export const BridgeIn = () => { <>
- Bridge resources and lords from your Starknet wallet into the Eternum game. You will have to complete the - claim on your Realm in the{" "} - - game - - . +
+

+ Bridge Resources Into Your Realm +

+ +
+
+
+ + 1 + +
+
+

Bridge Assets into the Game

+

+ Bridge your ERC20 assets, resources and lords from your Starknet wallet into the Eternum game. +

+
+
+ +
+
+ + 2 + +
+
+

Complete Claim

+

+ Complete the claim on your Realm in the{" "} + + game + {" "} + by checking the Resource Arrivals (Donkeys) tab in the game. +

+
+
+
+

diff --git a/landing/src/components/modules/bridge-out-step-1.tsx b/landing/src/components/modules/bridge-out-step-1.tsx index f6bfd6dfe..53e637f68 100644 --- a/landing/src/components/modules/bridge-out-step-1.tsx +++ b/landing/src/components/modules/bridge-out-step-1.tsx @@ -153,8 +153,57 @@ export const BridgeOutStep1 = () => { <>
- Bridge resources from your Realms balance in game to tradeable ERC20 assets in your Starknet wallet. This will - require a second step to send the resources to your wallet once the donkeys have arrived at the bank. +
+

+ Bridge Resources to Wallet +

+ +
+
+
+ + 1 + +
+
+

Bridge Resources

+

+ Bridge resources from your Realms balance in-game to tradeable ERC20 assets in your Starknet wallet. + The first step is to send it to the bank. +

+
+
+ +
+
+ + 2 + +
+
+

Complete Transfer

+

+ Once the donkeys arrive at the bank, complete the second step ( the next section ) to receive + resources in your wallet. +

+
+
+ +
+
+ + ℹ️ + +
+
+

Important Note

+

+ This bridge will only be available for withdrawals for up to 48 hours after the Season ends. +

+
+
+
+

diff --git a/landing/src/components/modules/bridge-out-step-2.tsx b/landing/src/components/modules/bridge-out-step-2.tsx index e8503138f..50c118374 100644 --- a/landing/src/components/modules/bridge-out-step-2.tsx +++ b/landing/src/components/modules/bridge-out-step-2.tsx @@ -136,8 +136,40 @@ export const BridgeOutStep2 = () => { <>
- Finalise the withdrawal of resources from your Realm in Eternum to your Starknet wallet. The bridge will close - and you will be unable to withdraw 48 hours after the Season is won. +
+

+ Finalize Bridge Withdrawal +

+ +
+
+
+ + + + + +
+
+

Complete Withdrawal

+

+ Finalize the withdrawal of resources from your Realm in Eternum to your Starknet wallet. Select a + donkey to withdraw resources from. +

+
+
+
+

From cd6a13ac2902d7293b368cf29f1d8402b4c45c81 Mon Sep 17 00:00:00 2001 From: RedBeardEth <90423049+RedBeardEth@users.noreply.github.com> Date: Sat, 14 Dec 2024 12:29:37 +1100 Subject: [PATCH 4/5] merge next --- landing/.env.production | 2 +- landing/src/components/modules/bridge-in.tsx | 4 +-- .../components/modules/bridge-out-step-1.tsx | 11 ++++++-- .../components/modules/bridge-out-step-2.tsx | 2 +- landing/src/components/modules/swap-panel.tsx | 6 ++--- .../modules/top-navigation-view.tsx | 4 +-- pnpm-lock.yaml | 26 +++++++++---------- 7 files changed, 31 insertions(+), 24 deletions(-) diff --git a/landing/.env.production b/landing/.env.production index 274f81afc..78490c98a 100644 --- a/landing/.env.production +++ b/landing/.env.production @@ -4,7 +4,7 @@ VITE_PUBLIC_WORLD_ADDRESS="0x5013b17c43a2b664ec2a38aa45f6d891db1188622ec7cf32041 VITE_PUBLIC_ACCOUNT_CLASS_HASH="0x07dc7899aa655b0aae51eadff6d801a58e97dd99cf4666ee59e704249e51adf2" VITE_PUBLIC_FEE_TOKEN_ADDRESS=0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7 -VITE_PUBLIC_TORII=https://eternum.glihm.xyz/ +VITE_PUBLIC_TORII=https://eternum.glihm.xyz VITE_PUBLIC_NODE_URL=https://api.cartridge.gg/x/starknet/mainnet VITE_PUBLIC_DEV=false VITE_PUBLIC_GAME_VERSION="v1.0.0-rc0" diff --git a/landing/src/components/modules/bridge-in.tsx b/landing/src/components/modules/bridge-in.tsx index fefbc173e..fe9b56cdc 100644 --- a/landing/src/components/modules/bridge-in.tsx +++ b/landing/src/components/modules/bridge-in.tsx @@ -170,7 +170,7 @@ export const BridgeIn = () => { return ( <> -
+

@@ -226,7 +226,7 @@ export const BridgeIn = () => {
To Realm
setRealmEntityId(value)}> - + {address ? :
-- Connect your wallet --
}
diff --git a/landing/src/components/modules/bridge-out-step-2.tsx b/landing/src/components/modules/bridge-out-step-2.tsx index 50c118374..1824a9eec 100644 --- a/landing/src/components/modules/bridge-out-step-2.tsx +++ b/landing/src/components/modules/bridge-out-step-2.tsx @@ -134,7 +134,7 @@ export const BridgeOutStep2 = () => { return ( <> -
+

diff --git a/landing/src/components/modules/swap-panel.tsx b/landing/src/components/modules/swap-panel.tsx index 62fc18fc0..f2117847d 100644 --- a/landing/src/components/modules/swap-panel.tsx +++ b/landing/src/components/modules/swap-panel.tsx @@ -21,13 +21,13 @@ export const SwapPanel = () => { Bridge Out (Finish) - + - + - + diff --git a/landing/src/components/modules/top-navigation-view.tsx b/landing/src/components/modules/top-navigation-view.tsx index caf1af4ed..a1b0c6fa2 100644 --- a/landing/src/components/modules/top-navigation-view.tsx +++ b/landing/src/components/modules/top-navigation-view.tsx @@ -56,7 +56,7 @@ export const TopNavigationView = ({ onClick={() => { window.open("https://eternum.realms.world", "_blank"); }} - className="gap-2" + className="gap-2 hidden sm:flex" > Play Eternum @@ -92,7 +92,7 @@ export const TopNavigationView = ({ {isConnected ? (