From 35ca682d4304ace0224714fb01f2ef6fe19d20e3 Mon Sep 17 00:00:00 2001 From: Dmitry Lobachevsky Date: Tue, 28 Nov 2023 14:24:33 +0300 Subject: [PATCH] feat: update core-ui-kit version (includes renaming of Bridged USDC token) --- apps/mstable/src/providers/core-ui-toolkit.tsx | 2 +- libs/shared/constants/src/core-vaults/optimism/ethy.ts | 4 ++-- libs/shared/constants/src/core-vaults/optimism/mhrvst.ts | 6 +++--- libs/shared/constants/src/core-vaults/optimism/usdmny.ts | 6 +++--- libs/shared/constants/src/core-vaults/optimism/usdy.ts | 6 +++--- .../components/core-ui-toolkit-provider.tsx | 8 ++------ package.json | 2 +- yarn.lock | 8 ++++---- 8 files changed, 19 insertions(+), 23 deletions(-) diff --git a/apps/mstable/src/providers/core-ui-toolkit.tsx b/apps/mstable/src/providers/core-ui-toolkit.tsx index fd25e9fa..18f37b70 100644 --- a/apps/mstable/src/providers/core-ui-toolkit.tsx +++ b/apps/mstable/src/providers/core-ui-toolkit.tsx @@ -92,7 +92,7 @@ export const CoreUIToolkitProvider: FC = ({ return ( {children} diff --git a/libs/shared/constants/src/core-vaults/optimism/ethy.ts b/libs/shared/constants/src/core-vaults/optimism/ethy.ts index 1a03218a..2ac18bdd 100644 --- a/libs/shared/constants/src/core-vaults/optimism/ethy.ts +++ b/libs/shared/constants/src/core-vaults/optimism/ethy.ts @@ -1,7 +1,7 @@ import { + BRIDGED_USDC_OPTIMISM, optimism, SUSD_OPTIMISM, - USDC_OPTIMISM, WETH_OPTIMISM, } from '@dhedge/core-ui-kit/const'; @@ -21,7 +21,7 @@ export const ETHY_OPTIMISM: PoolConfig = { WETH_OPTIMISM, { ...SUSD_OPTIMISM, - intermediateToken: USDC_OPTIMISM, + intermediateToken: BRIDGED_USDC_OPTIMISM, method: 'withdrawSUSD', }, ], diff --git a/libs/shared/constants/src/core-vaults/optimism/mhrvst.ts b/libs/shared/constants/src/core-vaults/optimism/mhrvst.ts index c25c0abc..64ec604b 100644 --- a/libs/shared/constants/src/core-vaults/optimism/mhrvst.ts +++ b/libs/shared/constants/src/core-vaults/optimism/mhrvst.ts @@ -1,4 +1,4 @@ -import { optimism, USDC_OPTIMISM } from '@dhedge/core-ui-kit/const'; +import { BRIDGED_USDC_OPTIMISM, optimism } from '@dhedge/core-ui-kit/const'; import type { PoolConfig } from '@dhedge/core-ui-kit/types'; @@ -9,10 +9,10 @@ export const MHRVST_OPTIMISM: PoolConfig = { symbol: 'mHRVST', address: '0x9c6de13d4648a6789017641f6b1a025816e66228', depositParams: { - customTokens: [USDC_OPTIMISM], + customTokens: [BRIDGED_USDC_OPTIMISM], }, withdrawParams: { - customTokens: [USDC_OPTIMISM], + customTokens: [BRIDGED_USDC_OPTIMISM], }, }; diff --git a/libs/shared/constants/src/core-vaults/optimism/usdmny.ts b/libs/shared/constants/src/core-vaults/optimism/usdmny.ts index aef96fb6..946e5636 100644 --- a/libs/shared/constants/src/core-vaults/optimism/usdmny.ts +++ b/libs/shared/constants/src/core-vaults/optimism/usdmny.ts @@ -1,7 +1,7 @@ import { + BRIDGED_USDC_OPTIMISM, optimism, SUSD_OPTIMISM, - USDC_OPTIMISM, } from '@dhedge/core-ui-kit/const'; import type { PoolConfig } from '@dhedge/core-ui-kit/types'; @@ -17,10 +17,10 @@ export const USDMNY_OPTIMISM: PoolConfig = { }, withdrawParams: { customTokens: [ - USDC_OPTIMISM, + BRIDGED_USDC_OPTIMISM, { ...SUSD_OPTIMISM, - intermediateToken: USDC_OPTIMISM, + intermediateToken: BRIDGED_USDC_OPTIMISM, method: 'withdrawSUSD', }, ], diff --git a/libs/shared/constants/src/core-vaults/optimism/usdy.ts b/libs/shared/constants/src/core-vaults/optimism/usdy.ts index eefb0ae8..56c62372 100644 --- a/libs/shared/constants/src/core-vaults/optimism/usdy.ts +++ b/libs/shared/constants/src/core-vaults/optimism/usdy.ts @@ -1,8 +1,8 @@ import { + BRIDGED_USDC_OPTIMISM, DAI_OPTIMISM, optimism, SUSD_OPTIMISM, - USDC_OPTIMISM, } from '@dhedge/core-ui-kit/const'; import type { PoolConfig } from '@dhedge/core-ui-kit/types'; @@ -18,10 +18,10 @@ export const USDY_OPTIMISM: PoolConfig = { }, withdrawParams: { customTokens: [ - USDC_OPTIMISM, + BRIDGED_USDC_OPTIMISM, { ...SUSD_OPTIMISM, - intermediateToken: USDC_OPTIMISM, + intermediateToken: BRIDGED_USDC_OPTIMISM, method: 'withdrawSUSD', }, DAI_OPTIMISM, diff --git a/libs/shared/providers/src/core-ui-toolkit/components/core-ui-toolkit-provider.tsx b/libs/shared/providers/src/core-ui-toolkit/components/core-ui-toolkit-provider.tsx index 41f93973..5188348a 100644 --- a/libs/shared/providers/src/core-ui-toolkit/components/core-ui-toolkit-provider.tsx +++ b/libs/shared/providers/src/core-ui-toolkit/components/core-ui-toolkit-provider.tsx @@ -5,12 +5,8 @@ import type { FC, PropsWithChildren } from 'react'; export const CoreUIToolkitProvider: FC< PropsWithChildren -> = ({ children, actions, poolConfigMap, poolAddress }) => ( - +> = ({ children, actions, initialState }) => ( + {children} ); diff --git a/package.json b/package.json index 7b02e8c9..90af3e51 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ "*.{js,jsx,ts,tsx,mdx}": "eslint --fix" }, "dependencies": { - "@dhedge/core-ui-kit": "^0.3.10", + "@dhedge/core-ui-kit": "^0.4.1", "@dhedge/crypto-assets": "^0.2.6", "@emotion/react": "11.10.6", "@emotion/styled": "11.10.6", diff --git a/yarn.lock b/yarn.lock index 947874c5..b52f5165 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1983,10 +1983,10 @@ enabled "2.0.x" kuler "^2.0.0" -"@dhedge/core-ui-kit@^0.3.10": - version "0.3.10" - resolved "https://registry.yarnpkg.com/@dhedge/core-ui-kit/-/core-ui-kit-0.3.10.tgz#bf58b9410f7545c7329d5531e26980f3f213e021" - integrity sha512-RvIfDqWWi2RWdeZrNxs93XNTzpLXWZdnqWylA1oLO/qRc1G52a9ZC0ThYup8UmlW020lJGJJ9oVHDVR1JDLSSw== +"@dhedge/core-ui-kit@^0.4.1": + version "0.4.1" + resolved "https://registry.yarnpkg.com/@dhedge/core-ui-kit/-/core-ui-kit-0.4.1.tgz#838c56c905f1a110dcfd8a6b859992946d1985a9" + integrity sha512-MmxfFVUw8peC1ahhZKafmAMMKrdM9fFkzxqTDy8IeHuFmtOvFyN9A5j8o2eF3pXvM4cOXIE+9Ay73k9yf2A0WA== dependencies: "@wagmi/chains" "^0.2.25" lodash.chunk "^4.2.0"