Skip to content

Commit

Permalink
Merge pull request #136 from syscoin/dev
Browse files Browse the repository at this point in the history
feat: updates main with dev
  • Loading branch information
ThalesBMC authored Apr 5, 2024
2 parents b7c9871 + a354e66 commit cd3cf5d
Show file tree
Hide file tree
Showing 337 changed files with 6,321 additions and 2,460 deletions.
7 changes: 4 additions & 3 deletions app/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ android {
applicationId "io.paliwallet"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 30
versionName "1.1.4"
versionCode 32
versionName "1.2.0"
multiDexEnabled true
missingDimensionStrategy "minReactNative", "minReactNative46"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
Expand Down Expand Up @@ -116,7 +116,8 @@ dependencies {
implementation project(":react-native-haptic-feedback")
implementation project(':react-native-gesture-handler')
implementation project(path: ":@react-native-firebase_analytics")

implementation project(':react-native-theme-switch-animation')

implementation 'androidx.multidex:multidex:2.0.1'
implementation 'androidx.annotation:annotation:1.1.0'
implementation 'androidx.appcompat:appcompat:1.2.0'
Expand Down
2 changes: 1 addition & 1 deletion app/android/app/google-services.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@
}
],
"configuration_version": "1"
}
}
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import com.swmansion.reanimated.ReanimatedJSIModulePackage;
import com.facebook.react.bridge.JSIModulePackage;


import android.text.TextUtils;

import androidx.multidex.MultiDexApplication;
Expand Down Expand Up @@ -77,12 +78,14 @@ protected List<ReactPackage> getPackages() {
@SuppressWarnings("UnnecessaryLocalVariable")
List<ReactPackage> packages = new PackageList(this).getPackages();
packages.add(new LottiePackage());

packages.add(new RNGestureHandlerPackage());
packages.add(new PreventScreenshotPackage());
packages.add(new RNToolsPackage());
packages.add(new MPAndroidChartPackage());
packages.add(new BlurViewPackage());
packages.add(new ReactVideoPackage());

packages.add(new RNThreadPackage(
mReactNativeHost,
new AsyncStoragePackage(),
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion app/android/app/src/main/res/layout/launch_screen.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#ffffffff">
android:background="@color/splash_background">
<com.airbnb.lottie.LottieAnimationView
android:id="@+id/lottie"
android:layout_centerHorizontal="true"
Expand Down
2 changes: 1 addition & 1 deletion app/android/app/src/main/res/raw/splash_screen.json

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions app/android/app/src/main/res/values-night/attrs.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<resources>
<attr name="splashBackground" format="reference" />
</resources>
7 changes: 7 additions & 0 deletions app/android/app/src/main/res/values-night/colors.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="white">#0e223a</color>
<color name="lightgray">#EBEBED</color>
<color name="splash_background">#111E33</color>
<color name="app_background_dark">#111E33</color>
</resources>
4 changes: 4 additions & 0 deletions app/android/app/src/main/res/values-night/strings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<resources>
<string name="app_name">Pali Wallet</string>
<string moduleConfig="true" name="CodePushDeploymentKey">WYjNfoQiWyFCUGjLVxChK3u4BSm2BCb25Gerw</string>
</resources>
9 changes: 9 additions & 0 deletions app/android/app/src/main/res/values-night/styles.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<resources>

<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.DayNight.NoActionBar">
<!-- Use light theme splash background -->
<item name="splashBackground">@color/splash_background</item>
<item name="android:windowBackground">@color/app_background_dark</item>
</style>
</resources>
3 changes: 3 additions & 0 deletions app/android/app/src/main/res/values/attrs.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<resources>
<attr name="splashBackground" format="reference" />
</resources>
2 changes: 2 additions & 0 deletions app/android/app/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@
<resources>
<color name="white">#0e223a</color>
<color name="lightgray">#EBEBED</color>
<color name="splash_background">#FFFFFF</color>
<color name="app_background_light">#FFFFFF</color>
</resources>
2 changes: 1 addition & 1 deletion app/android/app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<resources>
<string name="app_name">Pali Wallet</string>
<string moduleConfig="true" name="CodePushDeploymentKey">Insert your Key Here</string>
<string moduleConfig="true" name="CodePushDeploymentKey">WYjNfoQiWyFCUGjLVxChK3u4BSm2BCb25Gerw</string>
</resources>
9 changes: 4 additions & 5 deletions app/android/app/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@

<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<!-- Customize your theme here. -->
<item name="android:editTextBackground">@drawable/rn_edit_text_material</item>
<item name="android:windowIsTranslucent">true</item>
</style>

<!-- Use light theme splash background -->
<item name="splashBackground">@color/splash_background</item>
<item name="android:windowBackground">@color/app_background_light</item>
</style>
</resources>
13 changes: 13 additions & 0 deletions app/android/link-assets-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"migIndex": 1,
"data": [
{
"path": "assets/fonts/Poppins-Regular.ttf",
"sha1": "fdd3002e7d814ee47c1c1b8487c72c6bbb3a2d00"
},
{
"path": "assets/fonts/Poppins-SemiBold.ttf",
"sha1": "8a4ace9392d06bcb7f8ea2f5169b07e4c383a90d"
}
]
}
2 changes: 2 additions & 0 deletions app/android/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ include ':app', ':react-native-code-push'
project(':react-native-code-push').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-code-push/android/app')
include ':@react-native-firebase_analytics'
project(':@react-native-firebase_analytics').projectDir = new File(rootProject.projectDir, './../node_modules/@react-native-firebase/analytics/android')
include ':react-native-theme-switch-animation'
project(':react-native-theme-switch-animation').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-theme-switch-animation/android')
include ':react-native-threads'
project(':react-native-threads').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-threads/android')
include ':app'
22 changes: 20 additions & 2 deletions app/app/components/App/index.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import React, { PureComponent } from 'react';
import { Linking, View } from 'react-native';
import { createAppContainer, createSwitchNavigator, NavigationActions } from 'react-navigation';
import codePush from 'react-native-code-push';

import { setCustomText } from 'react-native-global-props';
import { createStackNavigator } from 'react-navigation-stack';

import Login from '../Views/Login';
import Onboarding from '../Views/Onboarding';
import ChoosePassword from '../Views/ChoosePassword';
Expand All @@ -11,7 +13,7 @@ import Entry from '../Views/Entry';
import Main from '../Main';
import SharedDeeplinkManager from '../../core/DeeplinkManager';
import { initApiClient } from '../../util/ApiClient';
import { Linking } from 'react-native';
import { ThemeContext } from '../../theme/ThemeProvider';
import AppConstants from '../../core/AppConstants';
import BiometricSecurity from '../Views/BiometricSecurity';
import ImportPrivateKey from '../Views/ImportPrivateKey';
Expand Down Expand Up @@ -45,6 +47,7 @@ const OnboardingView = createSwitchNavigator(
},
{
mode: 'card',

navigationOptions: {
gesturesEnabled: false
}
Expand Down Expand Up @@ -135,6 +138,8 @@ const AppNavigator = createSwitchNavigator(
const AppContainer = createAppContainer(AppNavigator);

class App extends PureComponent {
static contextType = ThemeContext;

componentDidMount = async () => {
SharedDeeplinkManager.init({
navigate: (routeName, opts) => {
Expand All @@ -146,6 +151,16 @@ class App extends PureComponent {
console.error(`Cannot initialize WalletConnect Manager.`, err);
});
}

//Sets Default Font Family
const customTextProps = {
style: {
fontFamily: 'Poppins'
}
};

setCustomText(customTextProps);

initApiClient();

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

render() {
const { theme } = this.context;

return (
<AppContainer
theme={theme}
ref={nav => {
this.navigator = nav;
}}
Expand Down
45 changes: 30 additions & 15 deletions app/app/components/Main/MainNavigator.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ import GlobeIcon from '../UI/GlobeIcon';
import WalletIcon from '../UI/WalletIcon';
import ReactNativeHapticFeedback from 'react-native-haptic-feedback';
import LanguageSelector from '../Views/LanguageSelector';
import { ThemeContext } from '../../theme/ThemeProvider';

const options = {
enableVibrateFallback: true,
Expand All @@ -53,6 +54,8 @@ const SlideFromLeft = (index, position, width) => {
};
};

const contextType = ThemeContext;

export default createStackNavigator(
{
Home: {
Expand Down Expand Up @@ -135,11 +138,12 @@ export default createStackNavigator(
}
),
navigationOptions: {
tabBarLabel: () => (
tabBarLabel: props => (
<Text
style={[
// eslint-disable-next-line react-native/no-inline-styles
{
color: props.tintColor,
textAlign: 'center',
fontSize: 11,
...fontStyles.bold
Expand Down Expand Up @@ -171,11 +175,12 @@ export default createStackNavigator(
}
}),
navigationOptions: {
tabBarLabel: () => (
tabBarLabel: props => (
<Text
style={[
// eslint-disable-next-line react-native/no-inline-styles
{
color: props.tintColor,
textAlign: 'center',
fontSize: 11,
...fontStyles.bold
Expand All @@ -197,20 +202,29 @@ export default createStackNavigator(
}
},
{
defaultNavigationOptions: () => ({
tabBarVisible: true,
animationEnabled: true,
tabBarOptions: {
style: {
backgroundColor: colors.white,
height: 50,
borderTopColor: colors.$F0F0F0
},
tabStyle: {
height: 50
defaultNavigationOptions: props => {
return {
tabBarVisible: true,
animationEnabled: true,

tabBarOptions: {
activeTintColor: props.theme === 'light' ? colors.paliGrey300 : colors.white,
inactiveTintColor: props.theme === 'light' ? colors.paliGrey300 : colors.white,
tabStyle: {
height: 50
},
style: {
backgroundColor: props.theme === 'light' ? colors.white : colors.brandBlue500,
height: 50,
borderTopColor: 'rgba(0, 0, 0, 0.1)',
borderLeftColor: 'rgba(0, 0, 0, 0.1)',
borderRightColor: 'rgba(0, 0, 0, 0.1)',
borderBottomColor: 'transparent',
borderWidth: 1
}
}
}
})
};
}
}
)
},
Expand Down Expand Up @@ -422,6 +436,7 @@ export default createStackNavigator(
},
{
mode: 'card',

headerMode: 'none',
lazy: true,
transitionConfig: () => ({
Expand Down
Loading

0 comments on commit cd3cf5d

Please sign in to comment.