diff --git a/package.json b/package.json index 04292349f1..38f080f888 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "build:android:release": "export NODE_OPTIONS=--openssl-legacy-provider && ./scripts/android-release.sh", "postbuild:android:release": "yarn reset:prod", "lint": "eslint --fix . --ext .js,.jsx,.ts,.tsx", - "validate": "tsc --noEmit --skipLibCheck 2>&1 | grep -v node_modules | grep -E 'TS(2304|2693|2349|2351|2448|2554|2307|2454|2305|2774)' && exit 1 || exit 0", + "validate": "tsc --noEmit --skipLibCheck 2>&1 | grep -v node_modules | grep -E 'TS(2304|2693|2349|2351|2448|2554|2307|2454|2305|2774|2532|18048)' && exit 1 || exit 0", "prettier": "prettier --write \"src/**/*.{js,jsx,ts,tsx}\"", "prettier:check": "prettier --check \"src/**/*.{js,jsx,ts,tsx}\"", "postinstall": "./scripts/postinstall.sh", diff --git a/src/navigation/tabs/home/components/AssetRow.tsx b/src/navigation/tabs/home/components/AssetRow.tsx index b1a9e9700b..ece4fdb5bf 100644 --- a/src/navigation/tabs/home/components/AssetRow.tsx +++ b/src/navigation/tabs/home/components/AssetRow.tsx @@ -182,7 +182,8 @@ const AssetRow: React.FC = ({ const [loadingDelayElapsed, setLoadingDelayElapsed] = useState(false); const preservedEntry = lastSettledItemRef.current; const preservedItem = - preservedEntry?.presentationResetToken === presentationResetToken + preservedEntry && + preservedEntry.presentationResetToken === presentationResetToken ? preservedEntry.item : undefined; diff --git a/src/navigation/wallet/screens/send/confirm/BillConfirm.tsx b/src/navigation/wallet/screens/send/confirm/BillConfirm.tsx index f236007b43..0f9f5f6991 100644 --- a/src/navigation/wallet/screens/send/confirm/BillConfirm.tsx +++ b/src/navigation/wallet/screens/send/confirm/BillConfirm.tsx @@ -454,7 +454,9 @@ const BillConfirm: React.FC< showPaymentSent({ onCloseModal, title: - wallet?.credentials?.n > 1 ? t('Payment Sent') : t('Payment Accepted'), + (wallet?.credentials?.n ?? 0) > 1 + ? t('Payment Sent') + : t('Payment Accepted'), }); dispatch(ShopEffects.startFindBillPayments()).catch(_ => {}); dispatch( diff --git a/src/navigation/wallet/screens/send/confirm/DebitCardConfirm.tsx b/src/navigation/wallet/screens/send/confirm/DebitCardConfirm.tsx index a55079b682..2090efb4c7 100644 --- a/src/navigation/wallet/screens/send/confirm/DebitCardConfirm.tsx +++ b/src/navigation/wallet/screens/send/confirm/DebitCardConfirm.tsx @@ -279,7 +279,9 @@ const Confirm = () => { showPaymentSent({ onCloseModal, title: - wallet?.credentials?.n > 1 ? t('Payment Sent') : t('Payment Accepted'), + (wallet?.credentials?.n ?? 0) > 1 + ? t('Payment Sent') + : t('Payment Accepted'), }); await sleep(1200); diff --git a/src/store/wallet-connect-v2/wallet-connect-v2.effects.ts b/src/store/wallet-connect-v2/wallet-connect-v2.effects.ts index 1be7ab885d..28d09c4933 100644 --- a/src/store/wallet-connect-v2/wallet-connect-v2.effects.ts +++ b/src/store/wallet-connect-v2/wallet-connect-v2.effects.ts @@ -176,7 +176,7 @@ export const walletConnectV2Init = (): Effect => async (dispatch, getState) => { Object.values(activeSessions).forEach(activeSession => { if ( - sessions.length && + sessions?.length && !sessions.some(s => s.topic === activeSession.topic) ) { dispatch(walletConnectV2OnDeleteSession(activeSession.topic)); @@ -513,7 +513,7 @@ export const walletConnectV2SubscribeToEvents = ); const requests: WCV2RequestType[] | undefined = getState().WALLET_CONNECT_V2.requests; - const request = requests.find(({id}) => id === event.id); + const request = requests?.find(({id}) => id === event.id); if (request) { await dispatch(walletConnectV2RejectCallRequest(request)); }