Compare commits

...
Author SHA1 Message Date
Linkie Link fc9fcf13fc fix: fixed lending table widths 2024-02-16 17:15:59 +01:00
Linkie Link 5846e893d1 Merge branch 'main' of https://github.com/mars-protocol/mars-v2-frontend into develop 2024-02-16 09:07:22 +01:00
Linkie Link 40224ad201 feat: list DYDX (#815) 2024-02-16 08:58:12 +01:00
Linkie LinkandBob van der Helm 0e6f0edb5d Docker update (#814)
* feat: handle URLs with or without trailing slash (#803)

* feat: handle URLs with or without trailing slash

* tidy: cleanup slashes

* Fix docker build (#805)

* fix: fixed the docker build

* tidy: cleanup

* env: remove env contents (#808)

* Portfolio fix (#809)

* fix: fixed the portfolio account detail page layout

* fix: fixed portfolio cards

* tidy: refactor

* align buttons, perps row clickable (#807)

* align buttons, perps row clickable

* fix comments

* update to v2.2.4

* fix borrowbutton logic, add vault deposit manage btn, fix icon size vault modal

---------

Co-authored-by: Linkie Link <linkielink.dev@gmail.com>

* Update .env.production

* Update Dockerbuild (#813)

* v2.2.4 (#810)

* feat: handle URLs with or without trailing slash (#803)

* feat: handle URLs with or without trailing slash

* tidy: cleanup slashes

* Fix docker build (#805)

* fix: fixed the docker build

* tidy: cleanup

* env: remove env contents (#808)

* Portfolio fix (#809)

* fix: fixed the portfolio account detail page layout

* fix: fixed portfolio cards

* tidy: refactor

* align buttons, perps row clickable (#807)

* align buttons, perps row clickable

* fix comments

* update to v2.2.4

* fix borrowbutton logic, add vault deposit manage btn, fix icon size vault modal

---------

Co-authored-by: Linkie Link <linkielink.dev@gmail.com>

---------

Co-authored-by: Bob van der Helm <34470358+bobthebuidlr@users.noreply.github.com>

* Update Dockerfile

* remove   .env files

* tidy: format

---------

Co-authored-by: Bob van der Helm <34470358+bobthebuidlr@users.noreply.github.com>

---------

Co-authored-by: Bob van der Helm <34470358+bobthebuidlr@users.noreply.github.com>
2024-02-15 10:49:14 +01:00
Linkie Link e3b5e330ee Merge branch 'main' of https://github.com/mars-protocol/mars-v2-frontend into develop
# Conflicts:
#	.env
#	src/components/perps/BalancesTable/index.tsx
2024-02-14 19:30:55 +01:00
Linkie LinkandBob van der Helm 7eac8e7a35 Update Dockerbuild (#813)
* v2.2.4 (#810)

* feat: handle URLs with or without trailing slash (#803)

* feat: handle URLs with or without trailing slash

* tidy: cleanup slashes

* Fix docker build (#805)

* fix: fixed the docker build

* tidy: cleanup

* env: remove env contents (#808)

* Portfolio fix (#809)

* fix: fixed the portfolio account detail page layout

* fix: fixed portfolio cards

* tidy: refactor

* align buttons, perps row clickable (#807)

* align buttons, perps row clickable

* fix comments

* update to v2.2.4

* fix borrowbutton logic, add vault deposit manage btn, fix icon size vault modal

---------

Co-authored-by: Linkie Link <linkielink.dev@gmail.com>

---------

Co-authored-by: Bob van der Helm <34470358+bobthebuidlr@users.noreply.github.com>

* Update Dockerfile

* remove   .env files

* tidy: format

---------

Co-authored-by: Bob van der Helm <34470358+bobthebuidlr@users.noreply.github.com>
2024-02-14 19:29:41 +01:00
Linkie Link af478c56d5 Update .env.production 2024-02-14 16:43:57 +01:00
Bob van der HelmandLinkie Link a6f4c24f15 align buttons, perps row clickable (#807)
* align buttons, perps row clickable

* fix comments

* update to v2.2.4

* fix borrowbutton logic, add vault deposit manage btn, fix icon size vault modal

---------

Co-authored-by: Linkie Link <linkielink.dev@gmail.com>
2024-02-14 14:49:15 +01:00
Linkie Link 6946ceddfc Portfolio fix (#809)
* fix: fixed the portfolio account detail page layout

* fix: fixed portfolio cards

* tidy: refactor
2024-02-14 14:18:10 +01:00
Linkie Link 0154065ffb env: remove env contents (#808) 2024-02-14 12:33:10 +01:00
Linkie Link 4f64234a75 Merge branch 'main' into develop 2024-02-14 12:01:10 +01:00
Linkie Link 26f1ef4a2c Fix docker build (#805)
* fix: fixed the docker build

* tidy: cleanup
2024-02-14 11:58:48 +01:00
Linkie Link 3f28ccd09c feat: handle URLs with or without trailing slash (#803)
* feat: handle URLs with or without trailing slash

* tidy: cleanup slashes
2024-02-14 09:26:10 +01:00
13 changed files with 99 additions and 38 deletions
View File
-13
View File
@@ -1,13 +0,0 @@
# DO NOT EDIT THIS FILE WHEN USING DOCKER
# These values are used to replace the values in the built app,
# you should pass environment variables as defined in README.md
# CONFIG #
NEXT_PUBLIC_NETWORK=mainnet
# OSMOSIS-1 #
NEXT_PUBLIC_OSMOSIS_RPC=APP_NEXT_OSMOSIS_RPC
NEXT_PUBLIC_OSMOSIS_REST=APP_NEXT_OSMOSIS_REST
# WALLET CONNECT #
NEXT_PUBLIC_WALLET_CONNECT_ID=APP_NEXT_WALLET_CONNECT_ID
+8 -2
View File
@@ -6,18 +6,24 @@ RUN yarn install
COPY . .
RUN apk --update add patch
RUN patch next.config.js next-config.patch
ENV NEXT_PUBLIC_NETWORK=mainnet
ENV NEXT_PUBLIC_OSMOSIS_RPC=APP_NEXT_OSMOSIS_RPC
ENV NEXT_PUBLIC_OSMOSIS_REST=APP_NEXT_OSMOSIS_REST
ENV NEXT_PUBLIC_WALLET_CONNECT_ID=APP_NEXT_WALLET_CONNECT_ID
ENV NODE_ENV=production
RUN yarn build
FROM node:20-alpine as runner
WORKDIR /app
ENV NODE_ENV=production
COPY --from=builder /app/package.json .
COPY --from=builder /app/yarn.lock .
COPY --from=builder /app/next.config.js .
COPY --from=builder /app/public ./public
COPY --from=builder /app/.next/standalone ./
COPY --from=builder /app/.next/static ./.next/static
COPY entrypoint.sh .
RUN apk add --no-cache --upgrade bash
+36
View File
@@ -0,0 +1,36 @@
<svg viewBox="0 0 240 240" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="240" height="240" rx="120" fill="#E50571" />
<path d="M149.107 60.9396L63.3276 181.702H89.6637L175.888 60.9396H149.107Z" fill="white" />
<path
d="M92.4053 60.9396L117.644 96.5239L104.476 115.934L65.5205 60.9396H92.4053Z"
fill="url(#paint0_linear_6269_3439)"
/>
<path
d="M151.664 181.712L123.682 142.354L136.851 123.483L178 181.712H151.664Z"
fill="url(#paint1_linear_6269_3439)"
/>
<defs>
<linearGradient
id="paint0_linear_6269_3439"
x1="86.3698"
y1="68.4878"
x2="121.753"
y2="111.957"
gradientUnits="userSpaceOnUse"
>
<stop stop-color="white" />
<stop offset="1" stop-color="white" stop-opacity="0.75" />
</linearGradient>
<linearGradient
id="paint1_linear_6269_3439"
x1="157.7"
y1="172.547"
x2="114.305"
y2="113.014"
gradientUnits="userSpaceOnUse"
>
<stop stop-color="white" stop-opacity="0.68" />
<stop offset="1" stop-color="white" stop-opacity="0.1" />
</linearGradient>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

@@ -48,7 +48,7 @@ export default function Manage(props: Props) {
if (!address) return null
return (
<div className='flex justify-end z-10'>
<div className='z-10 flex justify-end'>
<DropDownButton items={ITEMS} text='Manage' color='tertiary' />
</div>
)
+1 -1
View File
@@ -66,7 +66,7 @@ export default function Row<T>(props: Props<T>) {
spacingClassName ?? 'px-3 py-4',
type && type !== 'strategies' && isSymbolOrName && 'border-l',
type && type !== 'strategies' && getBorderColor(type, cell.row.original as any),
cell.column.columnDef.meta?.className ?? 'w-min',
cell.column.columnDef.meta?.className,
)}
>
{flexRender(cell.column.columnDef.cell, cell.getContext())}
-1
View File
@@ -76,7 +76,6 @@ export default function Table<T>(props: Props<T>) {
props.spacingClassName ?? 'px-4 py-3',
header.column.getCanSort() && 'hover:cursor-pointer',
header.id === 'symbol' || header.id === 'name' ? 'text-left' : 'text-right',
'w-min',
header.column.columnDef.meta?.className,
)}
>
@@ -10,6 +10,9 @@ export const DEPOSIT_CAP_META = {
accessorKey: 'marketDepositCap',
header: 'Deposit Cap',
id: 'marketDepositCap',
meta: {
className: 'w-50',
},
}
export const marketDepositCapSortingFn = (
@@ -13,6 +13,9 @@ export const LEND_BUTTON_META = {
accessorKey: 'lend',
enableSorting: false,
header: '',
meta: {
className: 'w-40',
},
}
interface Props {
@@ -13,6 +13,9 @@ export const MANAGE_META = {
accessorKey: 'manage',
enableSorting: false,
header: '',
meta: {
className: 'w-40',
},
}
interface Props {
@@ -75,7 +78,7 @@ export default function Manage(props: Props) {
if (!address) return null
return (
<div className='flex justify-end z-10'>
<div className='z-10 flex justify-end'>
<DropDownButton items={ITEMS} text='Manage' color='tertiary' />
</div>
)
+10 -7
View File
@@ -12,13 +12,16 @@ export default function PerpsBalancesTable() {
const columns = usePerpsBalancesColumns()
const [searchParams, setSearchParams] = useSearchParams()
const onClickRow = useCallback((denom: string) => {
const params = getSearchParamsObject(searchParams)
setSearchParams({
...params,
[SearchParams.PERPS_MARKET]: denom,
})
}, [])
const onClickRow = useCallback(
(denom: string) => {
const params = getSearchParamsObject(searchParams)
setSearchParams({
...params,
[SearchParams.PERPS_MARKET]: denom,
})
},
[searchParams, setSearchParams],
)
return (
<Table
+15
View File
@@ -0,0 +1,15 @@
const stDYDX: AssetMetaData = {
symbol: 'stDYDX',
id: 'stDYDX',
name: 'Stride dYdX',
color: '#e50571',
logo: '/images/tokens/stdydx.svg',
decimals: 18,
hasOraclePrice: true,
isEnabled: true,
isMarket: true,
isDisplayCurrency: true,
isAutoLendEnabled: false,
isStaking: true,
}
export default stDYDX
+18 -12
View File
@@ -5,23 +5,24 @@ import ATOM from 'configs/assets/ATOM'
import AXL from 'configs/assets/AXL'
import DYDX from 'configs/assets/DYDX'
import INJ from 'configs/assets/INJ'
import MARS from 'configs/assets/MARS'
import OSMO from 'configs/assets/OSMO'
import TIA from 'configs/assets/TIA'
import USDC from 'configs/assets/USDC'
import USDCaxl from 'configs/assets/USDC.axl'
import USDT from 'configs/assets/USDT'
import USDollar from 'configs/assets/USDollar'
import WBTCaxl from 'configs/assets/WBTC.axl'
import WETHaxl from 'configs/assets/WETH.xal'
import OSMO_ATOM from 'configs/assets/lp/OSMO-ATOM'
import OSMO_USDC from 'configs/assets/lp/OSMO_USDC'
import OSMO_WBTC from 'configs/assets/lp/OSMO_WBTC'
import OSMO_WETH from 'configs/assets/lp/OSMO_WETH'
import stATOM_ATOM from 'configs/assets/lp/stATOM_ATOM'
import MARS from 'configs/assets/MARS'
import milkTIA from 'configs/assets/milkTIA'
import OSMO from 'configs/assets/OSMO'
import stATOM from 'configs/assets/stATOM'
import stDYDX from 'configs/assets/stDYDX'
import stOSMO from 'configs/assets/stOSMO'
import TIA from 'configs/assets/TIA'
import USDC from 'configs/assets/USDC'
import USDCaxl from 'configs/assets/USDC.axl'
import USDollar from 'configs/assets/USDollar'
import USDT from 'configs/assets/USDT'
import WBTCaxl from 'configs/assets/WBTC.axl'
import WETHaxl from 'configs/assets/WETH.xal'
import { VAULTS_META_DATA } from 'constants/vaults'
import { NETWORK } from 'types/enums/network'
import { ChainInfoID } from 'types/enums/wallet'
@@ -45,15 +46,20 @@ const ASSETS = [
poolId: 712,
denom: 'ibc/D1542AA8762DB13087D8364F3EA6509FD6F009A34F00426AF9E4F9FA85CBBF1F',
},
{
...stATOM,
poolId: 803,
denom: 'ibc/C140AFD542AE77BD7DCC83F13FDD8C5E5BB8C4929785E6EC2F4C636F98F17901',
},
{
...stOSMO,
poolId: 833,
denom: 'ibc/D176154B0C63D1F9C6DCFB4F70349EBF2E2B5A87A05902F57A6AE92B863E9AEC',
},
{
...stATOM,
poolId: 803,
denom: 'ibc/C140AFD542AE77BD7DCC83F13FDD8C5E5BB8C4929785E6EC2F4C636F98F17901',
...stDYDX,
poolId: 1423,
denom: 'ibc/980E82A9F8E7CA8CD480F4577E73682A6D3855A267D1831485D7EBEF0E7A6C2C',
},
{
...USDCaxl,