diff --git a/.github/workflows/deploy-mainnet-explorer.yml b/.github/workflows/deploy-mainnet-explorer.yml index 4fcb0952b1..b46fa77d1e 100644 --- a/.github/workflows/deploy-mainnet-explorer.yml +++ b/.github/workflows/deploy-mainnet-explorer.yml @@ -9,7 +9,7 @@ env: AWS_DEFAULT_REGION: eu-central-1 AWS_DISTRIBUTION_ID: ${{ secrets.AWS_DISTRIBUTION_ID_MAINNET }} AWS_BUCKET_NAME: ${{ secrets.AWS_BUCKET_NAME_MAINNET }} - VITE_BACKEND_URL: https://backend-8dce19.alephium.org + VITE_BACKEND_URL: https://backend.mainnet.alephium.org VITE_NETWORK_TYPE: mainnet VITE_NODE_URL: https://node.mainnet.alephium.org diff --git a/apps/mobile-wallet/CHANGELOG.md b/apps/mobile-wallet/CHANGELOG.md index 22b51198e3..37cf703bed 100644 --- a/apps/mobile-wallet/CHANGELOG.md +++ b/apps/mobile-wallet/CHANGELOG.md @@ -1,5 +1,12 @@ # @alephium/mobile-wallet +## 1.1.5 + +### Patch Changes + +- 52a5834: Fix wallet delete +- 5e8c14b: Do not display authentication modal on app fresh install + ## 1.1.4 ### Patch Changes diff --git a/apps/mobile-wallet/android/app/build.gradle b/apps/mobile-wallet/android/app/build.gradle index b4bf429193..e017fb9361 100644 --- a/apps/mobile-wallet/android/app/build.gradle +++ b/apps/mobile-wallet/android/app/build.gradle @@ -89,7 +89,7 @@ android { minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion versionCode 1 - versionName "1.1.4" + versionName "1.1.5" } signingConfigs { debug { diff --git a/apps/mobile-wallet/app.config.js b/apps/mobile-wallet/app.config.js index dcfa96ee20..1d65278bec 100644 --- a/apps/mobile-wallet/app.config.js +++ b/apps/mobile-wallet/app.config.js @@ -21,7 +21,7 @@ export default { name: 'Alephium', owner: 'alephium-dev', slug: 'alephium-mobile-wallet', - version: '1.1.4', + version: '1.1.5', orientation: 'portrait', icon: './assets/icon.png', scheme: ['wc', 'alephium'], diff --git a/apps/mobile-wallet/ios/Alephium/Info.plist b/apps/mobile-wallet/ios/Alephium/Info.plist index 070aa964f5..305790e670 100644 --- a/apps/mobile-wallet/ios/Alephium/Info.plist +++ b/apps/mobile-wallet/ios/Alephium/Info.plist @@ -23,7 +23,7 @@ CFBundlePackageType $(PRODUCT_BUNDLE_PACKAGE_TYPE) CFBundleShortVersionString - 1.1.4 + 1.1.5 CFBundleSignature ???? CFBundleURLTypes diff --git a/apps/mobile-wallet/ios/Podfile.lock b/apps/mobile-wallet/ios/Podfile.lock index 545a1bd6b9..ca7c385b8d 100644 --- a/apps/mobile-wallet/ios/Podfile.lock +++ b/apps/mobile-wallet/ios/Podfile.lock @@ -1293,7 +1293,7 @@ PODS: - React-Core - react-native-background-timer (2.4.1): - React-Core - - react-native-compat (2.13.3): + - react-native-compat (2.15.1): - DoubleConversion - glog - hermes-engine @@ -2104,7 +2104,7 @@ SPEC CHECKSUMS: react-native-aes: c75c46aa744bef7c2415fdf7f5b2dcb75ca4364d react-native-background-actions: ecffd3f0864140ef6cf21c29be6819a02b531a52 react-native-background-timer: 17ea5e06803401a379ebf1f20505b793ac44d0fe - react-native-compat: 0767233bce5123adae8d0338ce121147f195cbd9 + react-native-compat: 408a4b320fa4426f2c25ab74ed5764be6b3eb5aa react-native-get-random-values: 21325b2244dfa6b58878f51f9aa42821e7ba3d06 react-native-netinfo: bdb108d340cdb41875c9ced535977cac6d2ff321 react-native-pager-view: c1e29e1a6105a02807392ba822ad322447a72f55 diff --git a/apps/mobile-wallet/locales/de-DE/translation.json b/apps/mobile-wallet/locales/de-DE/translation.json index 44245433c4..9bb7e053d8 100644 --- a/apps/mobile-wallet/locales/de-DE/translation.json +++ b/apps/mobile-wallet/locales/de-DE/translation.json @@ -320,11 +320,9 @@ "Help us improve your experience!": "Helfen Sie uns, Ihr Erlebnis zu verbessern!", "Require biometrics to open app": "Biometrie zum Öffnen der App erforderlich", "Require device passcode to open app": "Geräte-Zugangscode zum Öffnen der App erforderlich", - "Require device screen lock code or pattern to open app": "Gerät Displaysperre Code oder Muster zum Öffnen der App erforderlich", "App access": "App-Zugriff", "Require biometrics to transact": "Benötigt biometrische Daten für Transaktionen", "Require device passcode to transact": "Geräte-Zugangscode für Transaktionen erforderlich", - "Require device screen lock code or pattern to transact": "Gerät Displaysperre Code oder Muster für Transaktionen erforderlich", "Your device supports biometrics but none is enrolled. Enable them by adding a fingerprint or Face ID in your device's settings.": "Ihr Gerät unterstützt biometrische Daten, aber keine sind hinterlegt. Aktivieren Sie sie, indem Sie einen Fingerabdruck oder eine Gesichts-ID in den Einstellungen Ihres Geräts hinzufügen.", "Enhance your security": "Verbessern Sie Ihre Sicherheit", "Auto-lock": "Automatisch sperren", @@ -364,5 +362,8 @@ "Error while copying address": "Fehler beim Kopieren der Adresse", "This address is not valid": "Diese Adresse ist nicht gültig", "A number is expected": "Eine Zahl wird erwartet", - "View full size": "Volle Grösse anzeigen" + "View full size": "Volle Grösse anzeigen", + "Disclaimer": "Haftungsausschluss", + "Buy": "Kaufen", + "banxaDisclaimer": "Sie sind dabei, auf die Dienste von Drittanbietern zuzugreifen, die von <1>Banxa.com über einen In-App-Browser bereitgestellt werden. Alephium hat keine Kontrolle über die Dienstleistungen von Banxa. Es gelten Banxas Geschäftsbedingungen, daher lesen Sie diese bitte bevor Sie fortfahren." } diff --git a/apps/mobile-wallet/locales/en-US/translation.json b/apps/mobile-wallet/locales/en-US/translation.json index 432787c46b..2fbb62c248 100644 --- a/apps/mobile-wallet/locales/en-US/translation.json +++ b/apps/mobile-wallet/locales/en-US/translation.json @@ -320,11 +320,9 @@ "Help us improve your experience!": "Help us improve your experience!", "Require biometrics to open app": "Require biometrics to open app", "Require device passcode to open app": "Require device passcode to open app", - "Require device screen lock code or pattern to open app": "Require device screen lock code or pattern to open app", "App access": "App access", "Require biometrics to transact": "Require biometrics to transact", "Require device passcode to transact": "Require device passcode to transact", - "Require device screen lock code or pattern to transact": "Require device screen lock code or pattern to transact", "Your device supports biometrics but none is enrolled. Enable them by adding a fingerprint or Face ID in your device's settings.": "Your device supports biometrics but none is enrolled. Enable them by adding a fingerprint or Face ID in your device's settings.", "Enhance your security": "Enhance your security", "Auto-lock": "Auto-lock", diff --git a/apps/mobile-wallet/package.json b/apps/mobile-wallet/package.json index fdbc0931f2..80e9f3af86 100644 --- a/apps/mobile-wallet/package.json +++ b/apps/mobile-wallet/package.json @@ -1,6 +1,6 @@ { "name": "@alephium/mobile-wallet", - "version": "1.1.4", + "version": "1.1.5", "private": true, "main": "index.ts", "scripts": { diff --git a/apps/mobile-wallet/src/analytics.tsx b/apps/mobile-wallet/src/analytics.tsx index e9dc744773..fdc800b6b5 100644 --- a/apps/mobile-wallet/src/analytics.tsx +++ b/apps/mobile-wallet/src/analytics.tsx @@ -69,6 +69,8 @@ export const sendAnalytics = (params: AnalyticsParams) => { } else { const { event, props, options } = params + if (props) props.$ip = '' + posthogAsync.then((client) => throttleEvent(() => client.capture(event, props, options), event, props)) } } diff --git a/apps/mobile-wallet/src/navigation/RootStackNavigation.tsx b/apps/mobile-wallet/src/navigation/RootStackNavigation.tsx index a6ac0636e7..3dd42754d8 100644 --- a/apps/mobile-wallet/src/navigation/RootStackNavigation.tsx +++ b/apps/mobile-wallet/src/navigation/RootStackNavigation.tsx @@ -140,6 +140,7 @@ export default RootStackNavigation const AppUnlockModal = () => { const dispatch = useAppDispatch() const isWalletUnlocked = useAppSelector((s) => s.wallet.isUnlocked) + const lastUsedWalletId = useAppSelector((s) => s.wallet.id) const biometricsRequiredForAppAccess = useAppSelector((s) => s.settings.usesBiometrics) const navigation = useNavigation>() const { triggerBiometricsAuthGuard } = useBiometricsAuthGuard() @@ -166,7 +167,7 @@ const AppUnlockModal = () => { } catch (error) { const message = 'Could not initialize app with stored wallet' showExceptionToast(error, message) - sendAnalytics({ type: 'error', message }) + sendAnalytics({ type: 'error', error, message }) } }, [dispatch, navigation]) @@ -204,6 +205,7 @@ const AppUnlockModal = () => { await migrateDeprecatedMnemonic(deprecatedWallet.mnemonic) dispatch(mnemonicMigrated()) + sendAnalytics({ event: 'Mnemonic migrated' }) initializeAppWithStoredWallet() } catch { @@ -250,7 +252,7 @@ const AppUnlockModal = () => { return ( diff --git a/apps/mobile-wallet/src/screens/LandingScreen.tsx b/apps/mobile-wallet/src/screens/LandingScreen.tsx index 01ed24de72..9489c97a28 100644 --- a/apps/mobile-wallet/src/screens/LandingScreen.tsx +++ b/apps/mobile-wallet/src/screens/LandingScreen.tsx @@ -42,11 +42,10 @@ import { useAppDispatch, useAppSelector } from '~/hooks/redux' import altLogoSrc from '~/images/logos/alephiumHackLogo.png' import AlephiumLogo from '~/images/logos/AlephiumLogo' import RootStackParamList from '~/navigation/rootStackRoutes' -import { getWalletMetadata } from '~/persistent-storage/wallet' +import { storedWalletExists } from '~/persistent-storage/wallet' import { methodSelected, WalletGenerationMethod } from '~/store/walletGenerationSlice' import { BORDER_RADIUS_BIG, BORDER_RADIUS_HUGE } from '~/style/globalStyle' import { themes } from '~/style/themes' -import { showExceptionToast } from '~/utils/layout' import { resetNavigation } from '~/utils/navigation' interface LandingScreenProps extends StackScreenProps, ScreenProps {} @@ -63,18 +62,28 @@ const LandingScreen = ({ navigation, ...props }: LandingScreenProps) => { const { width, height } = Dimensions.get('window') const [dimensions, setDimensions] = useState({ width, height }) - const [showNewWalletButtons, setShowNewWalletButtons] = useState(false) - - // Normally, when the app is unlocked, this screen is not in focus. However, under certain conditions we end up with - // an unlocked wallet and no screen in focus at all. This happens when: - // 1. the auto-lock is set to anything but "Fast" - // 2. the user manually kills the app before the auto-lock timer completes - // 3. the WalletConnect feature is activated - // Since there is no screen in focus and since the default screen set in the RootStackNavigation is this screen, we - // need to navigate back to the dashboard. + const [isScreenContentVisible, setIsScreenContentVisible] = useState(false) + useFocusEffect( useCallback(() => { - if (isWalletUnlocked) resetNavigation(navigation) + storedWalletExists() + .then((walletExists) => { + if (walletExists) { + // Normally, when the app is unlocked, this screen is not in focus. However, under certain conditions we end + // up with an unlocked wallet and no screen in focus at all. This happens when: + // 1. the auto-lock is set to anything but "Fast" + // 2. the user manually kills the app before the auto-lock timer completes + // 3. the WalletConnect feature is activated + // Since there is no screen in focus and since the default screen set in the RootStackNavigation is this + // screen, we need to navigate back to the dashboard. + if (isWalletUnlocked) resetNavigation(navigation) + } else { + // Only display this screen's contents when we have no stored wallet. If there is a wallet, the + // AppUnlockModal will be displayed + setIsScreenContentVisible(true) + } + }) + .catch((error) => console.error('Could not determine if stored wallet exists', error)) }, [isWalletUnlocked, navigation]) ) @@ -104,16 +113,10 @@ const LandingScreen = ({ navigation, ...props }: LandingScreenProps) => { setDimensions({ width, height }) } - useEffect(() => { - getWalletMetadata() - .then((metadata) => setShowNewWalletButtons(!metadata)) - .catch((e) => showExceptionToast(e, t('Wallet metadata not found'))) - }, [t]) - return ( - {showNewWalletButtons && ( + {isScreenContentVisible && ( <> diff --git a/apps/mobile-wallet/src/screens/Settings/SettingsScreen.tsx b/apps/mobile-wallet/src/screens/Settings/SettingsScreen.tsx index 050a0d6340..78729b4792 100644 --- a/apps/mobile-wallet/src/screens/Settings/SettingsScreen.tsx +++ b/apps/mobile-wallet/src/screens/Settings/SettingsScreen.tsx @@ -221,26 +221,30 @@ const SettingsScreen = ({ navigation, ...props }: ScreenProps) => { - + - +