Skip to content

Commit

Permalink
Merge branch 'develop' into bump/rn73
Browse files Browse the repository at this point in the history
  • Loading branch information
jorbuedo committed May 21, 2024
2 parents 44676a4 + d0e561e commit c19c7a3
Show file tree
Hide file tree
Showing 468 changed files with 5,664 additions and 8,180 deletions.
5 changes: 3 additions & 2 deletions apps/wallet-mobile/.storybook/storybook.requires.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions apps/wallet-mobile/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ android {
applicationId "com.emurgo"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 624
versionName "4.25.1"
versionCode 682
versionName "4.27.0"
testBuildType System.getProperty('testBuildType', 'debug')
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
}
Expand Down
4 changes: 2 additions & 2 deletions apps/wallet-mobile/ios/NightlySpashScreen.storyboard
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<nil key="highlightedColor"/>
</label>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" fixedFrame="YES" image="BootSplashLogoNightly" translatesAutoresizingMaskIntoConstraints="NO" id="d1G-66-mAJ">
<rect key="frame" x="74" y="295" width="245" height="263"/>
<rect key="frame" x="74" y="293" width="245" height="263"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
</imageView>
</subviews>
Expand All @@ -51,6 +51,6 @@
</scene>
</scenes>
<resources>
<image name="BootSplashLogoNightly" width="218" height="223"/>
<image name="BootSplashLogoNightly" width="239" height="223"/>
</resources>
</document>
4 changes: 2 additions & 2 deletions apps/wallet-mobile/ios/nightly.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>4.25.1</string>
<string>4.27.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>513</string>
<string>569</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>LSApplicationCategoryType</key>
Expand Down
8 changes: 4 additions & 4 deletions apps/wallet-mobile/ios/yoroi.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -899,7 +899,7 @@
CODE_SIGN_ENTITLEMENTS = yoroi/yoroi.entitlements;
CODE_SIGN_IDENTITY = "iPhone Distribution";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 513;
CURRENT_PROJECT_VERSION = 569;
DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = F8NVT2G2L4;
ENABLE_BITCODE = NO;
Expand Down Expand Up @@ -944,7 +944,7 @@
CODE_SIGN_ENTITLEMENTS = yoroi/yoroi.entitlements;
CODE_SIGN_IDENTITY = "iPhone Distribution";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 513;
CURRENT_PROJECT_VERSION = 569;
DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = F8NVT2G2L4;
ENVFILE = "$(PODS_ROOT)/../../.env.production";
Expand Down Expand Up @@ -1143,7 +1143,7 @@
CODE_SIGN_ENTITLEMENTS = nightly.entitlements;
CODE_SIGN_IDENTITY = "iPhone Distribution";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 513;
CURRENT_PROJECT_VERSION = 569;
DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = F8NVT2G2L4;
ENABLE_BITCODE = NO;
Expand Down Expand Up @@ -1188,7 +1188,7 @@
CODE_SIGN_ENTITLEMENTS = nightly.entitlements;
CODE_SIGN_IDENTITY = "iPhone Distribution";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 513;
CURRENT_PROJECT_VERSION = 569;
DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = F8NVT2G2L4;
ENVFILE = "$(PODS_ROOT)/../../.env.nightly";
Expand Down
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions apps/wallet-mobile/ios/yoroi/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>4.25.1</string>
<string>4.27.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
Expand All @@ -34,7 +34,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>513</string>
<string>569</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>LSApplicationCategoryType</key>
Expand Down
4 changes: 2 additions & 2 deletions apps/wallet-mobile/ios/yoroiTests/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>4.25.1</string>
<string>4.27.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>513</string>
<string>569</string>
</dict>
</plist>
7 changes: 4 additions & 3 deletions apps/wallet-mobile/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@yoroi/wallet-mobile",
"version": "4.25.1",
"version": "4.27.0",
"private": true,
"scripts": {
"android-bundle": "react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res",
Expand Down Expand Up @@ -128,12 +128,13 @@
"@yoroi/api": "1.5.1",
"@yoroi/common": "1.5.2",
"@yoroi/exchange": "2.0.1",
"@yoroi/explorers": "1.0.0",
"@yoroi/links": "1.5.4",
"@yoroi/portfolio": "1.0.0",
"@yoroi/resolver": "2.0.4",
"@yoroi/resolver": "2.0.5",
"@yoroi/setup-wallet": "1.0.0",
"@yoroi/staking": "1.5.1",
"@yoroi/swap": "1.5.3",
"@yoroi/swap": "1.6.0",
"@yoroi/theme": "^1.0.0",
"@yoroi/transfer": "1.0.0",
"add": "2.0.6",
Expand Down
37 changes: 32 additions & 5 deletions apps/wallet-mobile/src/AppNavigator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,19 @@ import {AgreementChangedNavigator, InitializationNavigator} from './features/Ini
import {LegalAgreement, useLegalAgreement} from './features/Initialization/common'
import {useDeepLinkWatcher} from './features/Links/common/useDeepLinkWatcher'
import {PortfolioScreen} from './features/Portfolio/useCases/PortfolioScreen'
import {AddWalletNavigator} from './features/SetupWallet/SetupWalletNavigator'
import {SetupWalletNavigator} from './features/SetupWallet/SetupWalletNavigator'
import {
ChooseBiometricLoginScreen,
useShowBiometricsScreen,
} from './features/SetupWallet/useCases/ChooseBiometricLogin/ChooseBiometricLoginScreen'
import {useWalletManager} from './features/WalletManager/context/WalletManagerContext'
import {CONFIG} from './legacy/config'
import {DeveloperScreen} from './legacy/DeveloperScreen'
import {AppRoutes} from './navigation'
import {SearchProvider} from './Search/SearchContext'
import {WalletNavigator} from './WalletNavigator'
import {AuthSetting, useAuthSetting, useAuthWithOs, useIsAuthOsSupported} from './yoroi-wallets/auth'
import {useHasWallets} from './yoroi-wallets/hooks'

const Stack = createStackNavigator<AppRoutes>()
const navRef = React.createRef<NavigationContainerRef<ReactNavigation.RootParamList>>()
Expand All @@ -37,10 +43,17 @@ export const AppNavigator = () => {
const strings = useStrings()
const [routeName, setRouteName] = React.useState<string>()
useStatusBar(routeName)

const {showBiometricsScreen} = useShowBiometricsScreen()
const isAuthOsSupported = useIsAuthOsSupported()
const authSetting = useAuthSetting()
const walletManager = useWalletManager()
const {hasWallets} = useHasWallets(walletManager)
useHideScreenInAppSwitcher()

useAutoLogout()

const shouldAskToUseAuthWithOs = showBiometricsScreen && isAuthOsSupported && authSetting !== 'os'

const {isLoggedIn, isLoggedOut, login} = useAuth()
const {authWithOs} = useAuthWithOs({
onSuccess: login,
Expand Down Expand Up @@ -135,7 +148,23 @@ export const AppNavigator = () => {
{isLoggedIn && (
<>
<Stack.Group>
<Stack.Screen name="app-root">
{!hasWallets && shouldAskToUseAuthWithOs && (
<Stack.Screen //
name="choose-biometric-login"
options={{headerShown: false}}
component={ChooseBiometricLoginScreen}
/>
)}

{!hasWallets && !shouldAskToUseAuthWithOs && (
<Stack.Screen //
name="setup-wallet"
options={{headerShown: false}}
component={SetupWalletNavigator}
/>
)}

<Stack.Screen name="manage-wallets">
{() => (
<SearchProvider>
<TransferProvider>
Expand All @@ -144,8 +173,6 @@ export const AppNavigator = () => {
</SearchProvider>
)}
</Stack.Screen>

<Stack.Screen name="new-wallet" component={AddWalletNavigator} />
</Stack.Group>

<Stack.Group screenOptions={{presentation: 'transparentModal'}}>
Expand Down
4 changes: 2 additions & 2 deletions apps/wallet-mobile/src/Catalyst/ConfirmVotingTx.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
import React, {useState} from 'react'
import {defineMessages, useIntl} from 'react-intl'
import {ScrollView, StyleSheet} from 'react-native'
Expand All @@ -7,7 +6,7 @@ import {SafeAreaView} from 'react-native-safe-area-context'
import {KeyboardAvoidingView, ProgressStep, Spacer, TextInput} from '../components'
import {ConfirmTx} from '../components/ConfirmTx'
import {debugWalletInfo, features} from '../features'
import {useSelectedWallet} from '../features/WalletManager/Context'
import {useSelectedWallet} from '../features/WalletManager/context/SelectedWalletContext'
import {Instructions as HWInstructions} from '../HW'
import {errorMessages, txLabels} from '../i18n/global-messages'
import LocalizableError from '../i18n/LocalizableError'
Expand Down Expand Up @@ -138,6 +137,7 @@ const useStrings = () => {

return {
errorMessage: (error: LocalizableError) =>
// eslint-disable-next-line @typescript-eslint/no-explicit-any
intl.formatMessage({id: error.id, defaultMessage: error.defaultMessage}, (error as any).values),
fees: intl.formatMessage(txLabels.fees),
subTitle: intl.formatMessage(messages.subTitle),
Expand Down
2 changes: 1 addition & 1 deletion apps/wallet-mobile/src/Catalyst/DownloadCatalyst.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import playstoreBadge from '../assets/img/google-play-badge.png'
import AppDownload from '../assets/img/pic-catalyst-step1.png'
import {Button, ProgressStep, Spacer, StandardModal, Text} from '../components'
import {useStakingInfo} from '../Dashboard/StakePoolInfos'
import {useSelectedWallet} from '../features/WalletManager/Context'
import {useSelectedWallet} from '../features/WalletManager/context/SelectedWalletContext'
import globalMessages, {confirmationMessages} from '../i18n/global-messages'
import {Logger} from '../legacy/logging'
import {Actions, Row} from './components'
Expand Down
2 changes: 1 addition & 1 deletion apps/wallet-mobile/src/Catalyst/InsufficientFundsModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {useIntl} from 'react-intl'
import {StyleSheet, Text, View} from 'react-native'

import {StandardModal} from '../components'
import {useSelectedWallet} from '../features/WalletManager/Context'
import {useSelectedWallet} from '../features/WalletManager/context/SelectedWalletContext'
import globalMessages, {confirmationMessages} from '../i18n/global-messages'
import {formatTokenWithText} from '../legacy/format'
import {CATALYST} from '../yoroi-wallets/cardano/utils'
Expand Down
2 changes: 1 addition & 1 deletion apps/wallet-mobile/src/Catalyst/VotingBanner.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {action} from '@storybook/addon-actions'
import {storiesOf} from '@storybook/react-native'
import React from 'react'

import {SelectedWalletProvider} from '../features/WalletManager/Context'
import {SelectedWalletProvider} from '../features/WalletManager/context/SelectedWalletContext'
import {mocks} from '../yoroi-wallets/mocks'
import {VotingBanner} from './VotingBanner'

Expand Down
2 changes: 1 addition & 1 deletion apps/wallet-mobile/src/Catalyst/VotingBanner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {defineMessages, useIntl} from 'react-intl'
import {StyleSheet, TouchableOpacity, View} from 'react-native'

import {Icon, Text} from '../components'
import {useSelectedWallet} from '../features/WalletManager/Context'
import {useSelectedWallet} from '../features/WalletManager/context/SelectedWalletContext'
import globalMessages, {confirmationMessages} from '../i18n/global-messages'
import {isNightly} from '../legacy/config'
import {Logger} from '../legacy/logging'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import React from 'react'

import {QueryProvider, WithModalProps} from '../../.storybook/decorators'
import {Boundary} from '../components'
import {SelectedWalletProvider} from '../features/WalletManager/Context'
import {SelectedWalletProvider} from '../features/WalletManager/context/SelectedWalletContext'
import {YoroiWallet} from '../yoroi-wallets/cardano/types'
import {mocks} from '../yoroi-wallets/mocks'
import {ConfirmPin} from './ConfirmPin'
Expand Down
2 changes: 1 addition & 1 deletion apps/wallet-mobile/src/Dashboard/Dashboard.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {storiesOf} from '@storybook/react-native'
import React from 'react'

import {QueryProvider} from '../../.storybook/decorators'
import {SelectedWalletProvider} from '../features/WalletManager/Context'
import {SelectedWalletProvider} from '../features/WalletManager/context/SelectedWalletContext'
import {YoroiWallet} from '../yoroi-wallets/cardano/types'
import {mocks} from '../yoroi-wallets/mocks'
import {Dashboard} from './Dashboard'
Expand Down
2 changes: 1 addition & 1 deletion apps/wallet-mobile/src/Dashboard/Dashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
WithdrawWarningModal,
} from '../features/Staking/Governance'
import {useIsGovernanceFeatureEnabled} from '../features/Staking/Governance'
import {useSelectedWallet} from '../features/WalletManager/Context'
import {useSelectedWallet} from '../features/WalletManager/context/SelectedWalletContext'
import globalMessages from '../i18n/global-messages'
import {Modal} from '../legacy/Modal'
import {DashboardRoutes, useWalletNavigation} from '../navigation'
Expand Down
2 changes: 1 addition & 1 deletion apps/wallet-mobile/src/Dashboard/DashboardNavigator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {defineMessages, useIntl} from 'react-intl'

import {SettingsButton} from '../components/Button'
import {useGovernanceManagerMaker} from '../features/Staking/Governance'
import {useSelectedWallet} from '../features/WalletManager/Context'
import {useSelectedWallet} from '../features/WalletManager/context/SelectedWalletContext'
import {DashboardRoutes, defaultStackNavigationOptions, useWalletNavigation} from '../navigation'
import {DelegationConfirmation, FailedTxScreen} from '../Staking'
import {StakingCenter} from '../Staking/StakingCenter'
Expand Down
2 changes: 1 addition & 1 deletion apps/wallet-mobile/src/Dashboard/StakePoolInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {ActivityIndicator, Linking, StyleSheet, View} from 'react-native'
import {useQuery, UseQueryOptions} from 'react-query'

import {Button, CopyButton, Text, TitledCard} from '../components'
import {useSelectedWallet} from '../features/WalletManager/Context'
import {useSelectedWallet} from '../features/WalletManager/context/SelectedWalletContext'
import {isEmptyString} from '../utils/utils'
import {YoroiWallet} from '../yoroi-wallets/cardano/types'
import {StakePoolInfoAndHistory} from '../yoroi-wallets/types'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {storiesOf} from '@storybook/react-native'
import React from 'react'
import {QueryClient, QueryClientProvider} from 'react-query'

import {SelectedWalletProvider} from '../features/WalletManager/Context'
import {SelectedWalletProvider} from '../features/WalletManager/context/SelectedWalletContext'
import {YoroiWallet} from '../yoroi-wallets/cardano/types'
import {mocks} from '../yoroi-wallets/mocks'
import {StakePoolInfos} from './StakePoolInfos'
Expand Down
2 changes: 1 addition & 1 deletion apps/wallet-mobile/src/Dashboard/StakePoolInfos.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import React from 'react'
import {ActivityIndicator, StyleSheet, View} from 'react-native'
import {useQuery, useQueryClient, UseQueryOptions} from 'react-query'

import {useSelectedWallet} from '../features/WalletManager/Context'
import {useSelectedWallet} from '../features/WalletManager/context/SelectedWalletContext'
import {YoroiWallet} from '../yoroi-wallets/cardano/types'
import {StakingInfo, YoroiUnsignedTx} from '../yoroi-wallets/types'
import {Quantities} from '../yoroi-wallets/utils'
Expand Down
2 changes: 1 addition & 1 deletion apps/wallet-mobile/src/Dashboard/UserSummary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {StyleSheet, View} from 'react-native'

import {Button, Icon, Text, TitledCard} from '../components'
import {usePrivacyMode} from '../features/Settings/PrivacyMode/PrivacyMode'
import {useSelectedWallet} from '../features/WalletManager/Context'
import {useSelectedWallet} from '../features/WalletManager/context/SelectedWalletContext'
import globalMessages from '../i18n/global-messages'
import {formatAdaWithText} from '../legacy/format'
import {asQuantity} from '../yoroi-wallets/utils'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import React from 'react'
import {useIntl} from 'react-intl'

import {Boundary, TwoActionView} from '../../../components'
import {walletManager} from '../../../features/WalletManager/common/walletManager'
import {LedgerConnect, LedgerTransportSwitch} from '../../../HW'
import {confirmationMessages, txLabels} from '../../../i18n/global-messages'
import {walletManager} from '../../../wallet-manager/walletManager'
import {YoroiWallet} from '../../../yoroi-wallets/cardano/types'
import {useSignWithHwAndSubmitTx} from '../../../yoroi-wallets/hooks'
import {DeviceId, DeviceObj, withBLE, withUSB} from '../../../yoroi-wallets/hw'
Expand Down

0 comments on commit c19c7a3

Please sign in to comment.