Skip to content

Commit

Permalink
Patches range exception bug when a specific authority type disables t…
Browse files Browse the repository at this point in the history
…he new authority property
  • Loading branch information
BifrostTitan committed Nov 24, 2022
1 parent a2161f9 commit 2f6d8dc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Solnet.Programs/TokenProgramData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,10 @@ internal static void DecodeSetAuthorityData(DecodedInstruction decodedInstructio
decodedInstruction.Values.Add("Current Authority", keys[keyIndices[1]]);
decodedInstruction.Values.Add("Authority Type", Enum.Parse(typeof(AuthorityType), data.GetU8(1).ToString()));
decodedInstruction.Values.Add("New Authority Option", data.GetU8(2));
decodedInstruction.Values.Add("New Authority", data.GetPubKey(3));
if (data.Length >= 34)
{
decodedInstruction.Values.Add("New Authority", data.GetPubKey(3));
}
for (int i = 2; i < keyIndices.Length; i++)
{
decodedInstruction.Values.Add($"Signer {i - 1}", keys[keyIndices[i]]);
Expand Down

0 comments on commit 2f6d8dc

Please sign in to comment.