Преглед изворни кода

[0.21] Fix: kinobi error does not use optional account instruction name but InstructionNode (#204)

Arnau Espin пре 1 година
родитељ
комит
a6849d36a8
2 измењених фајлова са 6 додато и 1 уклоњено
  1. 5 0
      .changeset/chilly-numbers-teach.md
  2. 1 1
      packages/errors/src/messages.ts

+ 5 - 0
.changeset/chilly-numbers-teach.md

@@ -0,0 +1,5 @@
+---
+'@kinobi-so/errors': patch
+---
+
+Fix `KINOBI_ERROR__VISITORS__CANNOT_USE_OPTIONAL_ACCOUNT_AS_PDA_SEED_VALUE` instructionName string to actually print the instructionName.

+ 1 - 1
packages/errors/src/messages.ts

@@ -62,7 +62,7 @@ export const KinobiErrorMessages: Readonly<{
     [KINOBI_ERROR__VISITORS__CANNOT_FLATTEN_STRUCT_WITH_CONFLICTING_ATTRIBUTES]:
         'Cannot flatten struct since this would cause the following attributes to conflict [$conflictingAttributes].',
     [KINOBI_ERROR__VISITORS__CANNOT_USE_OPTIONAL_ACCOUNT_AS_PDA_SEED_VALUE]:
-        'Cannot use optional account [$seedValueName] as the [$seedName] PDA seed for the [$instructionAccountName] account of the [$instruction] instruction.',
+        'Cannot use optional account [$seedValueName] as the [$seedName] PDA seed for the [$instructionAccountName] account of the [$instructionName] instruction.',
     [KINOBI_ERROR__VISITORS__CYCLIC_DEPENDENCY_DETECTED_WHEN_RESOLVING_INSTRUCTION_DEFAULT_VALUES]:
         "Circular dependency detected when resolving the accounts and arguments' default values of the [$instructionName] instruction. Got the following dependency cycle [$formattedCycle].",
     [KINOBI_ERROR__VISITORS__FAILED_TO_VALIDATE_NODE]: 'Failed to validate the given node [$formattedHistogram].',