Compare commits

...

2 Commits

Author SHA1 Message Date
Matthew Russell
e21b71fc84
chore: remove unnecessary ts-ignores 2024-02-20 09:24:17 -08:00
Matthew Russell
e941665a29
fix: cache instrument by code 2024-02-20 08:54:17 -08:00
2 changed files with 18 additions and 24 deletions

View File

@ -62,6 +62,9 @@ const cache: InMemoryCacheConfig = {
Account: {
keyFields: false,
},
Instrument: {
keyFields: ['code'],
},
Delegation: {
keyFields: false,
// Only get full updates

View File

@ -140,6 +140,9 @@ const ProposalDetails = ({
);
}
case 'UpdateMarketState': {
const marketPageLink = consoleLink(
CONSOLE_MARKET_PAGE.replace(':marketId', terms.change.market.id)
);
return (
<span>
{featureFlags.UPDATE_MARKET_STATE &&
@ -161,24 +164,16 @@ const ProposalDetails = ({
</button>
</CopyWithTooltip>
<Tooltip description={t('OpenInConsole')} align="center">
<button
<Link
className="inline-block px-1"
onClick={() => {
const marketPageLink = consoleLink(
CONSOLE_MARKET_PAGE.replace(
':marketId',
// @ts-ignore ts doesn't like this field even though its already a string above???
terms.change.market.id
)
);
window.open(marketPageLink, '_blank');
}}
to={marketPageLink}
target="_blank"
>
<VegaIcon
size={20}
name={VegaIconNames.OPEN_EXTERNAL}
/>
</button>
</Link>
</Tooltip>
</span>
</span>
@ -188,6 +183,10 @@ const ProposalDetails = ({
);
}
case 'UpdateMarket': {
const marketPageLink = consoleLink(
CONSOLE_MARKET_PAGE.replace(':marketId', terms.change.marketId)
);
return (
<>
<span>{t('UpdateToMarket')}: </span>
@ -205,21 +204,13 @@ const ProposalDetails = ({
</button>
</CopyWithTooltip>
<Tooltip description={t('OpenInConsole')} align="center">
<button
<Link
className="inline-block px-1"
onClick={() => {
const marketPageLink = consoleLink(
CONSOLE_MARKET_PAGE.replace(
':marketId',
// @ts-ignore ts doesn't like this field even though its already a string above???
terms.change.marketId
)
);
window.open(marketPageLink, '_blank');
}}
target="_blank"
to={marketPageLink}
>
<VegaIcon size={20} name={VegaIconNames.OPEN_EXTERNAL} />
</button>
</Link>
</Tooltip>
</span>
</span>