Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes Trade Summary Fees, Whitelist crvUSD vaults on Arbitrum #772

Merged
merged 83 commits into from
Apr 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
633686a
build: adds product dashboard to vaults page
matthew-garrett Feb 14, 2024
c1fa5ab
build: adds incentives
matthew-garrett Feb 14, 2024
5aa6d2a
build: hides negative yields adds header
matthew-garrett Feb 16, 2024
c617a37
build: clean up
matthew-garrett Feb 16, 2024
ba78040
build: addresses comments
matthew-garrett Feb 16, 2024
76883ea
build: updates naming
matthew-garrett Feb 16, 2024
cc4d773
build: fixes sorting issues adds hide yields button
matthew-garrett Feb 18, 2024
668da7d
build: updates vault dashboard grid card data
matthew-garrett Feb 20, 2024
b72f932
build: updates comp name
matthew-garrett Feb 20, 2024
79fc85d
build: wip
matthew-garrett Feb 20, 2024
52e6293
build: adds different dashboard componenets to dashboard view
matthew-garrett Feb 21, 2024
b52ed17
build: adds grid dashboards removes card pages
matthew-garrett Feb 23, 2024
bcc13d0
build: addresses comments
matthew-garrett Feb 23, 2024
0b77a92
build: fixes dashboard sorting
matthew-garrett Feb 23, 2024
d5d4897
build: fixes issues
matthew-garrett Feb 23, 2024
c7278f3
build: updates tvl to liquidity on dashbaord cards
matthew-garrett Feb 27, 2024
5dfbae3
build: updates prop naming
matthew-garrett Feb 27, 2024
32373e0
build: adds fixed lend list view
matthew-garrett Feb 27, 2024
9452712
build: adds list view
matthew-garrett Feb 29, 2024
47eeed7
build: clean up
matthew-garrett Feb 29, 2024
e4899d1
build: updates styles
matthew-garrett Feb 29, 2024
0132188
build: gets network selectors working
matthew-garrett Mar 5, 2024
d46708e
Bugfix/all markets yields (#647)
jeffywu Mar 6, 2024
976978e
Feat/token settings (#649)
jeffywu Mar 6, 2024
825c539
fix: build issues (#651)
jeffywu Mar 6, 2024
5712077
build: updates styles of multi select dropdown
matthew-garrett Mar 6, 2024
ebcff17
build: add right toggle and all networks toggle to data table filter
matthew-garrett Mar 6, 2024
ed327f8
build: adds all networks toggle
matthew-garrett Mar 6, 2024
a153160
build: removes log
matthew-garrett Mar 6, 2024
9b73a3d
build: adds network icon to tables adds body from mui cleans up styles
matthew-garrett Mar 7, 2024
1c60dca
build: fixes issues related to ntoken apy chart and mainnet
matthew-garrett Mar 7, 2024
a5e4f5f
build: updates landing page product cards to new style
matthew-garrett Mar 7, 2024
32d24a9
build: removes log
matthew-garrett Mar 7, 2024
afe38a0
Bugfix/txn submit bugs (#663)
jeffywu Mar 12, 2024
1504f14
build: updates red usage
matthew-garrett Mar 13, 2024
b276c1a
build: removes logs
matthew-garrett Mar 13, 2024
bf8cbc9
build: updates fait token and percent decimal places
matthew-garrett Mar 14, 2024
e00c192
build: adds toAbbrDisplayString fixes other decimal issues
matthew-garrett Mar 15, 2024
9a639ac
build: removes log
matthew-garrett Mar 15, 2024
e0f0389
build: fixes incorrect error and fixed borrow grid order
matthew-garrett Mar 18, 2024
b433d36
build: removes comment
matthew-garrett Mar 18, 2024
7b4dc0d
Bugfix/to abbr display string (#681)
jeffywu Mar 20, 2024
b656a57
build: adds tanstack react table v8
matthew-garrett Mar 19, 2024
ce8201b
build: upgrades table to v8
matthew-garrett Mar 21, 2024
9cf6adb
build: adds scrollable table wip
matthew-garrett Mar 22, 2024
a343548
build: type updates
matthew-garrett Mar 25, 2024
9d160bb
build: fixes issues after rebase
matthew-garrett Mar 25, 2024
3fea3ca
build: addresses comments
matthew-garrett Mar 27, 2024
e4d50d3
Merge pull request #701 from notional-finance/feat/data-table-refactor
matthew-garrett Mar 27, 2024
1127003
Feat/whitelist vaults (#711)
jeffywu Mar 30, 2024
ef8c71d
Feat/update transaction history (#712)
jeffywu Mar 30, 2024
2b62a3c
Feat/vault default select (#713)
jeffywu Mar 30, 2024
d5cf652
fix: performance chart scale (#714)
jeffywu Mar 30, 2024
3e53735
Bugfix/various issues (#715)
jeffywu Mar 31, 2024
d6955f0
fix: slider cell (#716)
jeffywu Apr 1, 2024
1b6ed0e
Merge branch 'alpha/arbitrum' into v3/dev
jeffywu Apr 1, 2024
087b191
Feat/renzo etherfi vaults (#719)
jeffywu Apr 1, 2024
84a66ac
fix: points headers (#721)
jeffywu Apr 1, 2024
cdeabbb
Bugfix/point multiples (#723)
jeffywu Apr 2, 2024
7f135bf
fix: function (#724)
jeffywu Apr 2, 2024
26af288
Bugfix/points multiples leverage (#728)
jeffywu Apr 3, 2024
4c864a9
Bugfix/liquidity withdraw (#729)
jeffywu Apr 3, 2024
860d2da
fix: adding gnosis module (#733)
jeffywu Apr 4, 2024
6441c2a
fix: update dependencies (#734)
jeffywu Apr 4, 2024
445af8c
Feat/switch to implied rates (#735)
jeffywu Apr 4, 2024
58befd6
Bugfix/ntoken implied rates (#738)
jeffywu Apr 5, 2024
5381de3
Merge branch 'alpha/arbitrum' into v3/dev
jeffywu Apr 5, 2024
26c96b5
Bugfix/implied rate issues (#739)
jeffywu Apr 5, 2024
eadfc3c
Bugfix/add deleverage buffer (#741)
jeffywu Apr 8, 2024
fdcb9b3
Feat/etherfi points (#742)
jeffywu Apr 8, 2024
d576c8e
fix: allow site to load if subgraph is down
jeffywu Apr 10, 2024
f6e29cf
fix: oracle registry server resiliancy
jeffywu Apr 10, 2024
b9ca116
Merge branch 'feat/subgraph-resiliancy' into v3/dev
jeffywu Apr 11, 2024
2f940de
Merge branch 'alpha/arbitrum' into v3/dev
jeffywu Apr 15, 2024
85a4f6b
fix: performance chart labels (#757)
jeffywu Apr 15, 2024
485c683
Feat/intercom (#759)
matthew-garrett Apr 16, 2024
e3293f1
Merge branch 'alpha/arbitrum' into v3/dev
jeffywu Apr 19, 2024
4984998
Bugfix/fee slippage values (#765)
jeffywu Apr 19, 2024
df7f9fc
fix: traded interest rates (#768)
jeffywu Apr 19, 2024
4a4c212
Bugfix/various fee bugs (#769)
jeffywu Apr 21, 2024
be46943
fix: add max withdraw message (#770)
jeffywu Apr 21, 2024
3f2d981
Feat/list crv vaults arb (#771)
jeffywu Apr 22, 2024
e35d2b5
fix: remove intercom boot
jeffywu Apr 22, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/deploy-arb-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ jobs:
NX_DD_SITE: ${{ secrets.NX_DD_SITE }}
NX_APP_URL: ${{ secrets.NX_APP_URL }}
NX_DATA_URL: ${{ secrets.NX_DATA_URL }}
NX_INTERCOM_APP_ID: ${{ secrets.NX_INTERCOM_APP_ID }}
# This segment key is not the same as the prod one
NX_SEGMENT_KEY: ${{ secrets.NX_DEV_SEGMENT_KEY }}
NX_ENV: ${{ github.event.inputs.environment || 'arb' }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/deploy-arb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ jobs:
NX_SEGMENT_KEY: ${{ secrets.NX_SEGMENT_KEY }}
NX_ENV: ${{ github.event.inputs.environment || 'arb' }}
NX_COMMIT_REF: ${{ github.sha }}
NX_INTERCOM_APP_ID: ${{ secrets.NX_INTERCOM_APP_ID }}
- name: Publish Dev
uses: cloudflare/pages-action@1
with:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,32 +10,36 @@ import statsImg from '../images/stats_overlay.svg';
import { FormattedMessage } from 'react-intl';
import { formatNumber } from '@notional-finance/helpers';
import { useNotionalContext } from '@notional-finance/notionable-hooks';
import { SupportedNetworks } from '@notional-finance/util';

const oneMillion = 1_000_000;

export const HeroStats = () => {
const theme = useTheme();
const {
globalState: { heroStats },
globalState: { heroStats, activeAccounts },
} = useNotionalContext();
const isReady = SupportedNetworks.every(
(n) => activeAccounts && activeAccounts[n]
);

return (
<StatsContainer>
<ImgContainer>
<StatsContent>
{heroStats?.totalAccounts ? (
{isReady && heroStats ? (
<div>
<LargeInputText>
{`$${formatNumber(
heroStats.totalValueLocked / oneMillion,
0
2
)}M`}
<BodySecondary>
<FormattedMessage defaultMessage={'Total Value Locked'} />
</BodySecondary>
</LargeInputText>
<LargeInputText sx={{ marginTop: theme.spacing(6) }}>
{`$${formatNumber(heroStats.totalOpenDebt / oneMillion, 0)}M`}
{`$${formatNumber(heroStats.totalOpenDebt / oneMillion, 1)}M`}
<BodySecondary>
<FormattedMessage defaultMessage={'Total Open Debt'} />
</BodySecondary>
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
"react-scroll": "^1.8.9",
"react-slick": "^0.29.0",
"react-swipeable": "^7.0.0",
"react-use-intercom": "^5.4.0",
"react-youtube": "^9.0.2",
"recharts": "^2.3.2",
"regenerator-runtime": "0.13.7",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,10 @@ export class AnalyticsRegistryClient extends ClientRegistry<unknown> {
Registry.getTokenRegistry()
.getAllTokens(n)
.filter(
(t) => t.tokenType === 'PrimeDebt' || t.tokenType === 'PrimeCash'
(t) =>
t.tokenType === 'PrimeDebt' ||
t.tokenType === 'PrimeCash' ||
t.tokenType === 'VaultShare'
)
.reduce(
(acc, token) =>
Expand Down
8 changes: 3 additions & 5 deletions packages/core-entities/src/client/exchange-registry-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,9 @@ export class ExchangeRegistryClient extends ClientRegistry<PoolDefinition> {
network: Network,
address: string
) {
const pool = this.getLatestFromSubject(
network,
// Converts to a checksummed address
ethers.utils.getAddress(address)
);
const pool =
this.getLatestFromSubject(network, ethers.utils.getAddress(address)) ||
this.getLatestFromSubject(network, address.toLowerCase());
if (!pool) throw Error(`Pool ${address} on ${network} not found`);
return this._buildPool<T>(network, pool);
}
Expand Down
8 changes: 4 additions & 4 deletions packages/core-entities/src/config/whitelisted-vaults.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@ export const whitelistedVaults = (network: Network) => {
'0xdb08f663e5d765949054785f2ed1b2aa1e9c22cf',
// "[USDT]:USDC_e_xUSDT"
'0x431dbfe3050ea39abbff3e0d86109fb5bafa28fd',
// // "[USDC]:crvUSD_xUSDC"
// '0x5c36a0deab3531d29d848e684e8bdf5f81cdb643',
// // "[USDT]:crvUSD_xUSDT"
// '0xae04e4887cbf5f25c05ac1384bcd0b7e885a1f4a',
// "[USDC]:crvUSD_xUSDC"
'0x5c36a0deab3531d29d848e684e8bdf5f81cdb643',
// "[USDT]:crvUSD_xUSDT"
'0xae04e4887cbf5f25c05ac1384bcd0b7e885a1f4a',
// "[rETH]:xrETH_WETH"
'0x3df035433cface65b6d68b77cc916085d020c8b8',
// "[USDC]:xUSDC_DAI_USDT_USDC_e"
Expand Down
59 changes: 41 additions & 18 deletions packages/core-entities/src/exchanges/default-pools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const defaultPools: Record<Network, PoolDefinition[]> = {
},
{
address: '0x383E6b4437b59fff47B619CBA855CA29342A8559',
PoolClass: 'Curve2TokenPoolV1_SelfLPToken',
PoolClass: 'Curve2TokenPoolV1_SelfLPTokenNoAdmin',
registerTokens: [
{
id: '0x383E6b4437b59fff47B619CBA855CA29342A8559',
Expand All @@ -80,7 +80,7 @@ const defaultPools: Record<Network, PoolDefinition[]> = {
},
{
address: '0x4DEcE678ceceb27446b35C672dC7d61F30bAD69E',
PoolClass: 'Curve2TokenPoolV1_SelfLPToken',
PoolClass: 'Curve2TokenPoolV1_SelfLPTokenNoAdmin',
registerTokens: [
{
id: '0x4DEcE678ceceb27446b35C672dC7d61F30bAD69E',
Expand All @@ -106,7 +106,7 @@ const defaultPools: Record<Network, PoolDefinition[]> = {
},
{
address: '0x390f3595bCa2Df7d23783dFd126427CCeb997BF4',
PoolClass: 'Curve2TokenPoolV1_SelfLPToken',
PoolClass: 'Curve2TokenPoolV1_SelfLPTokenNoAdmin',
registerTokens: [
{
id: '0x390f3595bCa2Df7d23783dFd126427CCeb997BF4',
Expand Down Expand Up @@ -286,7 +286,7 @@ const defaultPools: Record<Network, PoolDefinition[]> = {
},
{
address: '0x7f90122BF0700F9E7e1F688fe926940E8839F353',
PoolClass: 'Curve2TokenPoolV1_SelfLPToken',
PoolClass: 'Curve2TokenPoolV1_SelfLPTokenNoAdmin',
registerTokens: [
// USDT / USDC v1 pool
{
Expand Down Expand Up @@ -340,30 +340,53 @@ const defaultPools: Record<Network, PoolDefinition[]> = {
],
},
{
// NOTE: the pool address here is different from the lp token address
address: '0x6eB2dc694eB516B16Dc9FBc678C60052BbdD7d80',
PoolClass: 'Curve2TokenPoolV1_HasOracle',
address: '0x73af1150f265419ef8a5db41908b700c32d49135',
PoolClass: 'Curve2TokenPoolV1_SelfLPTokenNoAdmin',
registerTokens: [
// ETH / wstETH Pool
{
id: '0xDbcD16e622c95AcB2650b38eC799f76BFC557a0b',
address: '0xDbcD16e622c95AcB2650b38eC799f76BFC557a0b',
id: '0x73af1150f265419ef8a5db41908b700c32d49135',
address: '0x73af1150f265419ef8a5db41908b700c32d49135',
network: Network.arbitrum,
symbol: 'wstETHCRV',
name: 'Curve.fi ETH/wstETH',
symbol: 'crvUSDC',
name: 'crvUSD/USDT',
decimals: 18,
tokenInterface: 'ERC20',
tokenType: 'Underlying',
},
// Register ALT_ETH
{
id: ALT_ETH,
address: ALT_ETH,
id: '0x498bf2b1e120fed3ad3d42ea2165e9b73f99c1e5',
address: '0x498bf2b1e120fed3ad3d42ea2165e9b73f99c1e5',
network: Network.arbitrum,
symbol: 'ETH [Alt]',
name: 'Ether [Alternate]',
symbol: 'crvUSD',
name: 'Curve.Fi USD Stablecoin',
decimals: 18,
tokenInterface: 'ERC20', // TODO: change this to Ether interface
tokenInterface: 'ERC20',
tokenType: 'Underlying',
},
],
},
{
address: '0xec090cf6dd891d2d014bea6edada6e05e025d93d',
PoolClass: 'Curve2TokenPoolV1_SelfLPTokenNoAdmin',
registerTokens: [
{
id: '0xec090cf6dd891d2d014bea6edada6e05e025d93d',
address: '0xec090cf6dd891d2d014bea6edada6e05e025d93d',
network: Network.arbitrum,
symbol: 'crvUSDC',
name: 'crvUSD/USDC',
decimals: 18,
tokenInterface: 'ERC20',
tokenType: 'Underlying',
},
{
id: '0x498bf2b1e120fed3ad3d42ea2165e9b73f99c1e5',
address: '0x498bf2b1e120fed3ad3d42ea2165e9b73f99c1e5',
network: Network.arbitrum,
symbol: 'crvUSD',
name: 'Curve.Fi USD Stablecoin',
decimals: 18,
tokenInterface: 'ERC20',
tokenType: 'Underlying',
},
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,25 +137,6 @@ export const useLiquidityDetails = () => {
greenOnArrowUp: true,
},
},
{
label: 'Net Worth',
current: currentHoldings?.presentValue.toDisplayStringWithSymbol() || '-',
updated: {
value: newNetWorth?.toDisplayStringWithSymbol() || '-',
arrowUp:
getChangeType(
currentHoldings?.presentValue.toFloat(),
newNetWorth?.toFloat()
) === 'increase',
checkmark:
getChangeType(
currentHoldings?.presentValue.toFloat(),
newNetWorth?.toFloat()
) === 'cleared',
greenOnCheckmark: false,
greenOnArrowUp: true,
},
},
{
label: 'Leverage Ratio',
current: currentHoldings?.leverageRatio
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export const CreateOrIncreasePosition = () => {
{currentPosition ? (
<ManageTerms
borrowType={
currentPosition.debt.tokenType === 'PrimeDebt'
currentPosition.debt.balance.tokenType === 'PrimeDebt'
? 'Variable'
: 'Fixed'
}
Expand Down
23 changes: 7 additions & 16 deletions packages/features/portfolio/src/side-drawers/convert-asset.tsx
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
import { Box, useTheme } from '@mui/material';
import { Box } from '@mui/material';
import { TokenBalance } from '@notional-finance/core-entities';
import { SideBarSubHeader, useCurrencyInputRef } from '@notional-finance/mui';
import { useCurrencyInputRef } from '@notional-finance/mui';
import { useTradeContext } from '@notional-finance/notionable-hooks';
import { AssetInput } from '@notional-finance/trade';
import { PORTFOLIO_ACTIONS } from '@notional-finance/util';
import { defineMessage } from 'react-intl';
import { PortfolioSideDrawer } from './components/portfolio-side-drawer';
import { SelectConvertAsset } from './components/select-convert-asset';
import { messages } from './messages';
import { useState } from 'react';

export const ConvertAsset = () => {
const theme = useTheme();
const context = useTradeContext('ConvertAsset');
const { currencyInputRef } = useCurrencyInputRef();
const {
state: { collateral },
updateState,
} = context;
const [hasUserTouched, setHasUserTouched] = useState<boolean>(false)
const [hasUserTouched, setHasUserTouched] = useState<boolean>(false);

const onBalanceChange = (
inputAmount: TokenBalance | undefined,
_: TokenBalance | undefined,
maxBalance: TokenBalance | undefined
) => {
if (inputAmount) setHasUserTouched(true)
// Fixes a race condition where the screen flashes
if (inputAmount === undefined && hasUserTouched === false) return;
if (inputAmount) setHasUserTouched(true);
updateState({
debtBalance: inputAmount,
maxWithdraw: maxBalance && inputAmount?.neg().eq(maxBalance),
Expand All @@ -35,19 +35,10 @@ export const ConvertAsset = () => {
return (
<Box>
<Box sx={{ display: collateral === undefined ? 'block' : 'none' }}>
<SelectConvertAsset context={context} hasUserTouched={hasUserTouched}/>
<SelectConvertAsset context={context} hasUserTouched={hasUserTouched} />
</Box>
{collateral && (
<PortfolioSideDrawer context={context}>
<SideBarSubHeader
callback={() => updateState({ collateral: undefined })}
sx={{
position: 'absolute',
top: 0,
background: theme.palette.background.paper,
}}
titleText={defineMessage({ defaultMessage: 'Back' })}
></SideBarSubHeader>
<AssetInput
ref={currencyInputRef}
debtOrCollateral="Debt"
Expand Down
17 changes: 4 additions & 13 deletions packages/features/portfolio/src/side-drawers/roll-debt.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
import { Box, useTheme } from '@mui/material';
import { Box } from '@mui/material';
import { TokenBalance } from '@notional-finance/core-entities';
import { SideBarSubHeader, useCurrencyInputRef } from '@notional-finance/mui';
import { useCurrencyInputRef } from '@notional-finance/mui';
import { useTradeContext } from '@notional-finance/notionable-hooks';
import { AssetInput } from '@notional-finance/trade';
import { PORTFOLIO_ACTIONS } from '@notional-finance/util';
import { defineMessage } from 'react-intl';
import { PortfolioSideDrawer } from './components/portfolio-side-drawer';
import { SelectConvertAsset } from './components/select-convert-asset';
import { messages } from './messages';
import { useState } from 'react';

export const RollDebt = () => {
const theme = useTheme();
const context = useTradeContext('RollDebt');
const { currencyInputRef } = useCurrencyInputRef();
const {
Expand All @@ -25,6 +23,8 @@ export const RollDebt = () => {
_: TokenBalance | undefined,
maxBalance: TokenBalance | undefined
) => {
// Fixes a race condition where the screen flashes
if (inputAmount === undefined && hasUserTouched === false) return;
if (inputAmount) setHasUserTouched(true);
updateState({
collateralBalance: inputAmount,
Expand All @@ -42,15 +42,6 @@ export const RollDebt = () => {
context={context}
enablePrimeBorrow={debt?.tokenType === 'PrimeDebt'}
>
<SideBarSubHeader
callback={() => updateState({ debt: undefined })}
sx={{
position: 'absolute',
top: 0,
background: theme.palette.background.paper,
}}
titleText={defineMessage({ defaultMessage: 'Back' })}
/>
<AssetInput
ref={currencyInputRef}
debtOrCollateral="Collateral"
Expand Down
2 changes: 2 additions & 0 deletions packages/features/portfolio/src/side-drawers/withdraw.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export const Withdraw = () => {
setCurrencyInput,
onMaxValue,
maxWithdrawUnderlying,
belowMaxWarning,
} = useMaxWithdraw(context);
const {
state: { selectedNetwork },
Expand Down Expand Up @@ -59,6 +60,7 @@ export const Withdraw = () => {
context={context}
inputRef={currencyInputRef}
maxWithdraw={maxWithdrawUnderlying}
warningMsg={belowMaxWarning}
onMaxValue={onMaxValue}
newRoute={(newToken) =>
`/portfolio/${selectedNetwork}/${category}/${sideDrawerKey}/${newToken}`
Expand Down
11 changes: 4 additions & 7 deletions packages/features/vault/src/components/vault-side-drawer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { ToggleSwitchProps } from '@notional-finance/mui';
import { TransactionSidebar } from '@notional-finance/trade';
import { useHistory } from 'react-router';
import { messages } from '../messages';
import { VaultDetailsTable } from './vault-details-table';
import {
VaultContext,
useVaultProperties,
Expand Down Expand Up @@ -43,14 +42,12 @@ export const VaultSideDrawer = ({
showDrawer={false}
heading={messages[tradeType].heading}
advancedToggle={advancedToggle}
onCancelRouteCallback={() => history.push(`/vaults/${selectedNetwork}/${vaultAddress}`)}
onCancelRouteCallback={() =>
history.push(`/vaults/${selectedNetwork}/${vaultAddress}`)
}
hideTextOnMobile={false}
riskComponent={
tradeType === 'CreateVaultPosition' ? (
<CreateVaultLiquidationRisk key={'vault-risk-table'} state={state} />
) : (
<VaultDetailsTable key={'vault-risk-table'} />
)
<CreateVaultLiquidationRisk key={'vault-risk-table'} state={state} />
}
helptext={{
...messages[tradeType].helptext,
Expand Down
Loading
Loading