diff --git a/Code.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/Code.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 54b6f3957..06040ef0d 100644 --- a/Code.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/Code.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -1,5 +1,5 @@ { - "originHash" : "0949e333ed9deff2d24a867708577c820b601cd4655fa62ed4d469a4d88f6147", + "originHash" : "f17a20c394cb2f9ff4303f14ce7697f1acc08d81d8439e2b02f2289ea87dc0aa", "pins" : [ { "identity" : "abseil-cpp-binary", @@ -357,8 +357,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/apple/swift-nio-http2.git", "state" : { - "revision" : "61d1b44f6e4e118792be1cff88ee2bc0267c6f9a", - "version" : "1.44.0" + "revision" : "0f3e54e29c944c2e835ad52159da7d9e1c94ac69", + "version" : "1.46.0" } }, { @@ -411,8 +411,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/apple/swift-system.git", "state" : { - "revision" : "7c6ad0fc39d0763e0b699210e4124afd5041c5df", - "version" : "1.6.4" + "revision" : "869129b7bf4ecc57b97d0193ad29690ca2134750", + "version" : "1.8.1" } }, { diff --git a/Flipcash/Core/Screens/PaymentRequest/PaymentRequestPayment.swift b/Flipcash/Core/Screens/PaymentRequest/PaymentRequestPayment.swift index 605071e20..d726df249 100644 --- a/Flipcash/Core/Screens/PaymentRequest/PaymentRequestPayment.swift +++ b/Flipcash/Core/Screens/PaymentRequest/PaymentRequestPayment.swift @@ -152,8 +152,9 @@ final class PaymentRequestPayment { return .failed } - // Backstop: the balance can drop between the pre-check and the swipe. - switch session.hasSufficientFunds(for: amount) { + // Gate on the uncapped share: `amount` is capped at the balance, so it always passes. + let uncapped = selectedBalance.enteredFiat(for: fiat.value, rate: pin.rate) ?? amount + switch session.hasSufficientFunds(for: uncapped) { case .insufficient(let shortfall): showInsufficientFunds(shortfall: shortfall) return .failed @@ -218,8 +219,8 @@ final class PaymentRequestPayment { private func showInsufficientFunds(shortfall: ExchangedFiat?) { let title = shortfall.map { "You're \($0.nativeAmount.formatted()) Short" } ?? "You Need More Cash" let subtitle = shortfall == nil - ? "Please add more cash, or try again with a lower amount" - : "Add more cash, or try again with a lower amount" + ? "Please add more cash, or select a different Community Currency" + : "Add more cash, or select a different Community Currency" session.dialogItem = .error(title: title, subtitle: subtitle) { .destructive("Add More Cash") { [weak self] in self?.depositMint = self?.selectedBalance?.stored.mint