Skip to content

Commit 95ff4ff

Browse files
committed
Fix constructor id (#77)
1 parent b160b34 commit 95ff4ff

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

ton-kotlin-contract/src/commonMain/kotlin/org/ton/contract/wallet/WalletV4R2Contract.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ public class WalletV4R2Contract private constructor(
180180
Either.of<StateInit, CellRef<StateInit>>(null, CellRef(it))
181181
})
182182
val body = if (gift.body == null) {
183-
Either.of<Cell, CellRef<Cell>>(Cell.of(), null)
183+
Either.of<Cell, CellRef<Cell>>(Cell.empty(), null)
184184
} else {
185185
Either.of<Cell, CellRef<Cell>>(null, CellRef(gift.body))
186186
}

ton-kotlin-liteapi/src/commonMain/kotlin/org/ton/lite/api/liteserver/LiteServerTransactionList.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@ private object LiteServerTransactionListTlConstructor : TlConstructor<LiteServer
4141
return LiteServerTransactionList(ids, transactions)
4242
}
4343

44-
override fun encode(output: TlWriter, value: LiteServerTransactionList) {
45-
output.writeVector(value.ids) {
44+
override fun encode(writer: TlWriter, value: LiteServerTransactionList) {
45+
writer.writeVector(value.ids) {
4646
write(TonNodeBlockIdExt, it)
4747
}
48-
output.writeBytes(value.transactions)
48+
writer.writeBytes(value.transactions)
4949
}
5050
}

ton-kotlin-tl/src/commonMain/kotlin/org/ton/tl/TlConstructor.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public abstract class TlConstructor<T : Any>(
1515
.replace(";", "")
1616
}
1717
public val id: Int by lazy(LazyThreadSafetyMode.PUBLICATION) {
18-
id ?: crc32(schema.toByteArray())
18+
id ?: crc32(this.schema.toByteArray())
1919
}
2020

2121
override fun encodeBoxed(writer: TlWriter, value: T) {

0 commit comments

Comments
 (0)