Skip to content

Commit

Permalink
[explorer] Fix parsing of some Pyth transactions. (#29943)
Browse files Browse the repository at this point in the history
Fix a couple of bugs
  • Loading branch information
guibescos authored Jan 31, 2023
1 parent 005dc96 commit c606d9b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
8 changes: 8 additions & 0 deletions explorer/src/components/instruction/pyth/PythDetailsCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -109,6 +110,13 @@ export function PythDetailsCard(props: {
{...props}
/>
);
case "SetMinPublishers":
return (
<SetMinPublishersDetailsCard
info={PythInstruction.decodeSetMinPublishers(ix)}
{...props}
/>
);
}
} catch (error) {
reportError(error, {
Expand Down
4 changes: 2 additions & 2 deletions explorer/src/components/instruction/pyth/program.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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),
};
}

Expand All @@ -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),
};
}

Expand Down

1 comment on commit c606d9b

@anza-team
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deploy preview for explorer ready!

✅ Preview
https://explorer-d1215cebc-solana-labs.vercel.app

Built with commit c606d9b.
This pull request is being automatically deployed with vercel-action

Please sign in to comment.