diff --git a/Share/Info.plist b/Share/Info.plist
index 21a471347b..22f812c112 100644
--- a/Share/Info.plist
+++ b/Share/Info.plist
@@ -17,7 +17,7 @@
CFBundlePackageType
XPC!
CFBundleShortVersionString
- 5.12
+ $(PRODUCT_BUNDLE_SHORT_VERSION)
CFBundleVersion
${BUILD_NUMBER}
NSExtension
diff --git a/submodules/WalletUI/BUCK b/submodules/WalletUI/BUCK
index 5df0b63dba..3242bab028 100644
--- a/submodules/WalletUI/BUCK
+++ b/submodules/WalletUI/BUCK
@@ -28,6 +28,7 @@ static_library(
"//submodules/TelegramStringFormatting:TelegramStringFormatting",
"//submodules/GlassButtonNode:GlassButtonNode",
"//submodules/UrlHandling:UrlHandling",
+ "//submodules/UrlEscaping:UrlEscaping",
"//submodules/LocalAuth:LocalAuth",
],
frameworks = [
diff --git a/submodules/WalletUI/Sources/WalletReceiveScreen.swift b/submodules/WalletUI/Sources/WalletReceiveScreen.swift
index becdf73fe5..a714f856c8 100644
--- a/submodules/WalletUI/Sources/WalletReceiveScreen.swift
+++ b/submodules/WalletUI/Sources/WalletReceiveScreen.swift
@@ -11,6 +11,7 @@ import ItemListUI
import SwiftSignalKit
import OverlayStatusController
import ShareController
+import UrlEscaping
private final class WalletReceiveScreenArguments {
let context: AccountContext
@@ -275,7 +276,7 @@ private func walletReceiveScreenEntries(presentationData: PresentationData, addr
addressText = formatAddress(address)
addressMonospace = true
} else {
- addressText = invoiceUrl(address: address, state: state, escapeComment: false)
+ addressText = invoiceUrl(address: address, state: state, escapeComment: true)
}
entries.append(.address(presentationData.theme, addressText, addressMonospace))
entries.append(.copyAddress(presentationData.theme, state.isEmpty ? presentationData.strings.Wallet_Receive_CopyAddress : presentationData.strings.Wallet_Receive_CopyInvoiceUrl))
@@ -306,13 +307,9 @@ private func invoiceUrl(address: String, state: WalletReceiveScreenState, escape
arguments += arguments.isEmpty ? "?" : "&"
arguments += "amount=\(amountValue(state.amount))"
}
- if !state.comment.isEmpty, let escapedComment = state.comment.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed) {
+ if !state.comment.isEmpty {
arguments += arguments.isEmpty ? "?" : "&"
- if escapeComment {
- arguments += "text=\(escapedComment)"
- } else {
- arguments += "text=\(state.comment)"
- }
+ arguments += "text=\(urlEncodedStringFromString(state.comment))"
}
return "ton://transfer/\(address)\(arguments)"
}