Skip to content

Commit b649d33

Browse files
committed
merge develop
2 parents fdf48d8 + 0432939 commit b649d33

File tree

317 files changed

+2515
-2724
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

317 files changed

+2515
-2724
lines changed

apps/wallet-mobile/src/AppNavigator.tsx

+94-91
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import {Alert, AppState, AppStateStatus, InteractionManager, Platform} from 'rea
99
import RNBootSplash from 'react-native-bootsplash'
1010

1111
import StorybookScreen from '../.storybook'
12+
import {ClipboardProvider} from './components/Clipboard/ClipboardProvider'
1213
import {ModalProvider} from './components/Modal/ModalContext'
1314
import {ModalScreen} from './components/Modal/ModalScreen'
1415
import {useAuth} from './features/Auth/AuthProvider'
@@ -99,112 +100,114 @@ export const AppNavigator = () => {
99100
onReady={onReady}
100101
ref={navRef}
101102
>
102-
<ModalProvider>
103-
<Stack.Navigator
104-
screenOptions={{
105-
...navOptions,
106-
headerShown: false /* used only for transition */,
107-
}}
108-
>
109-
{/* Not Authenticated */}
110-
111-
{isLoggedOut && (
112-
<Stack.Group>
113-
{firstAction === 'first-run' && (
114-
<Stack.Screen name="first-run">
115-
{() => (
116-
<SearchProvider>
117-
<InitializationNavigator />
118-
</SearchProvider>
119-
)}
120-
</Stack.Screen>
121-
)}
122-
123-
{firstAction === 'show-agreement-changed-notice' && (
124-
<Stack.Screen name="agreement-changed-notice">{() => <AgreementChangedNavigator />}</Stack.Screen>
125-
)}
126-
127-
{firstAction === 'auth-with-pin' && (
128-
<Stack.Screen
129-
name="custom-pin-auth"
130-
component={PinLoginScreen}
131-
options={{title: strings.loginPinTitle}}
132-
/>
133-
)}
134-
135-
{firstAction === 'auth-with-os' && (
136-
<Stack.Screen name="bio-auth-initial" component={OsLoginScreen} options={{headerShown: false}} />
137-
)}
138-
139-
{firstAction === 'request-new-pin' && (
140-
<Stack.Screen //
141-
name="enable-login-with-pin"
142-
component={CreatePinScreenWrapper}
143-
options={{title: strings.customPinTitle}}
144-
/>
145-
)}
146-
</Stack.Group>
147-
)}
148-
149-
{/* Authenticated */}
150-
151-
{isLoggedIn && (
152-
<>
103+
<ClipboardProvider>
104+
<ModalProvider>
105+
<Stack.Navigator
106+
screenOptions={{
107+
...navOptions,
108+
headerShown: false /* used only for transition */,
109+
}}
110+
>
111+
{/* Not Authenticated */}
112+
113+
{isLoggedOut && (
153114
<Stack.Group>
154-
{afterLoginAction === 'choose-biometric-login' && (
155-
<Stack.Screen //
156-
name="choose-biometric-login"
157-
options={{headerShown: false}}
158-
component={ChooseBiometricLoginScreen}
159-
/>
115+
{firstAction === 'first-run' && (
116+
<Stack.Screen name="first-run">
117+
{() => (
118+
<SearchProvider>
119+
<InitializationNavigator />
120+
</SearchProvider>
121+
)}
122+
</Stack.Screen>
160123
)}
161124

162-
{afterLoginAction === 'dark-theme-announcement' && (
163-
<Stack.Screen //
164-
name="dark-theme-announcement"
165-
options={{headerShown: false}}
166-
component={DarkThemeAnnouncement}
167-
/>
125+
{firstAction === 'show-agreement-changed-notice' && (
126+
<Stack.Screen name="agreement-changed-notice">{() => <AgreementChangedNavigator />}</Stack.Screen>
168127
)}
169128

170-
{afterLoginAction === 'setup-wallet' && (
171-
<Stack.Screen //
172-
name="setup-wallet"
173-
options={{headerShown: false}}
174-
component={SetupWalletNavigator}
129+
{firstAction === 'auth-with-pin' && (
130+
<Stack.Screen
131+
name="custom-pin-auth"
132+
component={PinLoginScreen}
133+
options={{title: strings.loginPinTitle}}
175134
/>
176135
)}
177136

178-
{afterLoginAction === 'manage-wallets' && (
179-
<Stack.Screen name="manage-wallets" getComponent={() => WalletNavigator} />
137+
{firstAction === 'auth-with-os' && (
138+
<Stack.Screen name="bio-auth-initial" component={OsLoginScreen} options={{headerShown: false}} />
180139
)}
181-
</Stack.Group>
182140

183-
<Stack.Group
184-
screenOptions={{
185-
presentation: 'transparentModal',
186-
...(Platform.OS === 'android' && {...TransitionPresets.DefaultTransition}), // overriding general navigation settings
187-
cardStyle: {backgroundColor: 'transparent'}, // this is needed for the modal to be transparent
188-
}}
189-
>
190-
<Stack.Screen name="modal" component={ModalScreen} />
141+
{firstAction === 'request-new-pin' && (
142+
<Stack.Screen //
143+
name="enable-login-with-pin"
144+
component={CreatePinScreenWrapper}
145+
options={{title: strings.customPinTitle}}
146+
/>
147+
)}
191148
</Stack.Group>
192-
</>
193-
)}
149+
)}
150+
151+
{/* Authenticated */}
152+
153+
{isLoggedIn && (
154+
<>
155+
<Stack.Group>
156+
{afterLoginAction === 'choose-biometric-login' && (
157+
<Stack.Screen //
158+
name="choose-biometric-login"
159+
options={{headerShown: false}}
160+
component={ChooseBiometricLoginScreen}
161+
/>
162+
)}
163+
164+
{afterLoginAction === 'dark-theme-announcement' && (
165+
<Stack.Screen //
166+
name="dark-theme-announcement"
167+
options={{headerShown: false}}
168+
component={DarkThemeAnnouncement}
169+
/>
170+
)}
194171

195-
{/* Development */}
172+
{afterLoginAction === 'setup-wallet' && (
173+
<Stack.Screen //
174+
name="setup-wallet"
175+
options={{headerShown: false}}
176+
component={SetupWalletNavigator}
177+
/>
178+
)}
196179

197-
{__DEV__ && (
198-
<Stack.Group>
199-
<Stack.Screen name="developer" component={DeveloperScreen} options={{headerShown: false}} />
180+
{afterLoginAction === 'manage-wallets' && (
181+
<Stack.Screen name="manage-wallets" getComponent={() => WalletNavigator} />
182+
)}
183+
</Stack.Group>
184+
185+
<Stack.Group
186+
screenOptions={{
187+
presentation: 'transparentModal',
188+
...(Platform.OS === 'android' && {...TransitionPresets.DefaultTransition}), // overriding general navigation settings
189+
cardStyle: {backgroundColor: 'transparent'}, // this is needed for the modal to be transparent
190+
}}
191+
>
192+
<Stack.Screen name="modal" component={ModalScreen} />
193+
</Stack.Group>
194+
</>
195+
)}
196+
197+
{/* Development */}
198+
199+
{__DEV__ && (
200+
<Stack.Group>
201+
<Stack.Screen name="developer" component={DeveloperScreen} options={{headerShown: false}} />
200202

201-
<Stack.Screen name="storybook" component={StorybookScreen} />
203+
<Stack.Screen name="storybook" component={StorybookScreen} />
202204

203-
<Stack.Screen name="playground" component={Playground} />
204-
</Stack.Group>
205-
)}
206-
</Stack.Navigator>
207-
</ModalProvider>
205+
<Stack.Screen name="playground" component={Playground} />
206+
</Stack.Group>
207+
)}
208+
</Stack.Navigator>
209+
</ModalProvider>
210+
</ClipboardProvider>
208211
</NavigationContainer>
209212
)
210213
}

apps/wallet-mobile/src/components/Analytics/Analytics.tsx

+4-13
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ import {defineMessages, useIntl} from 'react-intl'
44
import {StyleSheet, TextStyle, TouchableOpacity, useWindowDimensions, View} from 'react-native'
55
import {ScrollView} from 'react-native-gesture-handler'
66

7-
import {Button} from '../../components/Button/Button'
87
import {Spacer} from '../../components/Spacer/Spacer'
98
import {Text} from '../../components/Text'
109
import {YoroiLogo} from '../../components/YoroiLogo/YoroiLogo'
1110
import {SettingsSwitch} from '../../features/Settings/common/SettingsSwitch'
1211
import {useMetrics} from '../../kernel/metrics/metricsManager'
12+
import {Button, ButtonType} from '../Button/Button'
1313
import {AnalyticsImage} from './AnalyticsImage'
1414

1515
type Props = {
@@ -64,15 +64,13 @@ const Notice = ({onClose, onReadMore}: {onClose?: () => void; onReadMore?: () =>
6464
<CommonContent onReadMore={onReadMore} showLogo />
6565

6666
<Button // skip button
67-
block
68-
outlineShelley
67+
size="S"
68+
type={ButtonType.Text}
6969
onPress={() => {
7070
metrics.disable()
7171
onClose?.()
7272
}}
7373
title={strings.skip}
74-
style={styles.skip}
75-
textStyles={styles.skipText}
7674
/>
7775
</View>
7876
</ScrollView>
@@ -90,8 +88,7 @@ const Notice = ({onClose, onReadMore}: {onClose?: () => void; onReadMore?: () =>
9088
]}
9189
>
9290
<Button // accept button
93-
block
94-
shelleyTheme
91+
size="S"
9592
onPress={() => {
9693
metrics.enable()
9794
onClose?.()
@@ -219,12 +216,6 @@ const useStyles = () => {
219216
...atoms.heading_3_medium,
220217
textAlign: 'center',
221218
},
222-
skip: {
223-
borderWidth: 0,
224-
},
225-
skipText: {
226-
color: color.primary_900,
227-
},
228219
tick: {
229220
color: color.primary_700,
230221
paddingRight: 8,

apps/wallet-mobile/src/components/Boundary/Boundary.tsx

-3
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,6 @@ const FullErrorFallback = ({error, resetErrorBoundary, reset = true, debug}: Err
133133
{reset && (
134134
<Button
135135
title="Try again"
136-
shelleyTheme
137136
onPress={() => {
138137
LayoutAnimation.configureNext(LayoutAnimation.Presets.easeInEaseOut)
139138
resetErrorBoundary()
@@ -163,7 +162,6 @@ const LargeErrorFallback = ({error, resetErrorBoundary, reset = true, debug}: Er
163162
{reset && (
164163
<Button
165164
title="Try again"
166-
shelleyTheme
167165
onPress={() => {
168166
LayoutAnimation.configureNext(LayoutAnimation.Presets.easeInEaseOut)
169167
resetErrorBoundary()
@@ -190,7 +188,6 @@ const SmallErrorFallback = ({error, resetErrorBoundary, reset = true, debug}: Er
190188

191189
{reset && (
192190
<Button
193-
shelleyTheme
194191
title="Try again"
195192
onPress={() => {
196193
LayoutAnimation.configureNext(LayoutAnimation.Presets.easeInEaseOut)

0 commit comments

Comments
 (0)