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