Merge pull request #27 from metaplex-foundation/various-patches

Fix tiny b ug in data layer where accounts from one program get parse…
This commit is contained in:
B 2021-06-07 14:33:10 -05:00 committed by GitHub
commit 34d5f42361
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 0 deletions

View File

@ -578,6 +578,8 @@ const processAuctions = (
setBidderMetadataByAuctionAndBidder: any, setBidderMetadataByAuctionAndBidder: any,
setBidderPotsByAuctionAndBidder: any, setBidderPotsByAuctionAndBidder: any,
) => { ) => {
if (a.account.owner.toBase58() != programIds().auction.toBase58()) return;
try { try {
const account = cache.add( const account = cache.add(
a.pubkey, a.pubkey,
@ -640,6 +642,8 @@ const processMetaplexAccounts = async (
setStore: any, setStore: any,
setWhitelistedCreatorsByCreator: any, setWhitelistedCreatorsByCreator: any,
) => { ) => {
if (a.account.owner.toBase58() != programIds().metaplex.toBase58()) return;
try { try {
const STORE_ID = programIds().store.toBase58(); const STORE_ID = programIds().store.toBase58();
@ -740,6 +744,8 @@ const processMetaData = async (
setmasterEditionsByPrintingMint: any, setmasterEditionsByPrintingMint: any,
setMasterEditionsByOneTimeAuthMint: any, setMasterEditionsByOneTimeAuthMint: any,
) => { ) => {
if (meta.account.owner.toBase58() != programIds().metadata.toBase58()) return;
try { try {
if ( if (
meta.account.data[0] === MetadataKey.MetadataV1 || meta.account.data[0] === MetadataKey.MetadataV1 ||
@ -804,6 +810,7 @@ const processVaultData = (
setSafetyDepositBoxesByVaultAndIndex: any, setSafetyDepositBoxesByVaultAndIndex: any,
setVaults: any, setVaults: any,
) => { ) => {
if (a.account.owner.toBase58() != programIds().vault.toBase58()) return;
try { try {
if (a.account.data[0] === VaultKey.SafetyDepositBoxV1) { if (a.account.data[0] === VaultKey.SafetyDepositBoxV1) {
const safetyDeposit = decodeSafetyDeposit(a.account.data); const safetyDeposit = decodeSafetyDeposit(a.account.data);