Skip to content

Commit 2b85422

Browse files
committed
fix: allow for null to be parsed as scVoid for scOption
1 parent e78e5e1 commit 2b85422

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/contract/spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -640,7 +640,7 @@ export class Spec {
640640
}
641641
if (value === xdr.ScSpecType.scSpecTypeOption().value) {
642642
const opt = ty.option();
643-
if (val === undefined) {
643+
if (val === null || val === undefined) {
644644
return xdr.ScVal.scvVoid();
645645
}
646646
return this.nativeToScVal(val, opt.valueType());

0 commit comments

Comments
 (0)