Skip to content

Commit

Permalink
Fix empty comment and jetton transfer
Browse files Browse the repository at this point in the history
  • Loading branch information
voloshinskii committed Oct 2, 2024
1 parent 35835af commit aae2414
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Source/TonSwift/Jettons/JettonTransferMessage.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ public struct JettonTransferMessage {
let queryId = UInt64(Date().timeIntervalSince1970)

var commentCell: Cell?
if let comment = comment {
commentCell = try Builder().store(int: 0, bits: 32).writeSnakeData(Data(comment.utf8)).endCell()
if comment != nil && comment != "" {
commentCell = try Builder().store(int: 0, bits: 32).writeSnakeData(Data(comment!.utf8)).endCell()
}

let jettonTransferData = JettonTransferData(queryId: queryId,
Expand Down

0 comments on commit aae2414

Please sign in to comment.