diff --git a/package.json b/package.json index ae1e23ad..0981d55a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,7 @@ { "name": "mars-v2-frontend", "version": "2.2.4", + "v1version": "1.7.5", "homepage": "./", "private": false, "license": "SEE LICENSE IN LICENSE FILE", diff --git a/public/images/bg-v1.svg b/public/images/bg-v1.svg new file mode 100644 index 00000000..c15fa8f9 --- /dev/null +++ b/public/images/bg-v1.svg @@ -0,0 +1,63 @@ + + + + + + + + + diff --git a/src/components/Wallet/WalletFetchBalancesAndAccounts.tsx b/src/components/Wallet/WalletFetchBalancesAndAccounts.tsx index 162a60f8..63876f95 100644 --- a/src/components/Wallet/WalletFetchBalancesAndAccounts.tsx +++ b/src/components/Wallet/WalletFetchBalancesAndAccounts.tsx @@ -29,7 +29,7 @@ function FetchLoading() { function Content() { const address = useStore((s) => s.address) const [searchParams] = useSearchParams() - + const isV1 = useStore((s) => s.isV1) const { address: urlAddress } = useParams() const urlAccountId = useAccountId() const navigate = useNavigate() @@ -62,7 +62,7 @@ function Content() { ) { const currentAccountIsHLS = urlAccountId && !accountIds.includes(urlAccountId) const currentAccount = currentAccountIsHLS || !urlAccountId ? accountIds[0] : urlAccountId - navigate(getRoute(page, searchParams, address, currentAccount)) + navigate(getRoute(page, searchParams, address, isV1 ? undefined : currentAccount)) useStore.setState({ balances: walletBalances, focusComponent: null }) } }, [ @@ -79,7 +79,7 @@ function Content() { if (isLoadingAccounts || isLoadingBalances) return if (BN(baseBalance).isLessThan(defaultFee.amount[0].amount)) return - if (accountIds && accountIds.length === 0) return + if (accountIds && accountIds.length === 0 && !isV1) return return null } diff --git a/src/components/common/Background.tsx b/src/components/common/Background.tsx index 3bdca489..2feb7339 100644 --- a/src/components/common/Background.tsx +++ b/src/components/common/Background.tsx @@ -27,7 +27,7 @@ export default function Background() { return ['bg-orb-primary-hls', 'bg-orb-secondary-hls', 'bg-orb-tertiary-hls', 'bg-body-hls'] } if (isV1) { - return ['bg-orb-primary-v1', 'bg-orb-secondary-v1', 'bg-orb-tertiary-v1', 'bg-body-v1'] + return ['bg-transparent', 'bg-transparent', 'bg-transparent', 'bg-body bg-v1 blur-[2px]'] } return ['bg-orb-primary', 'bg-orb-secondary', 'bg-orb-tertiary', 'bg-body'] @@ -38,7 +38,7 @@ export default function Background() { className={classNames( 'fixed inset-0', 'w-full h-full', - 'overflow-hidden pointer-events-none background ', + 'overflow-hidden pointer-events-none background', bodyClassName, !reduceMotion && 'transition-bg duration-1000 delay-300', )} diff --git a/src/components/common/Button/ActionButton.tsx b/src/components/common/Button/ActionButton.tsx index 7cf580df..0c5e9b46 100644 --- a/src/components/common/Button/ActionButton.tsx +++ b/src/components/common/Button/ActionButton.tsx @@ -13,6 +13,7 @@ export default function ActionButton(props: ButtonProps) { const { className, color, variant, size } = props const defaultProps = { className, color, variant, size } const address = useStore((s) => s.address) + const isV1 = useStore((s) => s.isV1) const { data: accountIds } = useAccountIds(address || '') const selectedAccountId = useAccountId() @@ -34,7 +35,7 @@ export default function ActionButton(props: ButtonProps) { ) } - if (!selectedAccountId) { + if (!selectedAccountId && !isV1) { return (