From 0e6f0edb5da3b0c5571197e12e935ca05e78d3b3 Mon Sep 17 00:00:00 2001 From: Linkie Link Date: Thu, 15 Feb 2024 10:49:14 +0100 Subject: [PATCH 1/2] 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 * 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 --------- 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> --- .env | 0 .env.production | 13 ------------- Dockerfile | 10 ++++++++-- src/components/perps/BalancesTable/index.tsx | 17 ++++++++++------- 4 files changed, 18 insertions(+), 22 deletions(-) delete mode 100644 .env delete mode 100644 .env.production diff --git a/.env b/.env deleted file mode 100644 index e69de29b..00000000 diff --git a/.env.production b/.env.production deleted file mode 100644 index bd939153..00000000 --- a/.env.production +++ /dev/null @@ -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 diff --git a/Dockerfile b/Dockerfile index f6aa2351..d9f1efc7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 diff --git a/src/components/perps/BalancesTable/index.tsx b/src/components/perps/BalancesTable/index.tsx index 94b7774b..d9b5bb45 100644 --- a/src/components/perps/BalancesTable/index.tsx +++ b/src/components/perps/BalancesTable/index.tsx @@ -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 ( Date: Fri, 16 Feb 2024 08:58:12 +0100 Subject: [PATCH 2/2] feat: list DYDX (#815) --- public/images/tokens/stdydx.svg | 36 +++++++++++++++++++++++++ src/configs/assets/stDYDX.ts | 15 +++++++++++ src/configs/chains/osmosis/osmosis-1.ts | 30 ++++++++++++--------- 3 files changed, 69 insertions(+), 12 deletions(-) create mode 100644 public/images/tokens/stdydx.svg create mode 100644 src/configs/assets/stDYDX.ts diff --git a/public/images/tokens/stdydx.svg b/public/images/tokens/stdydx.svg new file mode 100644 index 00000000..5e5dd3b4 --- /dev/null +++ b/public/images/tokens/stdydx.svg @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + diff --git a/src/configs/assets/stDYDX.ts b/src/configs/assets/stDYDX.ts new file mode 100644 index 00000000..6f952b48 --- /dev/null +++ b/src/configs/assets/stDYDX.ts @@ -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 diff --git a/src/configs/chains/osmosis/osmosis-1.ts b/src/configs/chains/osmosis/osmosis-1.ts index 8277fee5..b25594e8 100644 --- a/src/configs/chains/osmosis/osmosis-1.ts +++ b/src/configs/chains/osmosis/osmosis-1.ts @@ -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,