From 8e5dcf56eabb6d9e16d2ce4d1900641c709b0727 Mon Sep 17 00:00:00 2001 From: Jordan Prince Date: Mon, 7 Jun 2021 15:30:21 -0400 Subject: [PATCH] Fix tiny b ug in data layer where accounts from one program get parsed as messed up versions of accounts from another program because key enum matches --- js/packages/web/src/contexts/meta.tsx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/js/packages/web/src/contexts/meta.tsx b/js/packages/web/src/contexts/meta.tsx index 3fa3e77..766a1fd 100644 --- a/js/packages/web/src/contexts/meta.tsx +++ b/js/packages/web/src/contexts/meta.tsx @@ -578,6 +578,8 @@ const processAuctions = ( setBidderMetadataByAuctionAndBidder: any, setBidderPotsByAuctionAndBidder: any, ) => { + if (a.account.owner.toBase58() != programIds().auction.toBase58()) return; + try { const account = cache.add( a.pubkey, @@ -640,6 +642,8 @@ const processMetaplexAccounts = async ( setStore: any, setWhitelistedCreatorsByCreator: any, ) => { + if (a.account.owner.toBase58() != programIds().metaplex.toBase58()) return; + try { const STORE_ID = programIds().store.toBase58(); @@ -740,6 +744,8 @@ const processMetaData = async ( setmasterEditionsByPrintingMint: any, setMasterEditionsByOneTimeAuthMint: any, ) => { + if (meta.account.owner.toBase58() != programIds().metadata.toBase58()) return; + try { if ( meta.account.data[0] === MetadataKey.MetadataV1 || @@ -804,6 +810,7 @@ const processVaultData = ( setSafetyDepositBoxesByVaultAndIndex: any, setVaults: any, ) => { + if (a.account.owner.toBase58() != programIds().vault.toBase58()) return; try { if (a.account.data[0] === VaultKey.SafetyDepositBoxV1) { const safetyDeposit = decodeSafetyDeposit(a.account.data);