Wallet
{activeWallet?.name || ""}
diff --git a/spaceward/src/components/ThemeToggle.tsx b/spaceward/src/components/ThemeToggle.tsx
index 8a1099dac..a7890349d 100644
--- a/spaceward/src/components/ThemeToggle.tsx
+++ b/spaceward/src/components/ThemeToggle.tsx
@@ -12,7 +12,7 @@ export function ThemeToggle() {
size="icon"
onClick={() => setTheme(theme === "light" ? "dark" : "light")}
className={
- "h-20 w-20 rounded-none border-0 hover:bg-transparent flex items-center place-content-center group"
+ "h-16 w-16 rounded-none border-0 hover:bg-transparent flex items-center place-content-center group"
}
>
diff --git a/spaceward/src/components/ui/copy.tsx b/spaceward/src/components/ui/copy.tsx
index 3905c457f..502ed2cf1 100644
--- a/spaceward/src/components/ui/copy.tsx
+++ b/spaceward/src/components/ui/copy.tsx
@@ -51,7 +51,7 @@ const Copy = React.forwardRef(
{variant === "icon" ? (
) : split ? (
- value?.slice(0, 8) + "..." + value?.slice(-8)
+ "..." + value?.slice(-8)
) : (
value
)}
diff --git a/spaceward/src/config/chains.ts b/spaceward/src/config/chains.ts
index 392e3789b..e8e60f0a8 100644
--- a/spaceward/src/config/chains.ts
+++ b/spaceward/src/config/chains.ts
@@ -2,233 +2,349 @@ import { Chain, AssetList } from "@chain-registry/types";
import { env } from "@/env";
export const wardenprotocollocal: Chain = {
- chain_name: "wardenprotocollocal",
- status: "live",
- network_type: "testnet",
- pretty_name: "Warden Protocol (local)",
- chain_id: "wardenprotocol",
- bech32_prefix: "warden",
- daemon_name: "wardend",
- node_home: "$HOME/.warden",
- key_algos: ["secp256k1"],
- slip44: 118,
- fees: {
- fee_tokens: [
- {
- denom: "uward",
- fixed_min_gas_price: 0.005,
- low_gas_price: 0.01,
- average_gas_price: 0.025,
- high_gas_price: 0.03,
- },
- ],
- },
- staking: {
- staking_tokens: [
- {
- denom: "uward",
- },
- ],
- },
- codebase: {
- git_repo: "https://github.com/warden-protocol/wardenprotocol",
- recommended_version: "v0.1.0",
- compatible_versions: ["v0.1.0"],
- cosmos_sdk_version: "0.50",
- consensus: {
- type: "cometbft",
- version: "0.38",
- },
- cosmwasm_enabled: false,
- genesis: {
- genesis_url:
- "https://raw.githubusercontent.com/warden-protocol/networks/main/testnet-alfama/genesis.json",
- },
- versions: [
- {
- name: "v0.1.0",
- recommended_version: "v0.1.0",
- compatible_versions: ["v0.1.0"],
- cosmos_sdk_version: "0.50",
- consensus: {
- type: "cometbft",
- version: "0.38",
- },
- cosmwasm_enabled: false,
- },
- ],
- },
- apis: {
- rpc: [
- {
- address: env.rpcURL,
- provider: "Warden Protocol",
- },
- ],
- rest: [
- {
- address: env.apiURL,
- provider: "Warden Protocol",
- },
- ],
- grpc: [],
- },
- logo_URIs: {
- png: "https://raw.githubusercontent.com/cosmos/chain-registry/master/wardenprotocol/images/ward.png",
- },
- keywords: ["local"],
- images: [
- {
- png: "https://raw.githubusercontent.com/cosmos/chain-registry/master/wardenprotocol/images/ward.png",
- },
- ],
+ chain_name: "wardenprotocollocal",
+ status: "live",
+ network_type: "testnet",
+ pretty_name: "Warden Protocol (local)",
+ chain_id: "wardenprotocol",
+ bech32_prefix: "warden",
+ daemon_name: "wardend",
+ node_home: "$HOME/.warden",
+ key_algos: ["secp256k1"],
+ slip44: 118,
+ fees: {
+ fee_tokens: [
+ {
+ denom: "uward",
+ fixed_min_gas_price: 0.005,
+ low_gas_price: 0.01,
+ average_gas_price: 0.025,
+ high_gas_price: 0.03,
+ },
+ ],
+ },
+ staking: {
+ staking_tokens: [
+ {
+ denom: "uward",
+ },
+ ],
+ },
+ codebase: {
+ git_repo: "https://github.com/warden-protocol/wardenprotocol",
+ recommended_version: "v0.1.0",
+ compatible_versions: ["v0.1.0"],
+ cosmos_sdk_version: "0.50",
+ consensus: {
+ type: "cometbft",
+ version: "0.38",
+ },
+ cosmwasm_enabled: false,
+ genesis: {
+ genesis_url:
+ "https://raw.githubusercontent.com/warden-protocol/networks/main/testnet-alfama/genesis.json",
+ },
+ versions: [
+ {
+ name: "v0.1.0",
+ recommended_version: "v0.1.0",
+ compatible_versions: ["v0.1.0"],
+ cosmos_sdk_version: "0.50",
+ consensus: {
+ type: "cometbft",
+ version: "0.38",
+ },
+ cosmwasm_enabled: false,
+ },
+ ],
+ },
+ apis: {
+ rpc: [
+ {
+ address: env.rpcURL,
+ provider: "Warden Protocol",
+ },
+ ],
+ rest: [
+ {
+ address: env.apiURL,
+ provider: "Warden Protocol",
+ },
+ ],
+ grpc: [],
+ },
+ logo_URIs: {
+ png: "https://raw.githubusercontent.com/cosmos/chain-registry/master/wardenprotocol/images/ward.png",
+ },
+ keywords: ["local"],
+ images: [
+ {
+ png: "https://raw.githubusercontent.com/cosmos/chain-registry/master/wardenprotocol/images/ward.png",
+ },
+ ],
};
export const wardenprotocollocalAssets: AssetList = {
- chain_name: "wardenprotocollocal",
- assets: [
- {
- description: "The native token of Warden Protocol Testnet",
- denom_units: [
- {
- denom: "uward",
- exponent: 0,
- },
- {
- denom: "ward",
- exponent: 6,
- },
- ],
- base: "uward",
- name: "Ward",
- display: "ward",
- symbol: "WARD",
- logo_URIs: {
- png: "https://raw.githubusercontent.com/cosmos/chain-registry/master/wardenprotocol/images/ward.png",
- svg: "https://raw.githubusercontent.com/cosmos/chain-registry/master/wardenprotocol/images/ward.svg",
- },
- images: [
- {
- png: "https://raw.githubusercontent.com/cosmos/chain-registry/master/wardenprotocol/images/ward.png",
- svg: "https://raw.githubusercontent.com/cosmos/chain-registry/master/wardenprotocol/images/ward.svg",
- },
- ],
- },
- ],
+ chain_name: "wardenprotocollocal",
+ assets: [
+ {
+ description: "The native token of Warden Protocol Testnet",
+ denom_units: [
+ {
+ denom: "uward",
+ exponent: 0,
+ },
+ {
+ denom: "ward",
+ exponent: 6,
+ },
+ ],
+ base: "uward",
+ name: "Ward",
+ display: "ward",
+ symbol: "WARD",
+ logo_URIs: {
+ png: "https://raw.githubusercontent.com/cosmos/chain-registry/master/wardenprotocol/images/ward.png",
+ svg: "https://raw.githubusercontent.com/cosmos/chain-registry/master/wardenprotocol/images/ward.svg",
+ },
+ images: [
+ {
+ png: "https://raw.githubusercontent.com/cosmos/chain-registry/master/wardenprotocol/images/ward.png",
+ svg: "https://raw.githubusercontent.com/cosmos/chain-registry/master/wardenprotocol/images/ward.svg",
+ },
+ ],
+ },
+ ],
};
export const wardenprotocoldevnet: Chain = {
- chain_name: "wardenprotocoldevnet",
- status: "live",
- network_type: "testnet",
- pretty_name: "Warden Protocol (devnet)",
- chain_id: "wardenprotocol",
- bech32_prefix: "warden",
- daemon_name: "wardend",
- node_home: "$HOME/.warden",
- key_algos: ["secp256k1"],
- slip44: 118,
- fees: {
- fee_tokens: [
- {
- denom: "uward",
- fixed_min_gas_price: 0.005,
- low_gas_price: 0.01,
- average_gas_price: 0.025,
- high_gas_price: 0.03,
- },
- ],
- },
- staking: {
- staking_tokens: [
- {
- denom: "uward",
- },
- ],
- },
- codebase: {
- git_repo: "https://github.com/warden-protocol/wardenprotocol",
- recommended_version: "v0.1.0",
- compatible_versions: ["v0.1.0"],
- cosmos_sdk_version: "0.50",
- consensus: {
- type: "cometbft",
- version: "0.38",
- },
- cosmwasm_enabled: false,
- genesis: {
- genesis_url:
- "https://raw.githubusercontent.com/warden-protocol/networks/main/testnet-alfama/genesis.json",
- },
- versions: [
- {
- name: "v0.1.0",
- recommended_version: "v0.1.0",
- compatible_versions: ["v0.1.0"],
- cosmos_sdk_version: "0.50",
- consensus: {
- type: "cometbft",
- version: "0.38",
- },
- cosmwasm_enabled: false,
- },
- ],
- },
- apis: {
- rpc: [
- {
- address: env.rpcURL,
- provider: "Warden Protocol",
- },
- ],
- rest: [
- {
- address: env.apiURL,
- provider: "Warden Protocol",
- },
- ],
- grpc: [],
- },
- logo_URIs: {
- png: "https://raw.githubusercontent.com/cosmos/chain-registry/master/wardenprotocol/images/ward.png",
- },
- keywords: ["local"],
- images: [
- {
- png: "https://raw.githubusercontent.com/cosmos/chain-registry/master/wardenprotocol/images/ward.png",
- },
- ],
+ chain_name: "wardenprotocoldevnet",
+ status: "live",
+ network_type: "testnet",
+ pretty_name: "Warden Protocol (devnet)",
+ chain_id: "wardenprotocol",
+ bech32_prefix: "warden",
+ daemon_name: "wardend",
+ node_home: "$HOME/.warden",
+ key_algos: ["secp256k1"],
+ slip44: 118,
+ fees: {
+ fee_tokens: [
+ {
+ denom: "uward",
+ fixed_min_gas_price: 0.005,
+ low_gas_price: 0.01,
+ average_gas_price: 0.025,
+ high_gas_price: 0.03,
+ },
+ ],
+ },
+ staking: {
+ staking_tokens: [
+ {
+ denom: "uward",
+ },
+ ],
+ },
+ codebase: {
+ git_repo: "https://github.com/warden-protocol/wardenprotocol",
+ recommended_version: "v0.1.0",
+ compatible_versions: ["v0.1.0"],
+ cosmos_sdk_version: "0.50",
+ consensus: {
+ type: "cometbft",
+ version: "0.38",
+ },
+ cosmwasm_enabled: false,
+ genesis: {
+ genesis_url:
+ "https://raw.githubusercontent.com/warden-protocol/networks/main/testnet-alfama/genesis.json",
+ },
+ versions: [
+ {
+ name: "v0.1.0",
+ recommended_version: "v0.1.0",
+ compatible_versions: ["v0.1.0"],
+ cosmos_sdk_version: "0.50",
+ consensus: {
+ type: "cometbft",
+ version: "0.38",
+ },
+ cosmwasm_enabled: false,
+ },
+ ],
+ },
+ apis: {
+ rpc: [
+ {
+ address: env.rpcURL,
+ provider: "Warden Protocol",
+ },
+ ],
+ rest: [
+ {
+ address: env.apiURL,
+ provider: "Warden Protocol",
+ },
+ ],
+ grpc: [],
+ },
+ logo_URIs: {
+ png: "https://raw.githubusercontent.com/cosmos/chain-registry/master/wardenprotocol/images/ward.png",
+ },
+ keywords: ["local"],
+ images: [
+ {
+ png: "https://raw.githubusercontent.com/cosmos/chain-registry/master/wardenprotocol/images/ward.png",
+ },
+ ],
};
export const wardenprotocoldevnetAssets: AssetList = {
- chain_name: "wardenprotocoldevnet",
- assets: [
- {
- description: "The native token of Warden Protocol Testnet",
- denom_units: [
- {
- denom: "uward",
- exponent: 0,
- },
- {
- denom: "ward",
- exponent: 6,
- },
- ],
- base: "uward",
- name: "Ward",
- display: "ward",
- symbol: "WARD",
- logo_URIs: {
- png: "https://raw.githubusercontent.com/cosmos/chain-registry/master/wardenprotocol/images/ward.png",
- svg: "https://raw.githubusercontent.com/cosmos/chain-registry/master/wardenprotocol/images/ward.svg",
- },
- images: [
- {
- png: "https://raw.githubusercontent.com/cosmos/chain-registry/master/wardenprotocol/images/ward.png",
- svg: "https://raw.githubusercontent.com/cosmos/chain-registry/master/wardenprotocol/images/ward.svg",
- },
- ],
- },
- ],
+ chain_name: "wardenprotocoldevnet",
+ assets: [
+ {
+ description: "The native token of Warden Protocol Testnet",
+ denom_units: [
+ {
+ denom: "uward",
+ exponent: 0,
+ },
+ {
+ denom: "ward",
+ exponent: 6,
+ },
+ ],
+ base: "uward",
+ name: "Ward",
+ display: "ward",
+ symbol: "WARD",
+ logo_URIs: {
+ png: "https://raw.githubusercontent.com/cosmos/chain-registry/master/wardenprotocol/images/ward.png",
+ svg: "https://raw.githubusercontent.com/cosmos/chain-registry/master/wardenprotocol/images/ward.svg",
+ },
+ images: [
+ {
+ png: "https://raw.githubusercontent.com/cosmos/chain-registry/master/wardenprotocol/images/ward.png",
+ svg: "https://raw.githubusercontent.com/cosmos/chain-registry/master/wardenprotocol/images/ward.svg",
+ },
+ ],
+ },
+ ],
+};
+
+export const wardenprotocolbuenavista: Chain = {
+ chain_name: "wardenprotocolbuenavista",
+ status: "live",
+ network_type: "testnet",
+ pretty_name: "Warden Protocol Buenavista Testnet",
+ chain_id: "buenavista",
+ bech32_prefix: "warden",
+ daemon_name: "wardend",
+ node_home: "$HOME/.warden",
+ key_algos: ["secp256k1"],
+ slip44: 118,
+ fees: {
+ fee_tokens: [
+ {
+ denom: "uward",
+ fixed_min_gas_price: 0.005,
+ low_gas_price: 0.01,
+ average_gas_price: 0.025,
+ high_gas_price: 0.03,
+ },
+ ],
+ },
+ staking: {
+ staking_tokens: [
+ {
+ denom: "uward",
+ },
+ ],
+ },
+ codebase: {
+ git_repo: "https://github.com/warden-protocol/wardenprotocol",
+ recommended_version: "v0.1.0",
+ compatible_versions: ["v0.1.0"],
+ cosmos_sdk_version: "0.50",
+ consensus: {
+ type: "cometbft",
+ version: "0.38",
+ },
+ cosmwasm_enabled: false,
+ genesis: {
+ genesis_url:
+ "https://raw.githubusercontent.com/warden-protocol/networks/main/testnet-alfama/genesis.json",
+ },
+ versions: [
+ {
+ name: "v0.1.0",
+ recommended_version: "v0.1.0",
+ compatible_versions: ["v0.1.0"],
+ cosmos_sdk_version: "0.50",
+ consensus: {
+ type: "cometbft",
+ version: "0.38",
+ },
+ cosmwasm_enabled: false,
+ },
+ ],
+ },
+ apis: {
+ rpc: [
+ {
+ address: env.rpcURL,
+ provider: "Warden Protocol",
+ },
+ ],
+ rest: [
+ {
+ address: env.apiURL,
+ provider: "Warden Protocol",
+ },
+ ],
+ grpc: [],
+ },
+ logo_URIs: {
+ png: "https://raw.githubusercontent.com/cosmos/chain-registry/master/wardenprotocol/images/ward.png",
+ },
+ keywords: ["local"],
+ images: [
+ {
+ png: "https://raw.githubusercontent.com/cosmos/chain-registry/master/wardenprotocol/images/ward.png",
+ },
+ ],
+};
+
+export const wardenprotocolbuenavistaAssets: AssetList = {
+ chain_name: "wardenprotocolbuenavista",
+ assets: [
+ {
+ description: "The native token of Warden Protocol Testnet",
+ denom_units: [
+ {
+ denom: "uward",
+ exponent: 0,
+ },
+ {
+ denom: "ward",
+ exponent: 6,
+ },
+ ],
+ base: "uward",
+ name: "Ward",
+ display: "ward",
+ symbol: "WARD",
+ logo_URIs: {
+ png: "https://raw.githubusercontent.com/cosmos/chain-registry/master/wardenprotocol/images/ward.png",
+ svg: "https://raw.githubusercontent.com/cosmos/chain-registry/master/wardenprotocol/images/ward.svg",
+ },
+ images: [
+ {
+ png: "https://raw.githubusercontent.com/cosmos/chain-registry/master/wardenprotocol/images/ward.png",
+ svg: "https://raw.githubusercontent.com/cosmos/chain-registry/master/wardenprotocol/images/ward.svg",
+ },
+ ],
+ },
+ ],
};
diff --git a/spaceward/src/features/actions/Actions.tsx b/spaceward/src/features/actions/Actions.tsx
index b493ba0b8..3602a6498 100644
--- a/spaceward/src/features/actions/Actions.tsx
+++ b/spaceward/src/features/actions/Actions.tsx
@@ -7,7 +7,7 @@ import {
} from "@/components/ui/accordion";
import { useAddressContext } from "@/hooks/useAddressContext";
import useWardenIntent from "@/hooks/useWardenIntent";
-import { Action as ActionModel } from "@wardenprotocol/wardjs/dist/codegen/warden/intent/action";
+import { Action as ActionModel } from "warden-protocol-wardenprotocol-client-ts/lib/warden.intent/rest";
import { prettyActionStatus } from "@/utils/formatting";
export function Actions() {
diff --git a/spaceward/src/features/apps/Apps.tsx b/spaceward/src/features/apps/Apps.tsx
index 6c6422c1f..a071c651d 100644
--- a/spaceward/src/features/apps/Apps.tsx
+++ b/spaceward/src/features/apps/Apps.tsx
@@ -16,10 +16,18 @@ const apps = [
description:
"Squid allows any token to be swapped between blockchains, and unlocks access to apps across chains in a single click.",
},
+ {
+ name: "Osmosis",
+ url: "https://testnet.osmosis.zone/?to=ATOM&from=OSMO",
+ logo: "/logos/osmosis.svg",
+ description:
+ "Swap, earn, and build on the leading decentralized Cosmos exchange.",
+ badge: "COSMOS",
+ },
{
name: "PancakeSwap",
url: "https://pancakeswap.finance/swap?chain=sepolia",
- logo: "/logos/pancakeswap.svg",
+ // logo: "/logos/pancakeswap.svg",
description:
"Trade, earn, and own crypto on the all-in-one multichain DEX.",
},
@@ -37,13 +45,13 @@ const apps = [
description:
"CoW Protocol finds the lowest price for your trade across all exchanges and aggregators.",
},
- {
- name: "Hedgy",
- url: "https://app.hedgey.finance/",
- // logo: "/logos/hedgy.svg",
- description:
- "Token vesting, lockups, grants and distributions for your team, investors and community.",
- },
+ // {
+ // name: "Hedgy",
+ // url: "https://app.hedgey.finance/",
+ // // logo: "/logos/hedgy.svg",
+ // description:
+ // "Token vesting, lockups, grants and distributions for your team, investors and community.",
+ // },
];
export function Apps() {
@@ -67,7 +75,9 @@ export function Apps() {
{app.description}
- EVM
+
+ {app.badge ? app.badge : "EVM"}
+
))}
diff --git a/spaceward/src/features/home/HomeApps.tsx b/spaceward/src/features/home/HomeApps.tsx
index cb289c941..7933ee4cd 100644
--- a/spaceward/src/features/home/HomeApps.tsx
+++ b/spaceward/src/features/home/HomeApps.tsx
@@ -16,12 +16,20 @@ const apps = [
description:
"Squid allows any token to be swapped between blockchains, and unlocks access to apps across chains in a single click.",
},
+ // {
+ // name: "PancakeSwap",
+ // url: "https://pancakeswap.finance/swap?chain=sepolia",
+ // logo: "/logos/pancakeswap.svg",
+ // description:
+ // "Trade, earn, and own crypto on the all-in-one multichain DEX.",
+ // },
{
- name: "PancakeSwap",
- url: "https://pancakeswap.finance/swap?chain=sepolia",
- logo: "/logos/pancakeswap.svg",
+ name: "Osmosis",
+ url: "https://testnet.osmosis.zone/?to=ATOM&from=OSMO",
+ logo: "/logos/osmosis.svg",
description:
- "Trade, earn, and own crypto on the all-in-one multichain DEX.",
+ "Swap, earn, and build on the leading decentralized Cosmos exchange.",
+ badge: "COSMOS",
},
];
@@ -29,8 +37,8 @@ export function HomeApps() {
return (
{apps.map((app) => (
-
-
+
+
{app.logo && (
{app.description}
-
EVM
+
+ {app.badge ? app.badge : "EVM"}
+
))}
diff --git a/spaceward/src/features/home/HomeAssets.tsx b/spaceward/src/features/home/HomeAssets.tsx
index 3eab472d2..049c003d0 100644
--- a/spaceward/src/features/home/HomeAssets.tsx
+++ b/spaceward/src/features/home/HomeAssets.tsx
@@ -52,7 +52,7 @@ export function HomeAssets() {
if (query.data?.keys?.length === 0) {
return (
-
+
No keys found in this space
Add a key to start receiving assets
@@ -65,7 +65,7 @@ export function HomeAssets() {
return (
<>
{query.data?.keys?.map((key) => (
-
+
{key.addresses?.map((addr) => {
@@ -86,10 +86,7 @@ export function HomeAssets() {
}
const isCosmosWallet = (type?: AddressType) =>
- type &&
- [AddressType.ADDRESS_TYPE_OSMOSIS].includes(
- type,
- );
+ type && [AddressType.ADDRESS_TYPE_OSMOSIS].includes(type);
function Address({
address,
@@ -127,10 +124,7 @@ function Address({
{type === AddressType.ADDRESS_TYPE_ETHEREUM ? (
-
+
) : isCosmosWallet(type) ? (
) : null}
@@ -200,5 +194,5 @@ function Sepolia({ address, keyId }: { address: string; keyId: Long }) {
}
function CosmosLike() {
- return null
+ return null;
}
diff --git a/spaceward/src/features/home/TotalAssetValue.tsx b/spaceward/src/features/home/TotalAssetValue.tsx
index c9063f7b5..4f7b53986 100644
--- a/spaceward/src/features/home/TotalAssetValue.tsx
+++ b/spaceward/src/features/home/TotalAssetValue.tsx
@@ -71,11 +71,11 @@ export function TotalAssetValue() {
return (
-
Total asset value
+
Total asset value
{isPending ? (
) : (
-
+
{currency === "usd"
? USDollar.format(
parseFloat(formatEther(totalBalance)) * 2940,
diff --git a/spaceward/src/features/intents/AddPersonModal.tsx b/spaceward/src/features/intents/AddPersonModal.tsx
index 71b5b365f..0aa41e2b0 100644
--- a/spaceward/src/features/intents/AddPersonModal.tsx
+++ b/spaceward/src/features/intents/AddPersonModal.tsx
@@ -44,8 +44,8 @@ const AddPersonModal = ({
-
- Add a person
+
+ Add an approver
Enter an address
@@ -100,7 +100,7 @@ const AddPersonModal = ({
`opacity-[0.3] pointer-events-none`,
)}
>
- Add Person
+ Add Approver
diff --git a/spaceward/src/features/intents/ChangePersonModal.tsx b/spaceward/src/features/intents/ChangePersonModal.tsx
index b90341e8a..3dab5ef4f 100644
--- a/spaceward/src/features/intents/ChangePersonModal.tsx
+++ b/spaceward/src/features/intents/ChangePersonModal.tsx
@@ -39,7 +39,7 @@ const ChangePersonModal = ({
- Select the persons
+ Select the approvers
Who should approve the transactions
@@ -51,7 +51,7 @@ const ChangePersonModal = ({
}}
className="px-5 hover:text-white transition-all duration-200"
>
- Add Person
+ Add an approver
{addresses.length ? (
-
+
-
+
Select an approval condition
-
How will transactions be approved in the Space
+
How will transactions be approved
-
+
Joint approval
-
- Each person must approve the transaction
+
+ Each approver must approve the transaction
@@ -64,15 +65,15 @@ const CreateIntentModal = ({
}}
className="flex items-center gap-3 py-5 cursor-pointer"
>
-
+
Approval by certain amount
-
- Set amount of persons should approve the
+
+ Set how many approvers should approve the
transaction
@@ -87,15 +88,15 @@ const CreateIntentModal = ({
}}
className="flex items-center gap-3 py-5 cursor-pointer"
>
-
+
Approval by anyone
-
- Any person can approve the transaction
+
+ Any approver can approve the transaction
diff --git a/spaceward/src/features/intents/Intent.tsx b/spaceward/src/features/intents/Intent.tsx
index 06987489d..bc6bd8dba 100644
--- a/spaceward/src/features/intents/Intent.tsx
+++ b/spaceward/src/features/intents/Intent.tsx
@@ -5,6 +5,7 @@ import CreateIntentModal from "./CreateIntentModal";
import IntentCondition from "./IntentCondition";
import Portal from "@/components/ui/portal";
import AddressAvatar from "@/components/AddressAvatar";
+import { X, XIcon } from "lucide-react";
const IntentComponent = ({
intent: _intent,
@@ -75,26 +76,20 @@ const IntentComponent = ({
return (
{isEditState ? (
-
- {intent.name}
-
- ) : (
{
setDiff((prev) => ({
@@ -103,6 +98,10 @@ const IntentComponent = ({
}));
}}
/>
+ ) : (
+
+ {intent.name}
+
)}
@@ -338,7 +337,7 @@ const IntentComponent = ({
) : (
-
+
{intent.addresses.slice(0, 2).map((address, key) => (
@@ -382,7 +381,7 @@ const IntentComponent = ({
}}
className="absolute top-8 right-8 opacity-[0.5] hover:opacity-[100%] transition-all"
>
-
+
@@ -390,7 +389,8 @@ const IntentComponent = ({
Approve the Intent in your wallet
- Open the browser extension if it didn't.
+ Open the browser extension if it didn't
+ open automatically.
diff --git a/spaceward/src/features/intents/IntentCondition.tsx b/spaceward/src/features/intents/IntentCondition.tsx
index 45cf0c8b9..2b8e4bc8f 100644
--- a/spaceward/src/features/intents/IntentCondition.tsx
+++ b/spaceward/src/features/intents/IntentCondition.tsx
@@ -57,7 +57,7 @@ const IntentCondition = ({
)}
-
+
{type == "joint"
? `Joint approval`
: type == "anyone"
@@ -78,7 +78,7 @@ const IntentCondition = ({
-
+
{type == "joint" ? (
`Each person must approve the transaction`
) : type == "anyone" ? (
@@ -160,7 +160,7 @@ const IntentCondition = ({
) : (
)}
- Add Persons
+ Add approver
diff --git a/spaceward/src/features/intents/IntentNotifications.tsx b/spaceward/src/features/intents/IntentNotifications.tsx
deleted file mode 100644
index e69de29bb..000000000
diff --git a/spaceward/src/features/intents/NewIntentButton.tsx b/spaceward/src/features/intents/NewIntentButton.tsx
index ed97a6442..48ce70e83 100644
--- a/spaceward/src/features/intents/NewIntentButton.tsx
+++ b/spaceward/src/features/intents/NewIntentButton.tsx
@@ -40,7 +40,7 @@ export function NewIntentButton({ onClick }: { onClick: () => void }) {
return (
-
+
-
- {/* {address.slice(0, 4)}...{address.slice(-4)} */}
- {"..." + address.slice(-8)}
-
+
{"..." + address.slice(-8)}
{isSelected ? (
diff --git a/spaceward/src/features/keys/Keys.tsx b/spaceward/src/features/keys/Keys.tsx
index ead75199a..bdf464b16 100644
--- a/spaceward/src/features/keys/Keys.tsx
+++ b/spaceward/src/features/keys/Keys.tsx
@@ -116,12 +116,12 @@ function Key({
diff --git a/spaceward/src/features/metamask/MetaMaskRequests.tsx b/spaceward/src/features/metamask/MetaMaskRequests.tsx
index 22493b375..221dc49f9 100644
--- a/spaceward/src/features/metamask/MetaMaskRequests.tsx
+++ b/spaceward/src/features/metamask/MetaMaskRequests.tsx
@@ -220,10 +220,10 @@ export function MetaMaskRequests() {
size="icon"
aria-label="Update dimensions"
className={cn(
- "h-20 w-20 rounded-none border-0 hover:bg-transparent flex items-center place-content-center group",
+ "h-16 w-16 rounded-none border-0 hover:bg-transparent flex items-center place-content-center group",
)}
>
-
+
setOpen(false)}
>
-
+
-
+
Notifications
diff --git a/spaceward/src/features/spaces/NoActiveSpace.tsx b/spaceward/src/features/spaces/NoActiveSpace.tsx
deleted file mode 100644
index f5e4e61ad..000000000
--- a/spaceward/src/features/spaces/NoActiveSpace.tsx
+++ /dev/null
@@ -1,37 +0,0 @@
-import { Button } from "@/components/ui/button";
-import { useAddressContext } from "@/hooks/useAddressContext";
-import { useClient } from "@/hooks/useClient";
-import { monitorTx } from "@/hooks/keplr";
-import { useToast } from "@/components/ui/use-toast";
-
-export function NoActiveSpace() {
- const { address } = useAddressContext();
- const { toast } = useToast();
- const client = useClient();
- const sendMsgNewSpace = client.WardenWardenV1Beta2.tx.sendMsgNewSpace;
- return (
-
-
No Active Space
-
- You have no active spaces, use the button below to create one.
-
-
{
- monitorTx(
- sendMsgNewSpace({
- value: {
- creator: address,
- signIntentId: 0,
- adminIntentId: 0,
- additionalOwners: [],
- },
- }),
- toast,
- );
- }}
- >
- Create a new space
-
-
- );
-}
diff --git a/spaceward/src/features/spaces/NoSpaces.tsx b/spaceward/src/features/spaces/NoSpaces.tsx
new file mode 100644
index 000000000..7aab780c2
--- /dev/null
+++ b/spaceward/src/features/spaces/NoSpaces.tsx
@@ -0,0 +1,59 @@
+import { Button } from "@/components/ui/button";
+import { useAddressContext } from "@/hooks/useAddressContext";
+import { useClient } from "@/hooks/useClient";
+import { monitorTx } from "@/hooks/keplr";
+import { useToast } from "@/components/ui/use-toast";
+import { useAsset } from "@/hooks/useAsset";
+import FaucetButton from "@/components/FaucetButton";
+
+export function NoSpaces() {
+ const { address } = useAddressContext();
+ const { toast } = useToast();
+ const client = useClient();
+ const sendMsgNewSpace = client.WardenWardenV1Beta2.tx.sendMsgNewSpace;
+ const { balance } = useAsset("uward");
+ const ward = parseInt(balance?.amount || "0") / 10 ** 6;
+ return (
+
+ {ward > 0 ? (
+ <>
+
+ Create your first space
+
+
+ A space functions as a management hub for a collection
+ of keys, assets and intents.
+
+
{
+ monitorTx(
+ sendMsgNewSpace({
+ value: {
+ creator: address,
+ signIntentId: 0,
+ adminIntentId: 0,
+ additionalOwners: [],
+ },
+ }),
+ toast,
+ );
+ }}
+ >
+ Create a new space
+
+ >
+ ) : (
+ <>
+
Get WARD Token
+
+ To use SpaceWard you need some WARD tokens. You can get
+ using the faucet below.
+
+
+
+
+ >
+ )}
+
+ );
+}
diff --git a/spaceward/src/features/spaces/SpaceSelector.tsx b/spaceward/src/features/spaces/SpaceSelector.tsx
new file mode 100644
index 000000000..5ee3660ce
--- /dev/null
+++ b/spaceward/src/features/spaces/SpaceSelector.tsx
@@ -0,0 +1,231 @@
+import { Button } from "@/components/ui/button";
+import { ChevronsUpDown } from "lucide-react";
+import {
+ Popover,
+ PopoverContent,
+ PopoverTrigger,
+} from "@/components/ui/popover";
+import AddressAvatar from "@/components/AddressAvatar";
+import { useAddressContext } from "@/hooks/useAddressContext";
+import useWardenWardenV1Beta2 from "@/hooks/useWardenWardenV1Beta2";
+import { useSpaceId } from "@/hooks/useSpaceId";
+import { monitorTx } from "@/hooks/keplr";
+import { useClient } from "@/hooks/useClient";
+import { useToast } from "@/components/ui/use-toast";
+import cn from "clsx";
+import { Plus } from "lucide-react";
+import { TxMsgData } from "cosmjs-types/cosmos/base/abci/v1beta1/abci";
+import {
+ MsgNewKeyRequestResponse,
+ MsgNewSpaceResponse,
+} from "warden-protocol-wardenprotocol-client-ts/lib/warden.warden.v1beta2/module";
+import { MsgActionCreated } from "warden-protocol-wardenprotocol-client-ts/lib/warden.intent/module";
+// import { MsgNewSpace } from "warden-protocol-wardenprotocol-client-ts/lib/warden.warden.v1beta2/module";
+
+interface SpacesQueryResult {
+ pageParam: number;
+ pagination?:
+ | { next_key?: string | undefined; total?: string | undefined }
+ | undefined;
+ spaces?:
+ | {
+ id?: string | undefined;
+ creator?: string | undefined;
+ owners?: string[] | undefined;
+ admin_intent_id?: string | undefined;
+ sign_intent_id?: string | undefined;
+ }[]
+ | undefined;
+}
+function sleep(ms: number) {
+ return new Promise((resolve) => setTimeout(resolve, ms));
+}
+
+async function handleCreateSpace(
+ address: string,
+ client: any,
+ sendMsgNewSpace: any,
+ toast: any,
+) {
+ try {
+ const res = await monitorTx(
+ sendMsgNewSpace({
+ value: {
+ creator: address,
+ signIntentId: 0,
+ adminIntentId: 0,
+ additionalOwners: [],
+ },
+ }),
+ toast,
+ );
+
+ if (!res) {
+ throw new Error("failed to broadcast tx");
+ }
+
+ if (res.tx_response?.code !== 0 || !res.tx_response.data) {
+ throw new Error(`tx failed: ${JSON.stringify(res)}`);
+ }
+
+ // // parse tx msg response
+ // const bytes = Uint8Array.from(
+ // res.tx_response.data
+ // .match(/.{1,2}/g)
+ // ?.map((byte) => parseInt(byte, 16)) || [],
+ // );
+ // const msgData = TxMsgData.decode(bytes);
+ // const actionCreated = MsgActionCreated.decode(
+ // msgData.msgResponses[0].value,
+ // );
+ // const actionId = actionCreated.action?.id;
+
+ // console.log(actionCreated);
+
+ // // wait for action to be completed
+ // // setState(KeyRequesterState.AWAITING_APPROVALS);
+ // let spaceRequestId = null;
+ // while (true) {
+ // const res = await client.WardenIntent.query.queryActionById({
+ // id: `${actionId}`,
+ // });
+ // if (
+ // res.data.action?.status !== "ACTION_STATUS_PENDING" &&
+ // res.data.action?.status !== "ACTION_STATUS_COMPLETED"
+ // ) {
+ // throw new Error(
+ // `action failed: ${JSON.stringify(res.data.action)}`,
+ // );
+ // }
+
+ // spaceRequestId = (
+ // res.data.action?.result as MsgNewSpaceResponse | null
+ // )?.id;
+
+ // if (spaceRequestId) {
+ // break;
+ // }
+
+ // await sleep(1000);
+ // }
+ } catch (error) {
+ console.error(error);
+ }
+}
+
+export function SpaceSelector() {
+ const { address } = useAddressContext();
+ const { spaceId, setSpaceId } = useSpaceId();
+
+ const { toast } = useToast();
+ const client = useClient();
+ const sendMsgNewSpace = client.WardenWardenV1Beta2.tx.sendMsgNewSpace;
+
+ const { QuerySpacesByOwner } = useWardenWardenV1Beta2();
+ const { data: spacesQuery } = QuerySpacesByOwner(
+ { owner: address },
+ { enabled: !!address },
+ 100,
+ );
+ const count =
+ ((spacesQuery as any)?.pages[0] as SpacesQueryResult | undefined)
+ ?.spaces?.length || 0;
+
+ return count && count > 0 ? (
+
+
+
+ {spaceId ? (
+
+
+
+
+ Active Space
+
+
+ {"Space #" + spaceId}
+
+
+
+
+ ) : (
+
+
+ No Active Space
+
+
+ )}
+
+
+
+
+
+ {count && count > 0 ? (
+
+ {(
+ (spacesQuery as any)?.pages[0] as
+ | SpacesQueryResult
+ | undefined
+ )?.spaces?.map((space) => (
+
setSpaceId(space.id || null)}
+ className="flex flex-row items-center space-x-4 cursor-pointer"
+ >
+
+
+ {"Space #" + space.id}
+
+
+ ))}
+
+ ) : null}
+
+
+ handleCreateSpace(
+ address,
+ client,
+ sendMsgNewSpace,
+ toast,
+ )
+ }
+ >
+
+
+ Create New Space
+
+
+
+
+
+
+ ) : null;
+}
diff --git a/spaceward/src/features/spaces/index.ts b/spaceward/src/features/spaces/index.ts
index 17f25e015..776ae63c5 100644
--- a/spaceward/src/features/spaces/index.ts
+++ b/spaceward/src/features/spaces/index.ts
@@ -1,2 +1,3 @@
export * from "./Spaces";
-export * from "./NoActiveSpace";
+export * from "./NoSpaces";
+export * from "./SpaceSelector";
diff --git a/spaceward/src/features/wallet/Connect.tsx b/spaceward/src/features/wallet/Connect.tsx
index 7a8fea12c..2b37c2b9e 100644
--- a/spaceward/src/features/wallet/Connect.tsx
+++ b/spaceward/src/features/wallet/Connect.tsx
@@ -2,61 +2,61 @@ import { MouseEventHandler } from "react";
import { Button as UIButton } from "@/components/ui/button";
export type ButtonProps = {
- text?: string;
- disabled?: boolean;
- onClick?: MouseEventHandler
;
+ text?: string;
+ disabled?: boolean;
+ onClick?: MouseEventHandler;
};
export type ConnectProps = Pick;
function noop() {
- return false;
+ return false;
}
export function Button({ text, disabled, onClick = noop }: ButtonProps) {
- return (
-
- {text}
-
- );
+ return (
+
+ {text}
+
+ );
}
export const ButtonConnect = ({
- text = "Connect",
- onClick = noop,
+ text = "Connect",
+ onClick = noop,
}: ConnectProps) => ;
export const ButtonConnected = ({
- text = "My Wallet",
- onClick = noop,
+ text = "My Wallet",
+ onClick = noop,
}: ConnectProps) => ;
export const ButtonDisconnected = ({
- text = "Connect",
- onClick = noop,
+ text = "Connect",
+ onClick = noop,
}: ConnectProps) => ;
export const ButtonConnecting = ({ text = "Connecting ..." }: ConnectProps) => (
-
+
);
export const ButtonRejected = ({
- text = "Reconnect",
- onClick = noop,
+ text = "Reconnect",
+ onClick = noop,
}: ConnectProps) => ;
export const ButtonError = ({
- text = "Change Wallet",
- onClick = noop,
+ text = "Change Wallet",
+ onClick = noop,
}: ConnectProps) => ;
export const ButtonNotExist = ({
- text = "Install Wallet",
- onClick = noop,
+ text = "Install Wallet",
+ onClick = noop,
}: ConnectProps) => ;
diff --git a/spaceward/src/features/walletconnect/WalletConnect.tsx b/spaceward/src/features/walletconnect/WalletConnect.tsx
index 8b3981f25..b39bde0d0 100644
--- a/spaceward/src/features/walletconnect/WalletConnect.tsx
+++ b/spaceward/src/features/walletconnect/WalletConnect.tsx
@@ -4,7 +4,11 @@ import { useMediaQuery } from "@uidotdev/usehooks";
import { Button } from "@/components/ui/button";
import { Input } from "@/components/ui/input";
import { Core } from "@walletconnect/core";
-import { IWeb3Wallet, Web3Wallet, Web3WalletTypes } from "@walletconnect/web3wallet";
+import {
+ IWeb3Wallet,
+ Web3Wallet,
+ Web3WalletTypes,
+} from "@walletconnect/web3wallet";
import { getSdkError, buildApprovedNamespaces } from "@walletconnect/utils";
import {
ProposalTypes,
@@ -122,9 +126,7 @@ function useWeb3Wallet(relayUrl: string) {
]);
}, [w]);
- const expireProposal = async (
- event: Web3WalletTypes.ProposalExpire,
- ) => {
+ const expireProposal = async (event: Web3WalletTypes.ProposalExpire) => {
await w!.rejectSession({
id: event.id,
reason: getSdkError("USER_REJECTED"),
@@ -260,7 +262,7 @@ async function fetchAddresses(spaceId: string, type: AddressType) {
return res.keys?.map((key) => ({
id: key.key.id,
publicKey: key.key.publicKey,
- address: key.addresses[0].address
+ address: key.addresses[0].address,
}));
}
@@ -294,8 +296,14 @@ async function rejectSession(w: IWeb3Wallet, id: number) {
async function approveSession(w: IWeb3Wallet, spaceId: string, proposal: any) {
const { id, relays } = proposal;
- const ethereumAddresses = await fetchAddresses(spaceId, AddressType.ADDRESS_TYPE_ETHEREUM);
- const osmosisAddresses = await fetchAddresses(spaceId, AddressType.ADDRESS_TYPE_OSMOSIS);
+ const ethereumAddresses = await fetchAddresses(
+ spaceId,
+ AddressType.ADDRESS_TYPE_ETHEREUM,
+ );
+ const osmosisAddresses = await fetchAddresses(
+ spaceId,
+ AddressType.ADDRESS_TYPE_OSMOSIS,
+ );
if (!ethereumAddresses && !osmosisAddresses) {
console.error("No addresses found for space", spaceId);
@@ -319,7 +327,6 @@ async function approveSession(w: IWeb3Wallet, spaceId: string, proposal: any) {
({ address }) => `eip155:11155111:${address}`,
),
],
-
},
cosmos: {
...supportedNamespaces.cosmos,
@@ -331,7 +338,7 @@ async function approveSession(w: IWeb3Wallet, spaceId: string, proposal: any) {
({ address }) => `cosmos:osmo-test-5:${address}`,
),
],
- }
+ },
},
});
@@ -493,11 +500,11 @@ export function WalletConnect() {
variant="ghost"
size="icon"
className={cn(
- "h-20 w-20 rounded-none border-0 hover:bg-transparent flex items-center place-content-center group",
+ "h-16 w-16 rounded-none border-0 hover:bg-transparent flex items-center place-content-center group",
sessionRequests.length > 0 && "animate-pulse",
)}
>
-
+
@@ -522,15 +529,16 @@ export function WalletConnect() {
sessionRequests.length === 0 ? setOpen(false) : null
}
>
-
+
- s.topic ===
- req.topic,
- )?.peer
- .metadata
- .icons[0]
+ (
+ s,
+ ) =>
+ s.topic ===
+ req.topic,
+ )?.peer
+ .metadata
+ .icons[0]
: `${activeSessions.find((s) => s.topic === req.topic)?.peer.metadata.url}${activeSessions.find((s) => s.topic === req.topic)?.peer.metadata.icons[0]}`
}
/>
@@ -749,10 +757,10 @@ export function WalletConnect() {
let response =
null;
switch (
- req
- .params
- .request
- .method
+ req
+ .params
+ .request
+ .method
) {
case "personal_sign": {
// find Warden Protocol key associated with the requested ETH address
@@ -790,8 +798,8 @@ export function WalletConnect() {
const hash =
Web3.utils.keccak256(
"\x19Ethereum Signed Message:\n" +
- text.length +
- text,
+ text.length +
+ text,
);
// send signature request to Warden Protocol and wait response
@@ -811,14 +819,14 @@ export function WalletConnect() {
}
response =
- {
- result: ethers.hexlify(
- sig,
- ),
- id: req.id,
- jsonrpc:
- "2.0",
- };
+ {
+ result: ethers.hexlify(
+ sig,
+ ),
+ id: req.id,
+ jsonrpc:
+ "2.0",
+ };
break;
}
@@ -884,12 +892,12 @@ export function WalletConnect() {
);
response =
- {
- result: signedTx.hash,
- id: req.id,
- jsonrpc:
- "2.0",
- };
+ {
+ result: signedTx.hash,
+ id: req.id,
+ jsonrpc:
+ "2.0",
+ };
break;
}
case "eth_signTypedData_v4": {
@@ -927,9 +935,9 @@ export function WalletConnect() {
// I split the types into two objects and manually
// create two different encoders.
const typesWithoutDomain =
- {
- ...data.types,
- };
+ {
+ ...data.types,
+ };
delete typesWithoutDomain.EIP712Domain;
const domainEncoder =
new ethers.TypedDataEncoder(
@@ -993,14 +1001,14 @@ export function WalletConnect() {
}
response =
- {
- result: ethers.hexlify(
- signature,
- ),
- id: req.id,
- jsonrpc:
- "2.0",
- };
+ {
+ result: ethers.hexlify(
+ signature,
+ ),
+ id: req.id,
+ jsonrpc:
+ "2.0",
+ };
break;
}
case "cosmos_getAccounts": {
@@ -1008,19 +1016,27 @@ export function WalletConnect() {
await fetchAddresses(
wsAddr,
// fixme resolve against chainid provided by the request
- AddressType.ADDRESS_TYPE_OSMOSIS
+ AddressType.ADDRESS_TYPE_OSMOSIS,
);
- response = {
- result: addresses?.map(({ address, publicKey }) => ({
- address,
- algo: "secp256k1",
- pubkey: base64FromBytes(publicKey),
- })),
- id: req.id,
- jsonrpc:
- "2.0",
- };
+ response =
+ {
+ result: addresses?.map(
+ ({
+ address,
+ publicKey,
+ }) => ({
+ address,
+ algo: "secp256k1",
+ pubkey: base64FromBytes(
+ publicKey,
+ ),
+ }),
+ ),
+ id: req.id,
+ jsonrpc:
+ "2.0",
+ };
break;
}
@@ -1037,9 +1053,17 @@ export function WalletConnect() {
.request
.params;
- const key = await findKeyByAddress(wsAddr, signerAddress);
- if (!key) {
- throw new Error(`Unknown address ${signerAddress}`);
+ const key =
+ await findKeyByAddress(
+ wsAddr,
+ signerAddress,
+ );
+ if (
+ !key
+ ) {
+ throw new Error(
+ `Unknown address ${signerAddress}`,
+ );
}
let signature =
@@ -1086,23 +1110,28 @@ export function WalletConnect() {
}
response =
- {
- jsonrpc:
- "2.0",
- id: req.id,
- result: {
- signed: signDoc,
- signature:
- {
- signature: base64FromBytes(signature),
- pub_key:
- {
- type: "tendermint/PubKeySecp256k1", // hardcoded value
- value: base64FromBytes(key.publicKey),
- },
+ {
+ jsonrpc:
+ "2.0",
+ id: req.id,
+ result: {
+ signed: signDoc,
+ signature:
+ {
+ signature:
+ base64FromBytes(
+ signature,
+ ),
+ pub_key:
+ {
+ type: "tendermint/PubKeySecp256k1", // hardcoded value
+ value: base64FromBytes(
+ key.publicKey,
+ ),
+ },
+ },
},
- },
- };
+ };
break;
}
@@ -1126,15 +1155,15 @@ export function WalletConnect() {
{
topic,
response:
- {
- jsonrpc:
- "2.0",
- id: req.id,
- error: {
- code: 1,
- message: `${error}`,
+ {
+ jsonrpc:
+ "2.0",
+ id: req.id,
+ error: {
+ code: 1,
+ message: `${error}`,
+ },
},
- },
},
);
} finally {
@@ -1269,7 +1298,7 @@ export function WalletConnect() {
e.target as HTMLImageElement;
target.src =
resolvedTheme &&
- resolvedTheme ===
+ resolvedTheme ===
"light"
? "/app-fallback.svg"
: "/app-fallback-dark.svg";
@@ -1281,9 +1310,9 @@ export function WalletConnect() {
"http",
)
? s
- .peer
- .metadata
- .icons[0]
+ .peer
+ .metadata
+ .icons[0]
: `${s.peer.metadata.url}${s.peer.metadata.icons[0]}`
}
/>
diff --git a/spaceward/src/layouts/right-sidebar.tsx b/spaceward/src/layouts/right-sidebar.tsx
index d5bef88e5..5194bd59c 100644
--- a/spaceward/src/layouts/right-sidebar.tsx
+++ b/spaceward/src/layouts/right-sidebar.tsx
@@ -5,8 +5,8 @@ import { MetaMaskRequests } from "../features/metamask";
export function RightSidebar() {
return (
-
-
+
+
diff --git a/spaceward/src/layouts/sidebar.tsx b/spaceward/src/layouts/sidebar.tsx
index 7a4fb84a8..ec249cfe3 100644
--- a/spaceward/src/layouts/sidebar.tsx
+++ b/spaceward/src/layouts/sidebar.tsx
@@ -7,6 +7,7 @@ import { useAddressContext } from "@/hooks/useAddressContext";
import { cn } from "@/lib/utils";
import { Button, buttonVariants } from "@/components/ui/button";
import { useSpaceId } from "@/hooks/useSpaceId";
+import { Icons } from "@/components/ui/icons";
import {
AppWindow,
ArrowLeftRight,
@@ -19,70 +20,47 @@ import {
User2Icon,
HomeIcon,
HelpCircleIcon,
+ OrbitIcon,
+ FileCheckIcon,
+ BookUserIcon,
} from "lucide-react";
import { Separator } from "@/components/ui/separator";
-import AddressAvatar from "@/components/AddressAvatar";
+// import AddressAvatar from "@/components/AddressAvatar";
import useWardenWardenV1Beta2 from "@/hooks/useWardenWardenV1Beta2";
import { useClient } from "@/hooks/useClient";
-import { monitorTx } from "@/hooks/keplr";
+// import { monitorTx } from "@/hooks/keplr";
import { useToast } from "@/components/ui/use-toast";
-
-import {
- HoverCard,
- HoverCardContent,
- HoverCardTrigger,
-} from "@/components/ui/hover-card";
+import { SpaceSelector } from "@/features/spaces";
const spaceNavItems = [
{
- label: "Home",
- icon:
,
+ label: "Dashboard",
+ icon:
,
url: "/",
},
+ // {
+ // label: "Spaces",
+ // icon:
,
+ // url: "/spaces",
+ // },
{
label: "Keys",
- icon:
,
+ icon:
,
url: "/keys",
},
{
label: "Assets",
- icon:
,
+ icon:
,
url: "/assets",
},
{
label: "Owners",
- icon:
,
+ icon:
,
url: "/owners",
},
{
label: "Intents",
- icon: (
-
-
-
-
-
- ),
+ icon:
,
url: "/intents",
},
];
@@ -90,27 +68,32 @@ const spaceNavItems = [
const globalNavItems = [
{
label: "Actions",
- icon:
,
+ icon:
,
url: "/actions",
},
+ // {
+ // label: "Address Book",
+ // icon:
,
+ // url: "/address-book",
+ // },
{
label: "Keychains",
- icon:
,
+ icon:
,
url: "/keychains",
},
{
label: "Explorer",
- icon:
,
+ icon:
,
url: "/explorer",
},
{
label: "dApps",
- icon:
,
+ icon:
,
url: "/apps",
},
{
label: "Settings",
- icon:
,
+ icon:
,
url: "/settings",
},
];
@@ -167,8 +150,8 @@ export function Sidebar() {
}, [spaceId]);
return (
-
-
+
+ {/*
{count && count > 0 ? (
@@ -249,10 +232,16 @@ export function Sidebar() {
-
-
+
*/}
+
*/}
+
+
-
+
{spaceNavItems.map((item) => (
{item.icon}
@@ -309,8 +301,8 @@ export function Sidebar() {
-
-
+
+
{globalNavItems.map((item) => (
{item.icon}
diff --git a/spaceward/src/layouts/site-header.tsx b/spaceward/src/layouts/site-header.tsx
index cf15ac738..6039d7a41 100644
--- a/spaceward/src/layouts/site-header.tsx
+++ b/spaceward/src/layouts/site-header.tsx
@@ -7,6 +7,7 @@ import { Button } from "@/components/ui/button";
import { MenuIcon } from "lucide-react";
import { MobileNav } from "./mobile-nav";
import { WalletConnect } from "../features/walletconnect/WalletConnect";
+import { SpaceSelector } from "@/features/spaces";
export function SiteHeader() {
const [open, setOpen] = useState(false);
@@ -18,8 +19,8 @@ export function SiteHeader() {
}, [location]);
return (
-
-
+
+
{/* Mobile Nav */}
-
-
-
-
-
diff --git a/spaceward/src/pages/Actions.tsx b/spaceward/src/pages/Actions.tsx
index ba6730890..d3fbbd4a2 100644
--- a/spaceward/src/pages/Actions.tsx
+++ b/spaceward/src/pages/Actions.tsx
@@ -5,17 +5,17 @@ export function ActionsPage() {
const { address } = useAddressContext();
if (!address) {
return (
-
+
Your actions
Connect your wallet to see your actions
);
}
return (
-
-
+
+
diff --git a/spaceward/src/pages/Apps.tsx b/spaceward/src/pages/Apps.tsx
index 692fba242..126be5889 100644
--- a/spaceward/src/pages/Apps.tsx
+++ b/spaceward/src/pages/Apps.tsx
@@ -3,9 +3,9 @@ import { Apps } from "@/features/apps";
export function AppsPage() {
return (
-
+
diff --git a/spaceward/src/pages/AppsOpen.tsx b/spaceward/src/pages/AppsOpen.tsx
index 5c2723c3f..a75ad30c6 100644
--- a/spaceward/src/pages/AppsOpen.tsx
+++ b/spaceward/src/pages/AppsOpen.tsx
@@ -3,8 +3,14 @@ export function AppsOpenPage() {
const url = queryParameters.get("url") || "";
return (
-