Skip to content

Commit 5e1900e

Browse files
committed
fix react-query cache name collision issue
1 parent fb88883 commit 5e1900e

File tree

3 files changed

+5
-10
lines changed

3 files changed

+5
-10
lines changed

src/containers/Vault/VaultHeader/index.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ export const VaultHeader = ({ data, vaultId, displayCurrency }: Props) => {
111111

112112
// Fetch MPTokenIssuance to get the DomainID (vault credential)
113113
const { data: mptIssuanceData } = useQuery(
114-
['getMPTIssuance', vaultShareMptId],
114+
['getVaultShareMPTIssuance', vaultShareMptId],
115115
async () => {
116116
if (!vaultShareMptId) return null
117117
const resp = await getMPTIssuance(rippledSocket, vaultShareMptId)
@@ -145,9 +145,7 @@ export const VaultHeader = ({ data, vaultId, displayCurrency }: Props) => {
145145

146146
const renderMPTSharesLink = () => {
147147
if (!vaultShareMptId) return '-'
148-
return (
149-
<Currency currency={vaultShareMptId} isMPT={true} link={true} />
150-
)
148+
return <Currency currency={vaultShareMptId} isMPT link />
151149
}
152150

153151
return (

src/containers/Vault/VaultHeader/test/VaultHeader.test.tsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -905,12 +905,10 @@ describe('VaultHeader Component', () => {
905905
</TestWrapper>,
906906
)
907907

908-
// Should display truncated ID: first 8 chars + "..." + last 6 chars
909-
// expectedTruncated = "SHARE123...DEF12"
910-
const expectedTruncated = `${shareMptId.substring(0, 8)}...${shareMptId.substring(shareMptId.length - 6)}`
911-
912908
// Verify link is present and href is correct
913-
const sharesLink = screen.getByRole('link', { name: expectedTruncated })
909+
const sharesLink = screen.getByRole('link', {
910+
name: `MPT (${shareMptId})`,
911+
})
914912
expect(sharesLink.getAttribute('href')).toBe(`/mpt/${shareMptId}`)
915913
})
916914

src/containers/shared/components/Account.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ export interface AccountProps {
1010

1111
export const Account = (props: AccountProps) => {
1212
const { account, displayText, link = true, tag } = props
13-
console.log(props)
1413
const parts = account.split(':')
1514
const computedTag = tag || parts[1]
1615

0 commit comments

Comments
 (0)