Skip to content

Commit

Permalink
Merge pull request #298 from mstable/feat/core-ui-kit
Browse files Browse the repository at this point in the history
feat: update core-ui-kit version (includes renaming of Bridged USDC t…
  • Loading branch information
dimlbc authored Nov 28, 2023
2 parents 61d3ce0 + 35ca682 commit d6bcb85
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 23 deletions.
2 changes: 1 addition & 1 deletion apps/mstable/src/providers/core-ui-toolkit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export const CoreUIToolkitProvider: FC = ({

return (
<ToolkitProvider
poolConfigMap={CORE_UI_TOOLKIT_POOL_CONFIG_MAP}
initialState={{ poolConfigMap: CORE_UI_TOOLKIT_POOL_CONFIG_MAP }}
actions={getActions(pushNotification)}
>
{children}
Expand Down
4 changes: 2 additions & 2 deletions libs/shared/constants/src/core-vaults/optimism/ethy.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {
BRIDGED_USDC_OPTIMISM,
optimism,
SUSD_OPTIMISM,
USDC_OPTIMISM,
WETH_OPTIMISM,
} from '@dhedge/core-ui-kit/const';

Expand All @@ -21,7 +21,7 @@ export const ETHY_OPTIMISM: PoolConfig = {
WETH_OPTIMISM,
{
...SUSD_OPTIMISM,
intermediateToken: USDC_OPTIMISM,
intermediateToken: BRIDGED_USDC_OPTIMISM,
method: 'withdrawSUSD',
},
],
Expand Down
6 changes: 3 additions & 3 deletions libs/shared/constants/src/core-vaults/optimism/mhrvst.ts
Original file line number Diff line number Diff line change
@@ -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';

Expand All @@ -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],
},
};

Expand Down
6 changes: 3 additions & 3 deletions libs/shared/constants/src/core-vaults/optimism/usdmny.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand All @@ -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',
},
],
Expand Down
6 changes: 3 additions & 3 deletions libs/shared/constants/src/core-vaults/optimism/usdy.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand All @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,8 @@ import type { FC, PropsWithChildren } from 'react';

export const CoreUIToolkitProvider: FC<
PropsWithChildren<TradingPanelContextConfig>
> = ({ children, actions, poolConfigMap, poolAddress }) => (
<TradingPanelProvider
actions={actions}
poolAddress={poolAddress}
poolConfigMap={poolConfigMap}
>
> = ({ children, actions, initialState }) => (
<TradingPanelProvider actions={actions} initialState={initialState}>
{children}
</TradingPanelProvider>
);
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit d6bcb85

Please sign in to comment.