From e532f88daa123731c731b0854b7a3ad1f3acc900 Mon Sep 17 00:00:00 2001 From: Matthew Russell Date: Tue, 20 Feb 2024 13:00:51 -0500 Subject: [PATCH] fix(governance): market name component not showing correct instrument code (#5830) --- apps/governance/src/app.tsx | 3 ++ .../proposal-header.tsx | 39 +++++++------------ 2 files changed, 18 insertions(+), 24 deletions(-) diff --git a/apps/governance/src/app.tsx b/apps/governance/src/app.tsx index e16b43610..f81db9e1f 100644 --- a/apps/governance/src/app.tsx +++ b/apps/governance/src/app.tsx @@ -62,6 +62,9 @@ const cache: InMemoryCacheConfig = { Account: { keyFields: false, }, + Instrument: { + keyFields: ['code'], + }, Delegation: { keyFields: false, // Only get full updates diff --git a/apps/governance/src/routes/proposals/components/proposal-detail-header/proposal-header.tsx b/apps/governance/src/routes/proposals/components/proposal-detail-header/proposal-header.tsx index 7d280d7e9..dc0f676e4 100644 --- a/apps/governance/src/routes/proposals/components/proposal-detail-header/proposal-header.tsx +++ b/apps/governance/src/routes/proposals/components/proposal-detail-header/proposal-header.tsx @@ -140,6 +140,9 @@ const ProposalDetails = ({ ); } case 'UpdateMarketState': { + const marketPageLink = consoleLink( + CONSOLE_MARKET_PAGE.replace(':marketId', terms.change.market.id) + ); return ( {featureFlags.UPDATE_MARKET_STATE && @@ -161,24 +164,16 @@ const ProposalDetails = ({ - + @@ -188,6 +183,10 @@ const ProposalDetails = ({ ); } case 'UpdateMarket': { + const marketPageLink = consoleLink( + CONSOLE_MARKET_PAGE.replace(':marketId', terms.change.marketId) + ); + return ( <> {t('UpdateToMarket')}: @@ -205,21 +204,13 @@ const ProposalDetails = ({ - +