Skip to content

Commit cd3cf5d

Browse files
authored
Merge pull request #136 from syscoin/dev
feat: updates main with dev
2 parents b7c9871 + a354e66 commit cd3cf5d

File tree

337 files changed

+6321
-2460
lines changed

Some content is hidden

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

337 files changed

+6321
-2460
lines changed

app/android/app/build.gradle

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ android {
5252
applicationId "io.paliwallet"
5353
minSdkVersion rootProject.ext.minSdkVersion
5454
targetSdkVersion rootProject.ext.targetSdkVersion
55-
versionCode 30
56-
versionName "1.1.4"
55+
versionCode 32
56+
versionName "1.2.0"
5757
multiDexEnabled true
5858
missingDimensionStrategy "minReactNative", "minReactNative46"
5959
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
@@ -116,7 +116,8 @@ dependencies {
116116
implementation project(":react-native-haptic-feedback")
117117
implementation project(':react-native-gesture-handler')
118118
implementation project(path: ":@react-native-firebase_analytics")
119-
119+
implementation project(':react-native-theme-switch-animation')
120+
120121
implementation 'androidx.multidex:multidex:2.0.1'
121122
implementation 'androidx.annotation:annotation:1.1.0'
122123
implementation 'androidx.appcompat:appcompat:1.2.0'

app/android/app/google-services.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@
1515
}
1616
],
1717
"configuration_version": "1"
18-
}
18+
}
Binary file not shown.
Binary file not shown.

app/android/app/src/main/java/io/gopocket/MainApplication.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
import com.swmansion.reanimated.ReanimatedJSIModulePackage;
2020
import com.facebook.react.bridge.JSIModulePackage;
2121

22+
2223
import android.text.TextUtils;
2324

2425
import androidx.multidex.MultiDexApplication;
@@ -77,12 +78,14 @@ protected List<ReactPackage> getPackages() {
7778
@SuppressWarnings("UnnecessaryLocalVariable")
7879
List<ReactPackage> packages = new PackageList(this).getPackages();
7980
packages.add(new LottiePackage());
81+
8082
packages.add(new RNGestureHandlerPackage());
8183
packages.add(new PreventScreenshotPackage());
8284
packages.add(new RNToolsPackage());
8385
packages.add(new MPAndroidChartPackage());
8486
packages.add(new BlurViewPackage());
8587
packages.add(new ReactVideoPackage());
88+
8689
packages.add(new RNThreadPackage(
8790
mReactNativeHost,
8891
new AsyncStoragePackage(),
Loading
Loading
Loading
Loading
Loading
Loading
Loading

app/android/app/src/main/res/layout/launch_screen.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
android:orientation="vertical"
66
android:layout_width="match_parent"
77
android:layout_height="match_parent"
8-
android:background="#ffffffff">
8+
android:background="@color/splash_background">
99
<com.airbnb.lottie.LottieAnimationView
1010
android:id="@+id/lottie"
1111
android:layout_centerHorizontal="true"

app/android/app/src/main/res/raw/splash_screen.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<resources>
2+
<attr name="splashBackground" format="reference" />
3+
</resources>
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<resources>
3+
<color name="white">#0e223a</color>
4+
<color name="lightgray">#EBEBED</color>
5+
<color name="splash_background">#111E33</color>
6+
<color name="app_background_dark">#111E33</color>
7+
</resources>
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<resources>
2+
<string name="app_name">Pali Wallet</string>
3+
<string moduleConfig="true" name="CodePushDeploymentKey">WYjNfoQiWyFCUGjLVxChK3u4BSm2BCb25Gerw</string>
4+
</resources>
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<resources>
2+
3+
<!-- Base application theme. -->
4+
<style name="AppTheme" parent="Theme.AppCompat.DayNight.NoActionBar">
5+
<!-- Use light theme splash background -->
6+
<item name="splashBackground">@color/splash_background</item>
7+
<item name="android:windowBackground">@color/app_background_dark</item>
8+
</style>
9+
</resources>
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<resources>
2+
<attr name="splashBackground" format="reference" />
3+
</resources>

app/android/app/src/main/res/values/colors.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,6 @@
22
<resources>
33
<color name="white">#0e223a</color>
44
<color name="lightgray">#EBEBED</color>
5+
<color name="splash_background">#FFFFFF</color>
6+
<color name="app_background_light">#FFFFFF</color>
57
</resources>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
<resources>
22
<string name="app_name">Pali Wallet</string>
3-
<string moduleConfig="true" name="CodePushDeploymentKey">Insert your Key Here</string>
3+
<string moduleConfig="true" name="CodePushDeploymentKey">WYjNfoQiWyFCUGjLVxChK3u4BSm2BCb25Gerw</string>
44
</resources>

app/android/app/src/main/res/values/styles.xml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@
22

33
<!-- Base application theme. -->
44
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
5-
<!-- Customize your theme here. -->
6-
<item name="android:editTextBackground">@drawable/rn_edit_text_material</item>
7-
<item name="android:windowIsTranslucent">true</item>
8-
</style>
9-
5+
<!-- Use light theme splash background -->
6+
<item name="splashBackground">@color/splash_background</item>
7+
<item name="android:windowBackground">@color/app_background_light</item>
8+
</style>
109
</resources>

app/android/link-assets-manifest.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"migIndex": 1,
3+
"data": [
4+
{
5+
"path": "assets/fonts/Poppins-Regular.ttf",
6+
"sha1": "fdd3002e7d814ee47c1c1b8487c72c6bbb3a2d00"
7+
},
8+
{
9+
"path": "assets/fonts/Poppins-SemiBold.ttf",
10+
"sha1": "8a4ace9392d06bcb7f8ea2f5169b07e4c383a90d"
11+
}
12+
]
13+
}

app/android/settings.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ include ':app', ':react-native-code-push'
1818
project(':react-native-code-push').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-code-push/android/app')
1919
include ':@react-native-firebase_analytics'
2020
project(':@react-native-firebase_analytics').projectDir = new File(rootProject.projectDir, './../node_modules/@react-native-firebase/analytics/android')
21+
include ':react-native-theme-switch-animation'
22+
project(':react-native-theme-switch-animation').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-theme-switch-animation/android')
2123
include ':react-native-threads'
2224
project(':react-native-threads').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-threads/android')
2325
include ':app'

app/app/components/App/index.js

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
import React, { PureComponent } from 'react';
2+
import { Linking, View } from 'react-native';
23
import { createAppContainer, createSwitchNavigator, NavigationActions } from 'react-navigation';
34
import codePush from 'react-native-code-push';
4-
5+
import { setCustomText } from 'react-native-global-props';
56
import { createStackNavigator } from 'react-navigation-stack';
7+
68
import Login from '../Views/Login';
79
import Onboarding from '../Views/Onboarding';
810
import ChoosePassword from '../Views/ChoosePassword';
@@ -11,7 +13,7 @@ import Entry from '../Views/Entry';
1113
import Main from '../Main';
1214
import SharedDeeplinkManager from '../../core/DeeplinkManager';
1315
import { initApiClient } from '../../util/ApiClient';
14-
import { Linking } from 'react-native';
16+
import { ThemeContext } from '../../theme/ThemeProvider';
1517
import AppConstants from '../../core/AppConstants';
1618
import BiometricSecurity from '../Views/BiometricSecurity';
1719
import ImportPrivateKey from '../Views/ImportPrivateKey';
@@ -45,6 +47,7 @@ const OnboardingView = createSwitchNavigator(
4547
},
4648
{
4749
mode: 'card',
50+
4851
navigationOptions: {
4952
gesturesEnabled: false
5053
}
@@ -135,6 +138,8 @@ const AppNavigator = createSwitchNavigator(
135138
const AppContainer = createAppContainer(AppNavigator);
136139

137140
class App extends PureComponent {
141+
static contextType = ThemeContext;
142+
138143
componentDidMount = async () => {
139144
SharedDeeplinkManager.init({
140145
navigate: (routeName, opts) => {
@@ -146,6 +151,16 @@ class App extends PureComponent {
146151
console.error(`Cannot initialize WalletConnect Manager.`, err);
147152
});
148153
}
154+
155+
//Sets Default Font Family
156+
const customTextProps = {
157+
style: {
158+
fontFamily: 'Poppins'
159+
}
160+
};
161+
162+
setCustomText(customTextProps);
163+
149164
initApiClient();
150165

151166
Linking.addEventListener('url', this.handleDeepLinkEvent);
@@ -170,8 +185,11 @@ class App extends PureComponent {
170185
};
171186

172187
render() {
188+
const { theme } = this.context;
189+
173190
return (
174191
<AppContainer
192+
theme={theme}
175193
ref={nav => {
176194
this.navigator = nav;
177195
}}

app/app/components/Main/MainNavigator.js

Lines changed: 30 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ import GlobeIcon from '../UI/GlobeIcon';
3535
import WalletIcon from '../UI/WalletIcon';
3636
import ReactNativeHapticFeedback from 'react-native-haptic-feedback';
3737
import LanguageSelector from '../Views/LanguageSelector';
38+
import { ThemeContext } from '../../theme/ThemeProvider';
3839

3940
const options = {
4041
enableVibrateFallback: true,
@@ -53,6 +54,8 @@ const SlideFromLeft = (index, position, width) => {
5354
};
5455
};
5556

57+
const contextType = ThemeContext;
58+
5659
export default createStackNavigator(
5760
{
5861
Home: {
@@ -135,11 +138,12 @@ export default createStackNavigator(
135138
}
136139
),
137140
navigationOptions: {
138-
tabBarLabel: () => (
141+
tabBarLabel: props => (
139142
<Text
140143
style={[
141144
// eslint-disable-next-line react-native/no-inline-styles
142145
{
146+
color: props.tintColor,
143147
textAlign: 'center',
144148
fontSize: 11,
145149
...fontStyles.bold
@@ -171,11 +175,12 @@ export default createStackNavigator(
171175
}
172176
}),
173177
navigationOptions: {
174-
tabBarLabel: () => (
178+
tabBarLabel: props => (
175179
<Text
176180
style={[
177181
// eslint-disable-next-line react-native/no-inline-styles
178182
{
183+
color: props.tintColor,
179184
textAlign: 'center',
180185
fontSize: 11,
181186
...fontStyles.bold
@@ -197,20 +202,29 @@ export default createStackNavigator(
197202
}
198203
},
199204
{
200-
defaultNavigationOptions: () => ({
201-
tabBarVisible: true,
202-
animationEnabled: true,
203-
tabBarOptions: {
204-
style: {
205-
backgroundColor: colors.white,
206-
height: 50,
207-
borderTopColor: colors.$F0F0F0
208-
},
209-
tabStyle: {
210-
height: 50
205+
defaultNavigationOptions: props => {
206+
return {
207+
tabBarVisible: true,
208+
animationEnabled: true,
209+
210+
tabBarOptions: {
211+
activeTintColor: props.theme === 'light' ? colors.paliGrey300 : colors.white,
212+
inactiveTintColor: props.theme === 'light' ? colors.paliGrey300 : colors.white,
213+
tabStyle: {
214+
height: 50
215+
},
216+
style: {
217+
backgroundColor: props.theme === 'light' ? colors.white : colors.brandBlue500,
218+
height: 50,
219+
borderTopColor: 'rgba(0, 0, 0, 0.1)',
220+
borderLeftColor: 'rgba(0, 0, 0, 0.1)',
221+
borderRightColor: 'rgba(0, 0, 0, 0.1)',
222+
borderBottomColor: 'transparent',
223+
borderWidth: 1
224+
}
211225
}
212-
}
213-
})
226+
};
227+
}
214228
}
215229
)
216230
},
@@ -422,6 +436,7 @@ export default createStackNavigator(
422436
},
423437
{
424438
mode: 'card',
439+
425440
headerMode: 'none',
426441
lazy: true,
427442
transitionConfig: () => ({

0 commit comments

Comments
 (0)