Skip to content

Commit

Permalink
Merge branch 'main' into feat/smart-tx-txcontroller-v13
Browse files Browse the repository at this point in the history
  • Loading branch information
infiniteflower authored May 7, 2024
2 parents 3a57c34 + b300329 commit 52cd7b6
Show file tree
Hide file tree
Showing 47 changed files with 2,879 additions and 1,134 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,12 @@ const TabBar = ({ state, descriptors, navigation }: TabBarProps) => {
* Current onboarding wizard step
*/
const wizardStep = useSelector((reduxState: any) => reduxState.wizard.step);

/**
* Return current step of onboarding wizard if not step 5 nor 0
*/
const renderOnboardingWizard = useCallback(
() =>
[4, 5].includes(wizardStep) && (
[4, 5, 6].includes(wizardStep) && (
<OnboardingWizard navigation={navigation} coachmarkRef={tabBarRef} />
),
[navigation, wizardStep],
Expand Down
4 changes: 3 additions & 1 deletion app/components/UI/Navbar/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,15 @@ const styles = StyleSheet.create({
paddingVertical: Device.isAndroid() ? 14 : 8,
},
infoButton: {
paddingRight: Device.isAndroid() ? 0 : 18,

marginTop: 5,
},
disabled: {
opacity: 0.3,
},
leftButtonContainer: {
marginRight: Device.isAndroid() ? 22 : 12,
marginRight: 12,
flexDirection: 'row',
alignItems: 'flex-end',
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ exports[`Coachmark should render correctly 1`] = `
}
>
1
/5
/6
</Text>
</View>
<TouchableOpacity
Expand Down
4 changes: 2 additions & 2 deletions app/components/UI/OnboardingWizard/Coachmark/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ const createStyles = (colors) =>
marginBottom: 10,
bottom: -2,
alignItems: 'flex-end',
marginRight: 30,
marginRight: 38,
},
topLeftCorner: {
marginBottom: 10,
Expand Down Expand Up @@ -322,7 +322,7 @@ export default class Coachmark extends PureComponent {
<View style={styles.progress}>
<View style={styles.progessContainer}>
{currentStep !== 0 && (
<Text style={styles.stepCounter}>{currentStep}/5</Text>
<Text style={styles.stepCounter}>{currentStep}/6</Text>
)}
</View>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,37 +1,246 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`Step1 should render correctly 1`] = `
<ContextProvider
value={
<View
style={
{
"store": {
"clearActions": [Function],
"dispatch": [Function],
"getActions": [Function],
"getState": [Function],
"replaceReducer": [Function],
"subscribe": [Function],
},
"subscription": Subscription {
"handleChangeWrapper": [Function],
"listeners": {
"notify": [Function],
},
"onStateChange": [Function],
"parentSub": undefined,
"store": {
"clearActions": [Function],
"dispatch": [Function],
"getActions": [Function],
"getState": [Function],
"replaceReducer": [Function],
"subscribe": [Function],
},
"unsubscribe": null,
},
"flex": 1,
}
}
testID="onboarding-wizard-step1-container-id"
>
<Component />
</ContextProvider>
<View
style={
{
"bottom": 80,
"flex": 1,
"left": 0,
"position": "absolute",
"right": 0,
}
}
>
<View
collapsable={false}
style={
{
"opacity": 0,
}
}
>
<View
style={
[
{
"backgroundColor": "#0376C9",
"borderRadius": 8,
"padding": 20,
},
{
"marginHorizontal": 16,
},
]
}
>
<View
style={
{
"alignItems": "center",
"flexDirection": "row",
"justifyContent": "space-between",
}
}
>
<View />
<Text
style={
{
"alignSelf": "center",
"color": "#FFFFFF",
"fontFamily": "EuclidCircularB-Bold",
"fontSize": 18,
"fontWeight": "600",
}
}
>
Welcome to your wallet!
</Text>
<TouchableOpacity
accessible={true}
activeOpacity={1}
disabled={false}
onPress={[MockFunction]}
onPressIn={[Function]}
onPressOut={[Function]}
style={
{
"alignItems": "center",
"borderRadius": 8,
"height": 16,
"justifyContent": "center",
"opacity": 1,
"width": 16,
}
}
>
<SvgMock
color="#FFFFFF"
height={20}
name="Close"
style={
{
"height": 20,
"width": 20,
}
}
width={20}
/>
</TouchableOpacity>
</View>
<View
style={
{
"marginTop": 20,
}
}
>
<Text
style={
{
"color": "#FFFFFF",
"fontFamily": "EuclidCircularB-Regular",
"fontSize": 14,
"fontWeight": "400",
"marginBottom": 20,
"textAlign": "left",
}
}
>
On the blockchain, you need a wallet (and maybe some ETH). So let’s take a look at how to use your MetaMask wallet.
</Text>
</View>
<View
style={
{
"flexDirection": "row",
}
}
>
<TouchableOpacity
accessibilityRole="button"
accessible={true}
activeOpacity={1}
onPress={[Function]}
onPressIn={[Function]}
onPressOut={[Function]}
style={
{
"alignItems": "center",
"alignSelf": "stretch",
"backgroundColor": "#0376C9",
"borderColor": "#FFFFFF",
"borderRadius": 16,
"borderWidth": 1,
"flex": 0.5,
"flexDirection": "row",
"height": 32,
"justifyContent": "center",
"marginRight": 4,
"paddingHorizontal": 16,
}
}
testID="onboarding-wizard-no-thanks-button"
variant="Primary"
>
<Text
accessibilityRole="text"
style={
{
"color": "#FFFFFF",
"fontFamily": "Euclid Circular B",
"fontSize": 14,
"fontWeight": "400",
"letterSpacing": 0,
"lineHeight": 22,
}
}
>
No thanks
</Text>
</TouchableOpacity>
<TouchableOpacity
accessibilityRole="button"
accessible={true}
activeOpacity={1}
onPress={[Function]}
onPressIn={[Function]}
onPressOut={[Function]}
style={
{
"alignItems": "center",
"alignSelf": "stretch",
"backgroundColor": "#FFFFFF",
"borderColor": "#0376C9",
"borderRadius": 16,
"borderWidth": 1,
"flex": 0.5,
"flexDirection": "row",
"height": 32,
"justifyContent": "center",
"marginLeft": 4,
"paddingHorizontal": 16,
}
}
testID="onboarding-wizard-next-button"
variant="Secondary"
>
<Text
accessibilityRole="text"
style={
{
"color": "#0376C9",
"fontFamily": "Euclid Circular B",
"fontSize": 14,
"fontWeight": "400",
"letterSpacing": 0,
"lineHeight": 22,
}
}
>
Take the tour
</Text>
</TouchableOpacity>
</View>
</View>
<View
style={
{
"alignItems": "flex-start",
"marginBottom": 10,
"marginLeft": 30,
"top": -2,
}
}
>
<View
style={
{
"backgroundColor": "transparent",
"borderLeftColor": "transparent",
"borderLeftWidth": 15,
"borderRightColor": "transparent",
"borderRightWidth": 15,
"borderStyle": "solid",
"borderTopColor": "#0376C9",
"borderTopWidth": 12,
"height": 0,
"position": "absolute",
"width": 0,
}
}
/>
</View>
</View>
</View>
</View>
`;
Loading

0 comments on commit 52cd7b6

Please sign in to comment.