Account Value
diff --git a/components/shared/ContentBox.tsx b/components/shared/ContentBox.tsx
index 99d32540..42edd500 100644
--- a/components/shared/ContentBox.tsx
+++ b/components/shared/ContentBox.tsx
@@ -1,12 +1,23 @@
type ContentBoxProps = {
children: React.ReactNode
className?: string
+ showBackground?: boolean
+ hideBorder?: boolean
+ hidePadding?: boolean
}
-const ContentBox = ({ children, className = '' }: ContentBoxProps) => {
+const ContentBox = ({
+ children,
+ className = '',
+ showBackground = false,
+ hideBorder = false,
+ hidePadding = false,
+}: ContentBoxProps) => {
return (
{children}
diff --git a/components/swap/Swap.tsx b/components/swap/Swap.tsx
index e0d606c5..aa5f0658 100644
--- a/components/swap/Swap.tsx
+++ b/components/swap/Swap.tsx
@@ -97,7 +97,7 @@ const Swap = () => {
}
return (
-
+
diff --git a/components/swap/SwapTokenChart.tsx b/components/swap/SwapTokenChart.tsx
index fe56f146..4a31c93e 100644
--- a/components/swap/SwapTokenChart.tsx
+++ b/components/swap/SwapTokenChart.tsx
@@ -142,19 +142,21 @@ const SwapTokenChart: FunctionComponent
= ({
: 0
return (
-
+
{chartData.length && baseTokenId && quoteTokenId ? (
{inputTokenInfo && outputTokenInfo ? (
-
- {`${outputTokenInfo?.symbol?.toUpperCase()}/${inputTokenInfo?.symbol?.toUpperCase()}`}
+
+ {['usd-coin', 'tether'].includes(inputTokenId || '')
+ ? `${outputTokenInfo?.symbol?.toUpperCase()}/${inputTokenInfo?.symbol?.toUpperCase()}`
+ : `${inputTokenInfo?.symbol?.toUpperCase()}/${outputTokenInfo?.symbol?.toUpperCase()}`}
) : null}
{mouseData ? (
<>
-
+
{numberFormatter.format(mouseData['price'])}
= ({
>
) : (
<>
-
+
{numberFormatter.format(
chartData[chartData.length - 1]['price']
)}
@@ -231,12 +233,18 @@ const SwapTokenChart: FunctionComponent
= ({
}}
content={<>>}
/>
- {/*
-
-
-
-
- */}
+
+
+
+
+
+
(
const set = get().set
const client = get().client
const mangoAccount = get().mangoAccount
+ const group = get().group
- if (!mangoAccount) return
+ if (!mangoAccount || !group) return
try {
const newMangoAccount = await client.getMangoAccount(mangoAccount)
+ await newMangoAccount.reloadAccountData(client, group)
set((state) => {
state.mangoAccount = newMangoAccount