diff --git a/package-lock.json b/package-lock.json
index c892dd2..2125d11 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -14,7 +14,7 @@
"@cosmjs/cosmwasm-stargate": "^0.31.3",
"@cosmjs/proto-signing": "^0.32.2",
"@cosmjs/stargate": "^0.32.2",
- "@mui/base": "^5.0.0-beta.37",
+ "@mui/base": "^5.0.0-beta.38",
"bignumber.js": "^9.1.2",
"cosmjs-types": "^0.9.0",
"next": "14.1.0",
@@ -1514,14 +1514,14 @@
}
},
"node_modules/@mui/base": {
- "version": "5.0.0-beta.37",
- "resolved": "https://registry.npmjs.org/@mui/base/-/base-5.0.0-beta.37.tgz",
- "integrity": "sha512-/o3anbb+DeCng8jNsd3704XtmmLDZju1Fo8R2o7ugrVtPQ/QpcqddwKNzKPZwa0J5T8YNW3ZVuHyQgbTnQLisQ==",
+ "version": "5.0.0-beta.38",
+ "resolved": "https://registry.npmjs.org/@mui/base/-/base-5.0.0-beta.38.tgz",
+ "integrity": "sha512-AsjD6Y1X5A1qndxz8xCcR8LDqv31aiwlgWMPxFAX/kCKiIGKlK65yMeVZ62iQr/6LBz+9hSKLiD1i4TZdAHKcQ==",
"dependencies": {
"@babel/runtime": "^7.23.9",
"@floating-ui/react-dom": "^2.0.8",
"@mui/types": "^7.2.13",
- "@mui/utils": "^5.15.11",
+ "@mui/utils": "^5.15.12",
"@popperjs/core": "^2.11.8",
"clsx": "^2.1.0",
"prop-types": "^15.8.1"
@@ -1558,9 +1558,9 @@
}
},
"node_modules/@mui/utils": {
- "version": "5.15.11",
- "resolved": "https://registry.npmjs.org/@mui/utils/-/utils-5.15.11.tgz",
- "integrity": "sha512-D6bwqprUa9Stf8ft0dcMqWyWDKEo7D+6pB1k8WajbqlYIRA8J8Kw9Ra7PSZKKePGBGWO+/xxrX1U8HpG/aXQCw==",
+ "version": "5.15.12",
+ "resolved": "https://registry.npmjs.org/@mui/utils/-/utils-5.15.12.tgz",
+ "integrity": "sha512-8SDGCnO2DY9Yy+5bGzu00NZowSDtuyHP4H8gunhHGQoIlhlY2Z3w64wBzAOLpYw/ZhJNzksDTnS/i8qdJvxuow==",
"dependencies": {
"@babel/runtime": "^7.23.9",
"@types/prop-types": "^15.7.11",
diff --git a/package.json b/package.json
index 36ce56a..b1f124b 100644
--- a/package.json
+++ b/package.json
@@ -19,7 +19,7 @@
"@cosmjs/cosmwasm-stargate": "^0.31.3",
"@cosmjs/proto-signing": "^0.32.2",
"@cosmjs/stargate": "^0.32.2",
- "@mui/base": "^5.0.0-beta.37",
+ "@mui/base": "^5.0.0-beta.38",
"bignumber.js": "^9.1.2",
"cosmjs-types": "^0.9.0",
"next": "14.1.0",
diff --git a/public/font/AkkuratLL-Black.otf b/public/font/AkkuratLL-Black.otf
deleted file mode 100644
index 4f7cad9..0000000
Binary files a/public/font/AkkuratLL-Black.otf and /dev/null differ
diff --git a/public/font/AkkuratLL-BlackItalic.otf b/public/font/AkkuratLL-BlackItalic.otf
deleted file mode 100644
index 1900c7a..0000000
Binary files a/public/font/AkkuratLL-BlackItalic.otf and /dev/null differ
diff --git a/public/font/AkkuratLL-Bold.otf b/public/font/AkkuratLL-Bold.otf
deleted file mode 100644
index 8c3ac41..0000000
Binary files a/public/font/AkkuratLL-Bold.otf and /dev/null differ
diff --git a/public/font/AkkuratLL-BoldItalic.otf b/public/font/AkkuratLL-BoldItalic.otf
deleted file mode 100644
index c46f3ed..0000000
Binary files a/public/font/AkkuratLL-BoldItalic.otf and /dev/null differ
diff --git a/public/font/AkkuratLL-Italic.otf b/public/font/AkkuratLL-Italic.otf
deleted file mode 100644
index 11588e3..0000000
Binary files a/public/font/AkkuratLL-Italic.otf and /dev/null differ
diff --git a/public/font/AkkuratLL-Light.otf b/public/font/AkkuratLL-Light.otf
deleted file mode 100644
index 5f9906f..0000000
Binary files a/public/font/AkkuratLL-Light.otf and /dev/null differ
diff --git a/public/font/AkkuratLL-LightItalic.otf b/public/font/AkkuratLL-LightItalic.otf
deleted file mode 100644
index 952a6e8..0000000
Binary files a/public/font/AkkuratLL-LightItalic.otf and /dev/null differ
diff --git a/public/font/AkkuratLL-Regular.otf b/public/font/AkkuratLL-Regular.otf
deleted file mode 100644
index c260f08..0000000
Binary files a/public/font/AkkuratLL-Regular.otf and /dev/null differ
diff --git a/public/font/AkkuratLL-Thin.otf b/public/font/AkkuratLL-Thin.otf
deleted file mode 100644
index 6235818..0000000
Binary files a/public/font/AkkuratLL-Thin.otf and /dev/null differ
diff --git a/public/font/AkkuratLL-ThinItalic.otf b/public/font/AkkuratLL-ThinItalic.otf
deleted file mode 100644
index 70e5174..0000000
Binary files a/public/font/AkkuratLL-ThinItalic.otf and /dev/null differ
diff --git a/src/app/globals.css b/src/app/globals.css
index 0be44fd..b161c90 100644
--- a/src/app/globals.css
+++ b/src/app/globals.css
@@ -54,18 +54,6 @@ body {
}
}
-@font-face {
- font-family: Akkurat;
- font-weight: 400;
- src: url(../../public/font/AkkuratLL-Regular.otf);
-}
-
-@font-face {
- font-family: Akkurat;
- font-weight: 700;
- src: url(../../public/font/AkkuratLL-Bold.otf);
-}
-
* {
font-family: Akkurat;
}
diff --git a/src/features/core/components/base-wrapper.tsx b/src/features/core/components/base-wrapper.tsx
index e2143c0..ac372e0 100644
--- a/src/features/core/components/base-wrapper.tsx
+++ b/src/features/core/components/base-wrapper.tsx
@@ -13,7 +13,7 @@ export default function RootLayout({
}: {
children: React.ReactNode;
}) {
- const [showAbstraction, setShowAbstraxion] = useModal();
+ const [, setShowAbstraxion] = useModal();
return (
@@ -34,13 +34,11 @@ export default function RootLayout({
{children}
- {showAbstraction && (
- {
- setShowAbstraxion(false);
- }}
- />
- )}
+ {
+ setShowAbstraxion(false);
+ }}
+ />
);
}
diff --git a/src/features/core/components/common-modal.tsx b/src/features/core/components/common-modal.tsx
index ada56c4..dd8eeed 100644
--- a/src/features/core/components/common-modal.tsx
+++ b/src/features/core/components/common-modal.tsx
@@ -31,13 +31,12 @@ const CommonModal = ({ children, ...props }: Props) => {
{...props}
style={{
content: {
- background: "#000",
+ background: "rgba(0,0,0,0.8)",
border: "none",
borderRadius: "48px",
bottom: "auto",
boxShadow: "0px 0px 50px 0px #FFFFFF40",
left: "50%",
- opacity: 0.8,
padding: "45px",
right: "auto",
top: "50%",
diff --git a/src/features/core/components/nav-account.tsx b/src/features/core/components/nav-account.tsx
index 1ffc793..e0690c5 100644
--- a/src/features/core/components/nav-account.tsx
+++ b/src/features/core/components/nav-account.tsx
@@ -1,30 +1,48 @@
"use client";
-import { useAbstraxionAccount, useModal } from "@burnt-labs/abstraxion";
+import {
+ useAbstraxionAccount,
+ useAbstraxionSigningClient,
+ useModal,
+} from "@burnt-labs/abstraxion";
import { Button } from "@burnt-labs/ui";
import { isTestnet } from "@/features/staking/lib/core/constants";
import { wallet } from "@/features/staking/lib/core/icons";
+import { ButtonPill, FloatingDropdown } from "./base";
+
+const Account = () => (
+
+
+ Account{" "}
+
+ {isTestnet ? "Testnet" : "Mainnet"}
+
+
+);
+
const NavAccount = () => {
const [, setShowAbstraxion] = useModal();
const { isConnected } = useAbstraxionAccount();
+ const { logout } = useAbstraxionSigningClient();
return (
{isConnected ? (
-
+
+
+ {
+ logout?.();
+ }}
+ variant="danger"
+ >
+ Log out
+
+
+
) : (
{sortedDelegations.map((delegation, index) => (
,
+ setStep: (step: Step) => void,
+) => {
+ const { client, staking } = stakingRef;
+ const { modal } = staking.state;
+
+ const validatorAddress = modal?.content.validator.operatorAddress;
+
+ if (!client || !validatorAddress) return;
+
+ const addresses = {
+ delegator: stakingRef.account.bech32Address,
+ validator: validatorAddress,
+ };
+
+ claimRewardsAction(addresses, client, stakingRef.staking).finally(() => {
+ setStep("completed");
+ });
+};
+
const RewardsModal = () => {
const stakingRef = useStaking();
+ const [currentStep, setStep] = useState(initialStep);
+ const requested = useRef(false);
const { staking } = stakingRef;
const { modal } = staking.state;
const isOpen = modal?.type === "rewards";
+ useEffect(() => {
+ if (isOpen) {
+ if (requested.current) return;
+
+ requested.current = true;
+ claimRewards(stakingRef, setStep);
+ }
+ }, [isOpen, stakingRef]);
+
if (!isOpen) return null;
+ const content = (() => {
+ if (currentStep === "loading") {
+ return (
+
+
+ CLAIMING
+
+
+ Wait until your rewards are withdrawn.
+
+
+
+ );
+ }
+
+ return (
+ <>
+
+
+ Success!
+
+
+ You have claimed your staking rewards successfully.
+
+
+
+ >
+ );
+ })();
+
return (
{
+ if (currentStep === "loading") return;
+
stakingRef.staking.dispatch(setModalOpened(null));
}}
>
- Success!
- You have claimed your staking rewards successfully.
-
+ {content}
);
};
-export default RewardsModal;
+export default memo(RewardsModal);
diff --git a/src/features/staking/components/modals/staking.tsx b/src/features/staking/components/modals/staking.tsx
index 95d4af2..b6a0df1 100644
--- a/src/features/staking/components/modals/staking.tsx
+++ b/src/features/staking/components/modals/staking.tsx
@@ -25,7 +25,6 @@ import { formatToSmallDisplay } from "../../lib/formatters";
type Step = "completed" | "input" | "review";
-// @TODO
const initialStep: Step = "input";
const StakingModal = () => {
@@ -86,7 +85,7 @@ const StakingModal = () => {
<>
Staked Amount (XION)
-
{amountXION}
+
{amountXIONParsed.toString()}
{amountUSD && (
${formatToSmallDisplay(amountUSD)}
)}
diff --git a/src/features/staking/components/modals/unstaking.tsx b/src/features/staking/components/modals/unstaking.tsx
index 615b346..5db8d58 100644
--- a/src/features/staking/components/modals/unstaking.tsx
+++ b/src/features/staking/components/modals/unstaking.tsx
@@ -85,7 +85,7 @@ const UnstakingModal = () => {
>
{(() => {
- const getUnstakingInfo = () => (
+ const getUnstakingSummary = () => (
<>
Unstaking Amount (XION)
@@ -115,7 +115,7 @@ const UnstakingModal = () => {
days to complete the unstaking process
- {getUnstakingInfo()}
+ {getUnstakingSummary()}
- {getUnstakingInfo()}
+ {getUnstakingSummary()}