framepayments-react-native 2.0.8 → 2.0.9

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.
@@ -208,9 +208,9 @@ public class FrameSDKBridge: NSObject {
208
208
  accountId: accountId,
209
209
  requiredCapabilities: capabilities,
210
210
  applePayMerchantId: applePayMerchantId,
211
- onComplete: { [weak hosting] in
211
+ onComplete: { [weak top] in
212
212
  delegate?.finish(completed: true)
213
- hosting?.dismiss(animated: true)
213
+ top?.dismiss(animated: true)
214
214
  }
215
215
  ),
216
216
  theme: FrameRNTheme.resolved()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "framepayments-react-native",
3
- "version": "2.0.8",
3
+ "version": "2.0.9",
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",
@@ -148,14 +148,14 @@ describe('presentOnboarding', () => {
148
148
  it('calls native presentOnboarding with accountId and capabilities after initialize', async () => {
149
149
  await initialize({ secretKey: 'sk_xxx', publishableKey: 'pk_xxx' });
150
150
  const result = await presentOnboarding({ accountId: 'acct_1', capabilities: ['kyc', 'bank_account_verification'] });
151
- expect(mockPresentOnboarding).toHaveBeenCalledWith('acct_1', ['kyc', 'bank_account_verification'], null);
151
+ expect(mockPresentOnboarding).toHaveBeenCalledWith('acct_1', ['kyc', 'bank_account_verification']);
152
152
  expect(result).toEqual({ status: 'completed', paymentMethodId: 'pm_1' });
153
153
  });
154
154
 
155
155
  it('passes null for accountId and empty array for capabilities when not provided', async () => {
156
156
  await initialize({ secretKey: 'sk_xxx', publishableKey: 'pk_xxx' });
157
157
  await presentOnboarding({});
158
- expect(mockPresentOnboarding).toHaveBeenCalledWith(null, [], null);
158
+ expect(mockPresentOnboarding).toHaveBeenCalledWith(null, []);
159
159
  });
160
160
 
161
161
  it('routes to presentOnboardingWithApplePay on iOS when applePayMerchantId is set', async () => {
@@ -180,4 +180,11 @@ describe('presentOnboarding', () => {
180
180
  await presentOnboarding({ accountId: 'acct_1', capabilities: ['kyc'], googlePayMerchantId: 'BCR2DN4T...' });
181
181
  expect(mockPresentOnboarding).toHaveBeenCalledWith('acct_1', ['kyc'], 'BCR2DN4T...');
182
182
  });
183
+
184
+ it('does not forward googlePayMerchantId to native presentOnboarding on iOS', async () => {
185
+ mockPlatform.OS = 'ios';
186
+ await initialize({ secretKey: 'sk_xxx', publishableKey: 'pk_xxx' });
187
+ await presentOnboarding({ accountId: 'acct_1', capabilities: ['kyc'], googlePayMerchantId: 'BCR2DN4T...' });
188
+ expect(mockPresentOnboarding).toHaveBeenCalledWith('acct_1', ['kyc']);
189
+ });
183
190
  });