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.
@@ -110,8 +110,7 @@ public class FrameSDKBridge: NSObject {
110
110
  hosting = CheckoutHostingController(rootView: FrameCheckoutView(
111
111
  accountId: accountId,
112
112
  paymentAmount: amount,
113
- checkoutCallback: { [weak hosting] success, transferId in
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "framepayments-react-native",
3
- "version": "2.2.0",
3
+ "version": "2.2.1",
4
4
  "description": "React Native SDK for Frame Payments - modal checkout and cart, with API usage via frame-node.",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",