diff --git a/src/components/Account/AccountCreateFirst.tsx b/src/components/Account/AccountCreateFirst.tsx
index 3343f2fc..aef52760 100644
--- a/src/components/Account/AccountCreateFirst.tsx
+++ b/src/components/Account/AccountCreateFirst.tsx
@@ -1,7 +1,7 @@
import { useCallback, useEffect } from 'react'
import { useLocation, useNavigate } from 'react-router-dom'
-import AccountFundFirst from 'components/Account/AccountFund'
+import AccountFund from 'components/Account/AccountFund'
import FullOverlayContent from 'components/FullOverlayContent'
import WalletSelect from 'components/Wallet/WalletSelect'
import useToggle from 'hooks/useToggle'
@@ -17,7 +17,7 @@ export default function AccountCreateFirst() {
const [isCreating, setIsCreating] = useToggle(false)
useEffect(() => {
- if (!address) useStore.setState({ focusComponent: })
+ if (!address) useStore.setState({ focusComponent: { component: } })
}, [address])
const handleClick = useCallback(async () => {
@@ -26,7 +26,14 @@ export default function AccountCreateFirst() {
setIsCreating(false)
if (accountId) {
navigate(getRoute(getPage(pathname), address, accountId))
- useStore.setState({ focusComponent: })
+ useStore.setState({
+ focusComponent: {
+ component: ,
+ onClose: () => {
+ useStore.setState({ getStartedModal: true })
+ },
+ },
+ })
}
}, [createAccount, navigate, pathname, address, setIsCreating])
diff --git a/src/components/Account/AccountFund.tsx b/src/components/Account/AccountFund.tsx
index ff9eccf7..e2ada6cb 100644
--- a/src/components/Account/AccountFund.tsx
+++ b/src/components/Account/AccountFund.tsx
@@ -96,7 +96,7 @@ export default function AccountFund() {
useEffect(() => {
if (BN(baseBalance).isLessThan(hardcodedFee.amount[0].amount)) {
- useStore.setState({ focusComponent: })
+ useStore.setState({ focusComponent: { component: } })
}
}, [baseBalance])
diff --git a/src/components/Account/AccountList.tsx b/src/components/Account/AccountList.tsx
index 30a10b33..9312af58 100644
--- a/src/components/Account/AccountList.tsx
+++ b/src/components/Account/AccountList.tsx
@@ -2,7 +2,7 @@ import classNames from 'classnames'
import { useCallback, useEffect } from 'react'
import { useLocation, useNavigate, useParams } from 'react-router-dom'
-import AccountFundFirst from 'components/Account/AccountFund'
+import AccountFund from 'components/Account/AccountFund'
import AccountStats from 'components/Account/AccountStats'
import Button from 'components/Button'
import Card from 'components/Card'
@@ -89,7 +89,14 @@ export default function AccountList(props: Props) {
leftIcon={ }
onClick={() => {
if (positionBalance.isLessThanOrEqualTo(0)) {
- useStore.setState({ focusComponent: })
+ useStore.setState({
+ focusComponent: {
+ component: ,
+ onClose: () => {
+ useStore.setState({ getStartedModal: true })
+ },
+ },
+ })
return
}
useStore.setState({ fundAndWithdrawModal: 'fund' })
diff --git a/src/components/Account/AccountMenuContent.tsx b/src/components/Account/AccountMenuContent.tsx
index 7484a060..3fcda45d 100644
--- a/src/components/Account/AccountMenuContent.tsx
+++ b/src/components/Account/AccountMenuContent.tsx
@@ -3,7 +3,7 @@ import { useCallback, useEffect } from 'react'
import { useLocation, useNavigate, useParams } from 'react-router-dom'
import AccountCreateFirst from 'components/Account/AccountCreateFirst'
-import AccountFundFirst from 'components/Account/AccountFund'
+import AccountFund from 'components/Account/AccountFund'
import AccountList from 'components/Account/AccountList'
import Button from 'components/Button'
import { CircularProgress } from 'components/CircularProgress'
@@ -57,18 +57,25 @@ export default function AccountMenuContent(props: Props) {
if (accountId) {
navigate(getRoute(getPage(pathname), address, accountId))
- useStore.setState({ focusComponent: })
+ useStore.setState({
+ focusComponent: {
+ component: ,
+ onClose: () => {
+ useStore.setState({ getStartedModal: true })
+ },
+ },
+ })
}
}, [createAccount, navigate, pathname, address, setShowMenu, setIsCreating])
const handleCreateAccountClick = useCallback(() => {
setShowMenu(!showMenu)
if (!checkHasFunds() && !hasCreditAccounts) {
- useStore.setState({ focusComponent: })
+ useStore.setState({ focusComponent: { component: } })
return
}
if (!hasCreditAccounts) {
- useStore.setState({ focusComponent: })
+ useStore.setState({ focusComponent: { component: } })
return
}
}, [checkHasFunds, hasCreditAccounts, setShowMenu, showMenu])
@@ -127,7 +134,7 @@ export default function AccountMenuContent(props: Props) {
)}
>
{isAccountSelected && isLoadingAccount && (
-
+
)}
diff --git a/src/components/Button/ActionButton.tsx b/src/components/Button/ActionButton.tsx
index f7860fe3..34a63e3d 100644
--- a/src/components/Button/ActionButton.tsx
+++ b/src/components/Button/ActionButton.tsx
@@ -16,7 +16,7 @@ export default function ActionButton(props: ButtonProps) {
const { accountId } = useParams()
const handleCreateAccountClick = useCallback(() => {
- useStore.setState({ focusComponent:
})
+ useStore.setState({ focusComponent: { component:
} })
}, [])
if (!address) return
diff --git a/src/components/DocsLink.tsx b/src/components/DocsLink.tsx
index 417be4d5..46e20b62 100644
--- a/src/components/DocsLink.tsx
+++ b/src/components/DocsLink.tsx
@@ -1,34 +1,17 @@
import { ExternalLink } from 'components/Icons'
import Text from 'components/Text'
+import { TextLink } from 'components/TextLink'
+import { DocURL } from 'types/enums/docURL'
interface Props {
type: DocLinkType
}
function getData(type: string) {
- if (type === 'account')
- return [
- 'Why mint your account?',
- 'Learn more',
- 'https://docs.marsprotocol.io/docs/learn/workstation/rover/rover-intro',
- ]
- if (type === 'fund')
- return [
- 'Why fund your account?',
- 'Learn more',
- 'https://docs.marsprotocol.io/docs/learn/workstation/rover/managing-credit-accounts',
- ]
- if (type === 'wallet')
- return [
- 'New with wallets?',
- 'Learn more',
- 'https://docs.marsprotocol.io/docs/learn/workstation/basics/basics-intro',
- ]
- return [
- 'By continuing you accept our',
- 'terms of service',
- 'https://docs.marsprotocol.io/docs/overview/legal/terms-of-service',
- ]
+ if (type === 'account') return ['Why mint your account?', 'Learn more', DocURL.ROVER_INTRO_URL]
+ if (type === 'fund') return ['Why fund your account?', 'Learn more', DocURL.MANAGE_ACCOUNT_URL]
+ if (type === 'wallet') return ['New with wallets?', 'Learn more', DocURL.WALLET_INTRO_URL]
+ return ['By continuing you accept our', 'terms of service', DocURL.TERMS_OF_SERVICE_URL]
}
export default function DocsLink(props: Props) {
@@ -37,10 +20,15 @@ export default function DocsLink(props: Props) {
return (
{`${intro} `}
-
+
{linkText}
-
+
)
}
diff --git a/src/components/Header/DesktopHeader.tsx b/src/components/Header/DesktopHeader.tsx
index b337ae98..9fc57711 100644
--- a/src/components/Header/DesktopHeader.tsx
+++ b/src/components/Header/DesktopHeader.tsx
@@ -20,6 +20,7 @@ export default function DesktopHeader() {
const focusComponent = useStore((s) => s.focusComponent)
function handleCloseFocusMode() {
+ if (focusComponent.onClose) focusComponent.onClose()
useStore.setState({ focusComponent: null })
}
@@ -39,7 +40,7 @@ export default function DesktopHeader() {
>
{focusComponent ? (
-
+
{address &&
}
diff --git a/src/components/Icons/Compass.svg b/src/components/Icons/Compass.svg
new file mode 100644
index 00000000..ba5cb13b
--- /dev/null
+++ b/src/components/Icons/Compass.svg
@@ -0,0 +1,8 @@
+
+
+
diff --git a/src/components/Icons/Flag.svg b/src/components/Icons/Flag.svg
new file mode 100644
index 00000000..589282a9
--- /dev/null
+++ b/src/components/Icons/Flag.svg
@@ -0,0 +1,8 @@
+
+
+
diff --git a/src/components/Icons/HandCoins.svg b/src/components/Icons/HandCoins.svg
new file mode 100644
index 00000000..0ca60bb6
--- /dev/null
+++ b/src/components/Icons/HandCoins.svg
@@ -0,0 +1,8 @@
+
+
+
diff --git a/src/components/Icons/Luggage.svg b/src/components/Icons/Luggage.svg
new file mode 100644
index 00000000..05a24f89
--- /dev/null
+++ b/src/components/Icons/Luggage.svg
@@ -0,0 +1,8 @@
+
+
+
diff --git a/src/components/Icons/index.ts b/src/components/Icons/index.ts
index 735a9164..9989a95e 100644
--- a/src/components/Icons/index.ts
+++ b/src/components/Icons/index.ts
@@ -13,6 +13,7 @@ export { default as ChevronDown } from 'components/Icons/ChevronDown.svg'
export { default as ChevronLeft } from 'components/Icons/ChevronLeft.svg'
export { default as ChevronRight } from 'components/Icons/ChevronRight.svg'
export { default as ChevronUp } from 'components/Icons/ChevronUp.svg'
+export { default as Compass } from 'components/Icons/Compass.svg'
export { default as Copy } from 'components/Icons/Copy.svg'
export { default as Cross } from 'components/Icons/Cross.svg'
export { default as CrossCircled } from 'components/Icons/CrossCircled.svg'
@@ -20,11 +21,15 @@ export { default as Enter } from 'components/Icons/Enter.svg'
export { default as ExclamationMarkCircled } from 'components/Icons/ExclamationMarkCircled.svg'
export { default as ExclamationMarkTriangle } from 'components/Icons/ExclamationMarkTriangle.svg'
export { default as ExternalLink } from 'components/Icons/ExternalLink.svg'
+export { default as Flag } from 'components/Icons/Flag.svg'
export { default as Gear } from 'components/Icons/Gear.svg'
+export { default as HandCoins } from 'components/Icons/HandCoins.svg'
export { default as Heart } from 'components/Icons/Heart.svg'
+export { default as InfoCircle } from 'components/Icons/InfoCircle.svg'
export { default as LockLocked } from 'components/Icons/LockLocked.svg'
export { default as LockUnlocked } from 'components/Icons/LockUnlocked.svg'
export { default as Logo } from 'components/Icons/Logo.svg'
+export { default as Luggage } from 'components/Icons/Luggage.svg'
export { default as MarsProtocol } from 'components/Icons/MarsProtocol.svg'
export { default as Osmo } from 'components/Icons/Osmo.svg'
export { default as OverlayMark } from 'components/Icons/OverlayMark.svg'
@@ -44,5 +49,4 @@ export { default as SwapIcon } from 'components/Icons/SwapIcon.svg'
export { default as TrashBin } from 'components/Icons/TrashBin.svg'
export { default as VerticalThreeLine } from 'components/Icons/VerticalThreeLine.svg'
export { default as Wallet } from 'components/Icons/Wallet.svg'
-export { default as InfoCircle } from 'components/Icons/InfoCircle.svg'
// @endindex
diff --git a/src/components/Modals/FundWithdraw/FundAccount.tsx b/src/components/Modals/FundWithdraw/FundAccount.tsx
index 7d482bea..e2bfcfdf 100644
--- a/src/components/Modals/FundWithdraw/FundAccount.tsx
+++ b/src/components/Modals/FundWithdraw/FundAccount.tsx
@@ -95,7 +95,7 @@ export default function FundAccount(props: Props) {
useEffect(() => {
if (BN(baseBalance).isLessThan(hardcodedFee.amount[0].amount)) {
- useStore.setState({ focusComponent:
})
+ useStore.setState({ focusComponent: { component:
} })
}
}, [baseBalance])
diff --git a/src/components/Modals/GetStartedModal.tsx b/src/components/Modals/GetStartedModal.tsx
new file mode 100644
index 00000000..0d5311de
--- /dev/null
+++ b/src/components/Modals/GetStartedModal.tsx
@@ -0,0 +1,93 @@
+import { useCallback } from 'react'
+
+import { ChevronRight, Compass, Flag, HandCoins, Luggage } from 'components/Icons'
+import Modal from 'components/Modal'
+import Text from 'components/Text'
+import useStore from 'store'
+import { DocURL } from 'types/enums/docURL'
+
+interface TutorialItemProps {
+ title: string
+ description: string
+ link: string
+ icon: React.ReactNode
+}
+
+function TutorialItem(props: TutorialItemProps) {
+ return (
+
+
+ {props.icon}
+
+
+
+ {props.title}
+
+
+ {props.description}
+
+
+
+
+
+
+ )
+}
+
+export default function GetStartedModal() {
+ const modal = useStore((s) => s.getStartedModal)
+ const onClose = useCallback(() => {
+ useStore.setState({ getStartedModal: false })
+ }, [])
+
+ if (!modal) return null
+
+ return (
+
Get Started}
+ className='relative'
+ headerClassName='gradient-header p-4 border-b-white/5 border-b'
+ contentClassName='flex flex-col p-3 pb-8'
+ >
+
+ Tutorials
+
+ }
+ />
+ }
+ />
+ }
+ />
+ }
+ />
+
+ You can access this modal via the settings if you decide to close it.
+
+
+ )
+}
diff --git a/src/components/Modals/ModalsContainer.tsx b/src/components/Modals/ModalsContainer.tsx
index 0c95024c..8cea4036 100644
--- a/src/components/Modals/ModalsContainer.tsx
+++ b/src/components/Modals/ModalsContainer.tsx
@@ -4,6 +4,7 @@ import {
AlertDialogController,
BorrowModal,
FundAndWithdrawModal,
+ GetStartedModal,
LendAndReclaimModalController,
SettingsModal,
UnlockModal,
@@ -19,6 +20,7 @@ export default function ModalsContainer() {
+
diff --git a/src/components/Modals/Settings/SettingsOptions.tsx b/src/components/Modals/Settings/SettingsOptions.tsx
index 0b71064d..1a22bbfb 100644
--- a/src/components/Modals/Settings/SettingsOptions.tsx
+++ b/src/components/Modals/Settings/SettingsOptions.tsx
@@ -5,7 +5,7 @@ import Text from 'components/Text'
interface Props {
label: string
- decsription: string
+ description: string
className?: string
children: ReactNode | ReactNode[]
}
@@ -23,7 +23,7 @@ export default function SettingsOptions(props: Props) {
{props.label}
- {props.decsription}
+ {props.description}
{props.children}
diff --git a/src/components/Modals/Settings/SettingsSwitch.tsx b/src/components/Modals/Settings/SettingsSwitch.tsx
index 5bf00ecf..394bab9f 100644
--- a/src/components/Modals/Settings/SettingsSwitch.tsx
+++ b/src/components/Modals/Settings/SettingsSwitch.tsx
@@ -8,7 +8,7 @@ interface Props {
name: string
value: boolean
label: string
- decsription: string
+ description: string | React.ReactNode
className?: string
withStatus?: boolean
}
@@ -21,18 +21,22 @@ export default function SettingsSwitch(props: Props) {
props.className,
)}
>
-
-
+
+
{props.label}
-
- {props.decsription}
-
+ {typeof props.description === 'string' ? (
+
+ {props.description}
+
+ ) : (
+ <>{props.description}>
+ )}
-
+
{props.withStatus && (
-
+
{props.value ? 'ON' : 'OFF'}
)}
diff --git a/src/components/Modals/Settings/index.tsx b/src/components/Modals/Settings/index.tsx
index a0934621..c42658ae 100644
--- a/src/components/Modals/Settings/index.tsx
+++ b/src/components/Modals/Settings/index.tsx
@@ -10,6 +10,7 @@ import SettingsSwitch from 'components/Modals/Settings/SettingsSwitch'
import NumberInput from 'components/NumberInput'
import Select from 'components/Select'
import Text from 'components/Text'
+import { TextLink } from 'components/TextLink'
import { DEFAULT_SETTINGS } from 'constants/defaultSettings'
import {
DISPLAY_CURRENCY_KEY,
@@ -17,6 +18,7 @@ import {
PREFERRED_ASSET_KEY,
REDUCE_MOTION_KEY,
SLIPPAGE_KEY,
+ TUTORIAL_KEY,
} from 'constants/localStore'
import { BN_ZERO } from 'constants/math'
import useAlertDialog from 'hooks/useAlertDialog'
@@ -47,6 +49,7 @@ export default function SettingsModal() {
REDUCE_MOTION_KEY,
DEFAULT_SETTINGS.reduceMotion,
)
+ const [tutorial, setTutorial] = useLocalStorage(TUTORIAL_KEY, DEFAULT_SETTINGS.tutorial)
const [lendAssets, setLendAssets] = useLocalStorage(
LEND_ASSETS_KEY,
DEFAULT_SETTINGS.lendAssets,
@@ -59,7 +62,7 @@ export default function SettingsModal() {
label: (
{asset.denom === 'usd' ? (
-
+
{asset.symbol}
) : (
@@ -105,6 +108,13 @@ export default function SettingsModal() {
[setLendAssets],
)
+ const handleTutorial = useCallback(
+ (value: boolean) => {
+ setTutorial(value)
+ },
+ [setTutorial],
+ )
+
const handlePreferredAsset = useCallback(
(value: string) => {
setPreferredAsset(value)
@@ -177,7 +187,7 @@ export default function SettingsModal() {
const showResetModal = useCallback(() => {
showResetDialog({
icon: (
-
+
),
@@ -219,7 +229,7 @@ export default function SettingsModal() {
name='lendAssets'
value={lendAssets}
label='Lend assets in credit account'
- decsription='By turning this on you will automatically lend out all the assets you deposit into your credit account to earn yield.'
+ description='By turning this on you will automatically lend out all the assets you deposit into your credit account to earn yield.'
withStatus
/>
+
+ Show tutorial elements in the UI. Like the{' '}
+ {
+ useStore.setState({ settingsModal: false, getStartedModal: true })
+ }}
+ >
+ Get Started Modal.
+
+
+ }
+ withStatus
+ />
@@ -242,7 +275,7 @@ export default function SettingsModal() {
options={preferredAssetsOptions}
defaultValue={preferredAsset}
onChange={handlePreferredAsset}
- className='relative w-60 rounded-base border border-white/10'
+ className='relative border w-60 rounded-base border-white/10'
containerClassName='justify-end mb-4'
/>
{slippages.map((value) => (
@@ -298,7 +331,7 @@ export default function SettingsModal() {
%
-
+
+
{benefits.map((benefit, index) => (
-
+
{
setHasAgreedToTerms(true)
- useStore.setState({ focusComponent:
})
+ useStore.setState({ focusComponent: { component:
} })
}, [setHasAgreedToTerms])
return (
diff --git a/src/components/TextLink.tsx b/src/components/TextLink.tsx
index 715e5c99..736d3a15 100644
--- a/src/components/TextLink.tsx
+++ b/src/components/TextLink.tsx
@@ -6,9 +6,10 @@ interface Props extends React.HTMLProps
{
className?: string
color?: 'primary' | 'secondary' | 'tertiary' | 'quaternary'
externalLink?: boolean
- textSize?: 'small' | 'medium' | 'large'
+ textSize?: 'extraSmall' | 'small' | 'medium' | 'large'
text?: string | ReactNode
uppercase?: boolean
+ onClick?: () => void
}
const colorClasses = {
@@ -19,6 +20,7 @@ const colorClasses = {
quaternary: 'hover:text-white active:text-white',
}
const textSizeClasses = {
+ extraSmall: 'text-xs',
small: 'text-sm',
medium: 'text-base',
large: 'text-lg',
@@ -56,7 +58,7 @@ export const TextLink = React.forwardRef(function TextLink(
? (e) => {
e.preventDefault()
if (disabled) return
- onClick
+ onClick()
}
: undefined
}
diff --git a/src/components/Wallet/WalletBridges.tsx b/src/components/Wallet/WalletBridges.tsx
index 36b4ab5e..6308bf5b 100644
--- a/src/components/Wallet/WalletBridges.tsx
+++ b/src/components/Wallet/WalletBridges.tsx
@@ -33,8 +33,8 @@ function Bridge({ name, url, image }: Bridge) {
}}
>
- {name}
-
+ {name}
+
)
}
@@ -55,12 +55,12 @@ export default function WalletBridges() {
const handleClick = useCallback(() => {
if (!currentWallet) return
disconnectWallet(currentWallet)
- useStore.setState({ focusComponent: })
+ useStore.setState({ focusComponent: { component: } })
}, [currentWallet, disconnectWallet])
useEffect(() => {
if (hasFunds) {
- useStore.setState({ focusComponent: })
+ useStore.setState({ focusComponent: { component: } })
return
}
@@ -82,13 +82,13 @@ export default function WalletBridges() {
}}
docs='wallet'
>
-
+
{BRIDGES.map((bridge) => (
))}
{IS_TESTNET && (
-
+
Need Testnet Funds?
diff --git a/src/components/Wallet/WalletConnectButton.tsx b/src/components/Wallet/WalletConnectButton.tsx
index bd4a0007..5e3051be 100644
--- a/src/components/Wallet/WalletConnectButton.tsx
+++ b/src/components/Wallet/WalletConnectButton.tsx
@@ -21,8 +21,8 @@ export default function WalletConnectButton(props: Props) {
const [hasAgreedToTerms] = useLocalStorage(TERMS_OF_SERVICE_KEY, false)
const handleClick = useCallback(() => {
- const focusedComponent = hasAgreedToTerms ?
:
- useStore.setState({ focusComponent: focusedComponent })
+ const component = hasAgreedToTerms ?
:
+ useStore.setState({ focusComponent: { component } })
}, [hasAgreedToTerms])
return (
diff --git a/src/components/Wallet/WalletConnecting.tsx b/src/components/Wallet/WalletConnecting.tsx
index c39a3dd4..74abecf3 100644
--- a/src/components/Wallet/WalletConnecting.tsx
+++ b/src/components/Wallet/WalletConnecting.tsx
@@ -58,7 +58,7 @@ export default function WalletConnecting(props: Props) {
useStore.setState({
client: walletClient,
address: response.account.address,
- focusComponent:
,
+ focusComponent: { component:
},
})
} catch (error) {
if (error instanceof Error) {
@@ -67,14 +67,16 @@ export default function WalletConnecting(props: Props) {
client: undefined,
address: undefined,
accounts: null,
- focusComponent: (
-
- ),
+ focusComponent: {
+ component: (
+
+ ),
+ },
})
}
}
diff --git a/src/components/Wallet/WalletSelect.tsx b/src/components/Wallet/WalletSelect.tsx
index 96234fb1..a037c9c5 100644
--- a/src/components/Wallet/WalletSelect.tsx
+++ b/src/components/Wallet/WalletSelect.tsx
@@ -47,8 +47,8 @@ function WalletOption(props: WalletOptionProps) {
src={props.imageSrc}
alt={props.name}
/>
-
{props.name}
-
+
{props.name}
+
)
}
@@ -61,7 +61,7 @@ export default function WalletSelect(props: Props) {
const handleConnectClick = (extensionProviderId: string) => {
useStore.setState({
- focusComponent:
,
+ focusComponent: { component:
},
})
}
@@ -117,7 +117,7 @@ export default function WalletSelect(props: Props) {
text: 'Back',
}}
>
-
+
@@ -129,7 +129,7 @@ export default function WalletSelect(props: Props) {
copy={`Deposit assets from your ${currentChain.name} address to your Mars credit account.`}
docs='wallet'
>
-
+
{!isMobile() && (
<>
{sortedExtensionProviders.map((provider) => {
diff --git a/src/components/Wallet/index.tsx b/src/components/Wallet/index.tsx
index 36122928..590069eb 100644
--- a/src/components/Wallet/index.tsx
+++ b/src/components/Wallet/index.tsx
@@ -27,7 +27,7 @@ export default function Wallet() {
useStore.setState({ address: currentWallet.account.address })
return
}
- useStore.setState({ focusComponent:
})
+ useStore.setState({ focusComponent: { component:
} })
}, [currentWallet, client, address])
// Redirect when switching wallets or on first connection
diff --git a/src/constants/defaultSettings.ts b/src/constants/defaultSettings.ts
index ca62b5ac..45a330ba 100644
--- a/src/constants/defaultSettings.ts
+++ b/src/constants/defaultSettings.ts
@@ -7,4 +7,5 @@ export const DEFAULT_SETTINGS: Settings = {
preferredAsset: ASSETS[0].denom,
displayCurrency: ORACLE_DENOM,
slippage: 0.02,
+ tutorial: true,
}
diff --git a/src/constants/localStore.ts b/src/constants/localStore.ts
index f27094cd..2e80bb29 100644
--- a/src/constants/localStore.ts
+++ b/src/constants/localStore.ts
@@ -6,3 +6,4 @@ export const LEND_ASSETS_KEY = 'lendAssets'
export const AUTO_LEND_ENABLED_ACCOUNT_IDS_KEY = 'autoLendEnabledAccountIds'
export const SLIPPAGE_KEY = 'slippage'
export const TERMS_OF_SERVICE_KEY = 'termsOfService'
+export const TUTORIAL_KEY = 'tutorial'
diff --git a/src/pages/_layout.tsx b/src/pages/_layout.tsx
index deea045e..1c53a9c8 100644
--- a/src/pages/_layout.tsx
+++ b/src/pages/_layout.tsx
@@ -33,7 +33,7 @@ export default function Layout({ children }: { children: React.ReactNode }) {
{focusComponent ? (
- {focusComponent}
+ {focusComponent.component}
) : (
children
diff --git a/src/store/slices/modal.ts b/src/store/slices/modal.ts
index 8c9d3ba4..f5cefa43 100644
--- a/src/store/slices/modal.ts
+++ b/src/store/slices/modal.ts
@@ -9,6 +9,7 @@ export default function createModalSlice(set: SetState
, get: GetStat
createAccountModal: false,
fundAccountModal: false,
fundAndWithdrawModal: null,
+ getStartedModal: false,
lendAndReclaimModal: null,
resetStettingsModal: false,
settingsModal: false,
diff --git a/src/types/enums/docURL.ts b/src/types/enums/docURL.ts
index c900a7ad..100bd431 100644
--- a/src/types/enums/docURL.ts
+++ b/src/types/enums/docURL.ts
@@ -1,4 +1,12 @@
export enum DocURL {
+ ADVANCED_TRADING_URL = 'https://docs.marsprotocol.io',
+ BORROW_LENDING_URL = 'https://docs.marsprotocol.io',
COOKIE_POLICY_URL = 'https://docs.marsprotocol.io/mars-protocol/terms-of-service/mars-cookie-policy',
+ CONCENTRATED_LIQUIDITY_URL = 'https://docs.marsprotocol.io',
+ MANAGE_ACCOUNT_URL = 'https://docs.marsprotocol.io/docs/learn/workstation/rover/managing-credit-accounts',
+ ROVER_INTRO_URL = 'https://docs.marsprotocol.io/docs/learn/workstation/rover/rover-intro',
PRIVACY_POLICY_URL = 'https://docs.marsprotocol.io/mars-protocol/terms-of-service/mars-privacy-policy',
+ TERMS_OF_SERVICE_URL = 'https://docs.marsprotocol.io/docs/overview/legal/terms-of-service',
+ TRADING_INTRO_URL = 'https://docs.marsprotocol.io',
+ WALLET_INTRO_URL = 'https://docs.marsprotocol.io/docs/learn/workstation/basics/basics-intro',
}
diff --git a/src/types/interfaces/store/common.d.ts b/src/types/interfaces/store/common.d.ts
index 71de6fa9..937e7ad1 100644
--- a/src/types/interfaces/store/common.d.ts
+++ b/src/types/interfaces/store/common.d.ts
@@ -7,3 +7,8 @@ interface CommonSlice {
selectedAccount: string | null
focusComponent: ReactNode
}
+
+interface FocusComponent {
+ component: ReactNode
+ onClose?: () => void
+}
diff --git a/src/types/interfaces/store/modals.d.ts b/src/types/interfaces/store/modals.d.ts
index d2b23a71..a7febb09 100644
--- a/src/types/interfaces/store/modals.d.ts
+++ b/src/types/interfaces/store/modals.d.ts
@@ -6,6 +6,7 @@ interface ModalSlice {
createAccountModal: boolean
fundAccountModal: boolean
fundAndWithdrawModal: 'fund' | 'withdraw' | null
+ getStartedModal: boolean
lendAndReclaimModal: LendAndReclaimModalConfig | null
settingsModal: boolean
unlockModal: UnlockModal | null
diff --git a/src/types/interfaces/store/settings.d.ts b/src/types/interfaces/store/settings.d.ts
index 6027770d..d66eb403 100644
--- a/src/types/interfaces/store/settings.d.ts
+++ b/src/types/interfaces/store/settings.d.ts
@@ -4,4 +4,5 @@ interface Settings {
preferredAsset: string
lendAssets: boolean
slippage: number
+ tutorial: boolean
}