From aae2414b4eb4f21146066cdc94f93268ec54e1ed Mon Sep 17 00:00:00 2001 From: Max Voloshinskii Date: Wed, 2 Oct 2024 06:29:56 +0300 Subject: [PATCH] Fix empty comment and jetton transfer --- Source/TonSwift/Jettons/JettonTransferMessage.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/TonSwift/Jettons/JettonTransferMessage.swift b/Source/TonSwift/Jettons/JettonTransferMessage.swift index a14497d..bc66be8 100644 --- a/Source/TonSwift/Jettons/JettonTransferMessage.swift +++ b/Source/TonSwift/Jettons/JettonTransferMessage.swift @@ -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,