@swype-org/react-sdk 0.1.6 → 0.1.7

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/dist/index.cjs CHANGED
@@ -2214,7 +2214,10 @@ function SwypePayment({
2214
2214
  });
2215
2215
  setTransfer(t);
2216
2216
  if (t.authorizationSessions && t.authorizationSessions.length > 0) {
2217
- if (isMobile()) {
2217
+ const selectedAccount = accounts.find((a) => a.id === selectedAccountId);
2218
+ const selectedWallet = selectedWalletId ? selectedAccount?.wallets.find((w) => w.id === selectedWalletId) : null;
2219
+ const isWalletAuthorized = selectedWallet?.status === "ACTIVE";
2220
+ if (isMobile() && !isWalletAuthorized) {
2218
2221
  setMobileFlow(true);
2219
2222
  pollingTransferIdRef.current = t.id;
2220
2223
  polling.startPolling(t.id);
@@ -2245,7 +2248,10 @@ function SwypePayment({
2245
2248
  authExecutor,
2246
2249
  transferSigning,
2247
2250
  polling,
2248
- onError
2251
+ onError,
2252
+ accounts,
2253
+ selectedAccountId,
2254
+ selectedWalletId
2249
2255
  ]);
2250
2256
  const handleNewPayment = () => {
2251
2257
  setStep("ready");