Skip to content

Commit

Permalink
fix for longToByteArray support in JS
Browse files Browse the repository at this point in the history
  • Loading branch information
kushti committed Sep 17, 2024
1 parent 7e3b676 commit 4343bc9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
8 changes: 8 additions & 0 deletions data/shared/src/main/scala/sigma/SigmaDataReflection.scala
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,14 @@ object SigmaDataReflection {
)
)

registerClassEntry(classOf[LongToByteArray],
constructors = Array(
mkConstructor(Array(classOf[Value[_]])) { args =>
new LongToByteArray(args(0).asInstanceOf[Value[SLong.type]])
}
)
)

registerClassEntry(classOf[CalcBlake2b256],
constructors = Array(
mkConstructor(Array(classOf[Value[_]])) { args =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,8 +213,8 @@ class BasicOpsSpecification extends CompilerTestingCommons
deserTest()
}
}

property("serialize(long) is producing different result from longToByteArray()") {
property("serialize(long) is producing different result from longToByteArray()") {
def deserTest() = test("serialize", env, ext,
s"""{
val l = -1000L
Expand Down

0 comments on commit 4343bc9

Please sign in to comment.