[renderers-js-umi] Missing 'eddsa' context at instruction render with pdaValueNode
myx0m0p opened this issue · 2 comments
myx0m0p commented
While generating client with js-umi rendered, eddsa context isn't picked for context arg.
Kinobi IDL:
| | instructionNode [setPauseV1]
| | | instructionAccountNode [fusionData.writable]
| | | | pdaValueNode
| | | | | pdaNode [fusionData]
| | | | | | constantPdaSeedNode
| | | | | | | bytesTypeNode
| | | | | | | bytesValueNode [base16.667573696f6e5f64617461]
| | | instructionAccountNode [authority.writable.signer]
| | | | identityValueNode
| | | instructionArgumentNode [discriminator]
| | | | fixedSizeTypeNode [8]
| | | | | bytesTypeNode
| | | | bytesValueNode [base16.48aed1c673030480]
| | | instructionArgumentNode [paused]
| | | | booleanTypeNode
| | | | | numberTypeNode [u8]
| | | fieldDiscriminatorNode [discriminator]
Generated instruction signature:
// Instruction.
export function setPauseV1(
context: Pick<Context, 'identity' | 'programs'>,
input: SetPauseV1InstructionAccounts & SetPauseV1InstructionArgs
): TransactionBuilder
Defaults from pda node:
// Default values.
if (!resolvedAccounts.fusionData.value) {
resolvedAccounts.fusionData.value = context.eddsa.findPda(programId, [
bytes().serialize(
new Uint8Array([102, 117, 115, 105, 111, 110, 95, 100, 97, 116, 97])
),
]);
}
This leads to typescript compilation error.
Related part of the code:
I'm not sure adding interfaces.add('eddsa');
before return would be good.
lorisleiva commented
Hey, thanks for reporting this! I will fix asap. 🙏
lorisleiva commented
This is currently publishing as @kinobi-so/renderers-js-umi@0.21.1
. Thanks again for your help reporting this. 🍺