framepayments-react-native 2.2.0 → 2.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ios/FrameSDKBridge.swift +1 -12
- package/package.json +1 -1
package/ios/FrameSDKBridge.swift
CHANGED
|
@@ -110,8 +110,7 @@ public class FrameSDKBridge: NSObject {
|
|
|
110
110
|
hosting = CheckoutHostingController(rootView: FrameCheckoutView(
|
|
111
111
|
accountId: accountId,
|
|
112
112
|
paymentAmount: amount,
|
|
113
|
-
checkoutCallback: {
|
|
114
|
-
hosting?.didComplete = true
|
|
113
|
+
checkoutCallback: { success, transferId in
|
|
115
114
|
top.dismiss(animated: true)
|
|
116
115
|
DispatchQueue.main.async {
|
|
117
116
|
if success, let transferId {
|
|
@@ -122,11 +121,6 @@ public class FrameSDKBridge: NSObject {
|
|
|
122
121
|
}
|
|
123
122
|
}
|
|
124
123
|
))
|
|
125
|
-
hosting.onCancel = {
|
|
126
|
-
DispatchQueue.main.async {
|
|
127
|
-
reject("USER_CANCELED", "User dismissed checkout without completing payment", nil)
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
124
|
hosting.modalPresentationStyle = UIModalPresentationStyle.pageSheet
|
|
131
125
|
if let sheet = hosting.sheetPresentationController {
|
|
132
126
|
sheet.detents = [UISheetPresentationController.Detent.large()]
|
|
@@ -249,11 +243,6 @@ private final class CheckoutHostingController: UIHostingController<FrameCheckout
|
|
|
249
243
|
cancelled = true
|
|
250
244
|
onCancel?()
|
|
251
245
|
}
|
|
252
|
-
|
|
253
|
-
func presentationControllerDidDismiss(_ presentationController: UIPresentationController) {
|
|
254
|
-
guard presentationController.presentedViewController === self else { return }
|
|
255
|
-
cancel()
|
|
256
|
-
}
|
|
257
246
|
}
|
|
258
247
|
|
|
259
248
|
// MARK: - OnboardingHostingController
|
package/package.json
CHANGED