From c606d9b167b176d7cc939c06e1dce5e4bcd44329 Mon Sep 17 00:00:00 2001 From: guibescos <59208140+guibescos@users.noreply.github.com> Date: Mon, 30 Jan 2023 21:23:12 -0600 Subject: [PATCH] [explorer] Fix parsing of some Pyth transactions. (#29943) Fix a couple of bugs --- .../src/components/instruction/pyth/PythDetailsCard.tsx | 8 ++++++++ explorer/src/components/instruction/pyth/program.ts | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/explorer/src/components/instruction/pyth/PythDetailsCard.tsx b/explorer/src/components/instruction/pyth/PythDetailsCard.tsx index 41c8a9908..1e360cb47 100644 --- a/explorer/src/components/instruction/pyth/PythDetailsCard.tsx +++ b/explorer/src/components/instruction/pyth/PythDetailsCard.tsx @@ -13,6 +13,7 @@ import InitMappingDetailsCard from "./InitMappingDetailsCard"; import AddMappingDetailsCard from "./AddMappingDetailsCard"; import AggregatePriceDetailsCard from "./AggregatePriceDetailsCard"; import InitPriceDetailsCard from "./InitPriceDetailsCard"; +import SetMinPublishersDetailsCard from "./SetMinPublishersDetailsCard"; export function PythDetailsCard(props: { ix: TransactionInstruction; @@ -109,6 +110,13 @@ export function PythDetailsCard(props: { {...props} /> ); + case "SetMinPublishers": + return ( + + ); } } catch (error) { reportError(error, { diff --git a/explorer/src/components/instruction/pyth/program.ts b/explorer/src/components/instruction/pyth/program.ts index ecc4b8159..ec61d5bcb 100644 --- a/explorer/src/components/instruction/pyth/program.ts +++ b/explorer/src/components/instruction/pyth/program.ts @@ -402,7 +402,7 @@ export class PythInstruction { return { signerPubkey: instruction.keys[0].pubkey, pricePubkey: instruction.keys[1].pubkey, - publisherPubkey: PublicKey.decode(publisherPubkey), + publisherPubkey: new PublicKey(publisherPubkey), }; } @@ -420,7 +420,7 @@ export class PythInstruction { return { signerPubkey: instruction.keys[0].pubkey, pricePubkey: instruction.keys[1].pubkey, - publisherPubkey: PublicKey.decode(publisherPubkey), + publisherPubkey: new PublicKey(publisherPubkey), }; }