Browse Source

ts: fix formatIdlData for option defined type (#1439)

Totoro 3 years ago
parent
commit
9c49e7642d
1 changed files with 2 additions and 1 deletions
  1. 2 1
      ts/src/coder/borsh/instruction.ts

+ 2 - 1
ts/src/coder/borsh/instruction.ts

@@ -269,7 +269,8 @@ class InstructionFormatter {
         ? "null"
         : this.formatIdlData(
             { name: "", type: (<IdlTypeOption>idlField.type).option },
-            data
+            data,
+            types
           );
     }
     if (idlField.type.hasOwnProperty("defined")) {