From bc19a5bc29d0851a4b99f23362dd2e879fa3b225 Mon Sep 17 00:00:00 2001 From: Jimmy Date: Wed, 14 May 2025 11:16:04 +0800 Subject: [PATCH] Minor QR optimizations --- .env | 4 ++-- .../metadata/android/en-US/changelogs/432.txt | 1 + .../metadata/android/fr-FR/changelogs/432.txt | 1 + package-lock.json | 17 -------------- package.json | 2 -- patches/bcrypt-react-native+1.1.1.patch | 23 ------------------- src/screens/Invoice/Invoice.tsx | 2 +- src/screens/Signup/Signup.tsx | 8 ++----- src/utils/bcrypt/bcrypt.native.ts | 3 --- src/utils/bcrypt/bcrypt.ts | 12 ---------- src/utils/bcrypt/index.ts | 1 - src/utils/index.ts | 1 - 12 files changed, 7 insertions(+), 68 deletions(-) create mode 100644 fastlane/metadata/android/en-US/changelogs/432.txt create mode 100644 fastlane/metadata/android/fr-FR/changelogs/432.txt delete mode 100644 patches/bcrypt-react-native+1.1.1.patch delete mode 100644 src/utils/bcrypt/bcrypt.native.ts delete mode 100644 src/utils/bcrypt/bcrypt.ts delete mode 100644 src/utils/bcrypt/index.ts diff --git a/.env b/.env index 61b56ac0..a60be61e 100644 --- a/.env +++ b/.env @@ -1,3 +1,3 @@ -APP_VERSION=2.5.4 +APP_VERSION=2.5.5 -APP_BUILD_NUMBER=431 \ No newline at end of file +APP_BUILD_NUMBER=432 \ No newline at end of file diff --git a/fastlane/metadata/android/en-US/changelogs/432.txt b/fastlane/metadata/android/en-US/changelogs/432.txt new file mode 100644 index 00000000..7bd29bee --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/432.txt @@ -0,0 +1 @@ +- Minor improvements and optimizations \ No newline at end of file diff --git a/fastlane/metadata/android/fr-FR/changelogs/432.txt b/fastlane/metadata/android/fr-FR/changelogs/432.txt new file mode 100644 index 00000000..59408cff --- /dev/null +++ b/fastlane/metadata/android/fr-FR/changelogs/432.txt @@ -0,0 +1 @@ +- Améliorations et optimisations mineures \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 1af92291..f277340d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -36,8 +36,6 @@ "@sentry/webpack-plugin": "3.1.2", "@yudiel/react-qr-scanner": "2.1.0", "axios": "1.7.9", - "bcrypt-react-native": "1.1.1", - "bcryptjs": "3.0.0", "bech32": "2.0.0", "bip322-js": "2.0.0", "bip39": "3.1.0", @@ -9646,21 +9644,6 @@ "dev": true, "license": "MIT" }, - "node_modules/bcrypt-react-native": { - "version": "1.1.1", - "license": "MIT", - "peerDependencies": { - "react": "*", - "react-native": "*" - } - }, - "node_modules/bcryptjs": { - "version": "3.0.0", - "license": "BSD-3-Clause", - "bin": { - "bcrypt": "bin/bcrypt" - } - }, "node_modules/bech32": { "version": "2.0.0", "license": "MIT" diff --git a/package.json b/package.json index 6efeb5e8..b467032c 100644 --- a/package.json +++ b/package.json @@ -44,8 +44,6 @@ "@sentry/webpack-plugin": "3.1.2", "@yudiel/react-qr-scanner": "2.1.0", "axios": "1.7.9", - "bcrypt-react-native": "1.1.1", - "bcryptjs": "3.0.0", "bech32": "2.0.0", "bip322-js": "2.0.0", "bip39": "3.1.0", diff --git a/patches/bcrypt-react-native+1.1.1.patch b/patches/bcrypt-react-native+1.1.1.patch deleted file mode 100644 index e7780399..00000000 --- a/patches/bcrypt-react-native+1.1.1.patch +++ /dev/null @@ -1,23 +0,0 @@ -diff --git a/node_modules/bcrypt-react-native/android/build.gradle b/node_modules/bcrypt-react-native/android/build.gradle -index 20928cf..216f0b1 100644 ---- a/node_modules/bcrypt-react-native/android/build.gradle -+++ b/node_modules/bcrypt-react-native/android/build.gradle -@@ -48,6 +48,8 @@ android { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 - } -+ -+ namespace "com.bcryptreactnative" - } - - repositories { -diff --git a/node_modules/bcrypt-react-native/android/src/main/AndroidManifest.xml b/node_modules/bcrypt-react-native/android/src/main/AndroidManifest.xml -index 7226f6f..0a0938a 100644 ---- a/node_modules/bcrypt-react-native/android/src/main/AndroidManifest.xml -+++ b/node_modules/bcrypt-react-native/android/src/main/AndroidManifest.xml -@@ -1,4 +1,3 @@ -- -+ - - diff --git a/src/screens/Invoice/Invoice.tsx b/src/screens/Invoice/Invoice.tsx index 1f06d50c..b37828f7 100644 --- a/src/screens/Invoice/Invoice.tsx +++ b/src/screens/Invoice/Invoice.tsx @@ -745,7 +745,7 @@ export const Invoice = () => { const downloadPdfLink = useMemo( () => - `${apiRootUrl}/pdf/${invoiceId}?&tz=${Intl.DateTimeFormat().resolvedOptions().timeZone}`, + `${apiRootUrl}/pdf/${invoiceId}?tz=${Intl.DateTimeFormat().resolvedOptions().timeZone}`, [invoiceId] ); diff --git a/src/screens/Signup/Signup.tsx b/src/screens/Signup/Signup.tsx index 1cf35af9..f0a830f6 100644 --- a/src/screens/Signup/Signup.tsx +++ b/src/screens/Signup/Signup.tsx @@ -10,7 +10,7 @@ import { faUserFriends } from "@fortawesome/free-solid-svg-icons"; import { useTranslation } from "react-i18next"; -import { AsyncStorage, Linking, bcrypt, isApiError } from "@utils"; +import { AsyncStorage, Linking, isApiError } from "@utils"; import { SBPContext, apiRootUrl, @@ -155,9 +155,6 @@ export const Signup = () => { setIsSubmiting(true); - const salt = await bcrypt.getSalt(16); - const hashedPassword = await bcrypt.hash(salt, password); - const isReceiveBitcoin = btcPercent >= 1; const isReceiveFiat = btcPercent <= 99; @@ -169,8 +166,7 @@ export const Signup = () => { name, email, currency, - salt, - hashedPassword, + password, isAtm, language: i18n.language, timezone: Intl.DateTimeFormat().resolvedOptions().timeZone, diff --git a/src/utils/bcrypt/bcrypt.native.ts b/src/utils/bcrypt/bcrypt.native.ts deleted file mode 100644 index 7de3f035..00000000 --- a/src/utils/bcrypt/bcrypt.native.ts +++ /dev/null @@ -1,3 +0,0 @@ -import bcrypt from "bcrypt-react-native"; - -export { bcrypt }; diff --git a/src/utils/bcrypt/bcrypt.ts b/src/utils/bcrypt/bcrypt.ts deleted file mode 100644 index aa7218f8..00000000 --- a/src/utils/bcrypt/bcrypt.ts +++ /dev/null @@ -1,12 +0,0 @@ -import rootBcrypt from "bcryptjs"; - -export const bcrypt = { - // eslint-disable-next-line @typescript-eslint/require-await - getSalt: async (n: number) => { - return rootBcrypt.genSaltSync(n); - }, - // eslint-disable-next-line @typescript-eslint/require-await - hash: async (salt: string, pass: string) => { - return rootBcrypt.hashSync(pass, salt); - } -}; diff --git a/src/utils/bcrypt/index.ts b/src/utils/bcrypt/index.ts deleted file mode 100644 index b4584cbf..00000000 --- a/src/utils/bcrypt/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { bcrypt } from "./bcrypt"; diff --git a/src/utils/index.ts b/src/utils/index.ts index 56498dbf..cbeb0cf0 100644 --- a/src/utils/index.ts +++ b/src/utils/index.ts @@ -21,7 +21,6 @@ export { Deeplink } from "./Deeplink"; export { Biometrics } from "./Biometrics"; export { getShadow } from "./getShadow"; export { getSha256 } from "./getSha256"; -export { bcrypt } from "./bcrypt"; export { isApiError } from "./isApiError"; export { isIcon } from "./isIcon"; export { interpolateColors } from "./interpolateColors";