ts: Fix accounts iterable (#573)
This commit is contained in:
parent
21cc98517a
commit
4e7790eacf
|
@ -90,7 +90,7 @@ export class InstructionCoder {
|
|||
let fieldLayouts = m.args.map((arg: IdlField) => {
|
||||
return IdlCoder.fieldLayout(
|
||||
arg,
|
||||
Array.from([...idl.accounts, ...(idl.types ?? [])])
|
||||
Array.from([...(idl.accounts ?? []), ...(idl.types ?? [])])
|
||||
);
|
||||
});
|
||||
const name = camelCase(m.name);
|
||||
|
@ -101,7 +101,7 @@ export class InstructionCoder {
|
|||
let fieldLayouts = ix.args.map((arg: IdlField) =>
|
||||
IdlCoder.fieldLayout(
|
||||
arg,
|
||||
Array.from([...idl.accounts, ...(idl.types ?? [])])
|
||||
Array.from([...(idl.accounts ?? []), ...(idl.types ?? [])])
|
||||
)
|
||||
);
|
||||
const name = camelCase(ix.name);
|
||||
|
|
Loading…
Reference in New Issue