Skip to content

Commit

Permalink
Merge pull request #410 from Psychedelic/0.2.0
Browse files Browse the repository at this point in the history
v0.2.0
  • Loading branch information
ignaciosantise authored Sep 26, 2022
2 parents 0d998d4 + 7994044 commit 6a3666f
Show file tree
Hide file tree
Showing 174 changed files with 4,097 additions and 2,125 deletions.
24 changes: 14 additions & 10 deletions App.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import '@/config/logs';
import '@/config/i18n';
import '@/config/reactotron';
import '@/config/extensions';

import * as Sentry from '@sentry/react-native';
import React, { useEffect, useRef } from 'react';
import React, { useEffect, useRef, useState } from 'react';
import { AppState, Platform, StatusBar } from 'react-native';
import RNBootSplash from 'react-native-bootsplash';
import codePush from 'react-native-code-push';
Expand All @@ -14,7 +15,7 @@ import {
getVersion,
} from 'react-native-device-info';
import { SafeAreaProvider } from 'react-native-safe-area-context';
import { Provider, useDispatch, useSelector } from 'react-redux';
import { Provider, useDispatch } from 'react-redux';
import Reactotron from 'reactotron-react-native';
import { PersistGate } from 'redux-persist/integration/react';

Expand Down Expand Up @@ -46,8 +47,8 @@ Sentry.init({
});

const PersistedApp = () => {
const { instance } = useSelector(state => state.keyring);
const appState = useRef(AppState.currentState);
const [showRoutes, setShowRoutes] = useState(false);
const dispatch = useDispatch();

useEffect(() => {
Expand Down Expand Up @@ -77,19 +78,22 @@ const PersistedApp = () => {
};

useEffect(() => {
if (instance) {
RNBootSplash.hide({ fade: true });
} else {
dispatch(initKeyring());
}
}, [instance]);
dispatch(
initKeyring({
callback: () => {
RNBootSplash.hide({ fade: true });
setShowRoutes(true);
},
})
);
}, []);

return (
<PersistGate loading={null} persistor={persistor}>
<ErrorBoundary>
<SafeAreaProvider>
<StatusBar barStyle="light-content" backgroundColor="black" />
{!!instance && (
{showRoutes && (
<Routes
routingInstrumentation={routingInstrumentation}
ref={TopLevelNavigationRef}
Expand Down
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,8 @@ android {
applicationId "co.psychedelic.plug"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 4
versionName "0.1.4"
versionCode 16
versionName "0.2.0"
resValue "string", "build_config_package", "co.psychedelic.plug"
}
splits {
Expand Down
5 changes: 5 additions & 0 deletions android/app/src/main/res/values-night/colors.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="alert_background">#1E1F27</color>
<color name="alert_text">#ffffff</color>
</resources>
5 changes: 4 additions & 1 deletion android/app/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="bootsplash_background">#15161C</color>
</resources>
<color name="alert_background">#ffffff</color>
<color name="alert_text">#0f2438</color>
</resources>
7 changes: 7 additions & 0 deletions android/app/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<style name="AppTheme" parent="Theme.AppCompat.DayNight.NoActionBar">
<!-- Customize your theme here. -->
<item name="android:textColor">#000000</item>
<item name="android:alertDialogTheme">@style/AlertDialogTheme</item>
</style>

<!-- BootTheme should inherit from Theme.SplashScreen -->
Expand All @@ -13,4 +14,10 @@
<item name="postSplashScreenTheme">@style/AppTheme</item>
</style>

<style name="AlertDialogTheme" parent="Base.Theme.AppCompat.Light.Dialog.Alert">
<item name="android:background">@color/alert_background</item>
<item name="android:textColor">@color/alert_text</item>
<item name="android:textColorPrimary">@color/alert_text</item>
</style>

</resources>
2 changes: 2 additions & 0 deletions declarations.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ declare module '*.svg' {
const content: React.FC<SvgProps>;
export default content;
}
declare module 'react-native-fetch-api';
declare module 'react-native-crypto-js';
4 changes: 2 additions & 2 deletions ios/Plug.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -572,7 +572,7 @@
"$(inherited)",
"$(PROJECT_DIR)/rust/.cargo/mobile_app/target/universal/release",
);
MARKETING_VERSION = 0.1.4;
MARKETING_VERSION = 0.2.0;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
Expand Down Expand Up @@ -614,7 +614,7 @@
"$(inherited)",
"$(PROJECT_DIR)/rust/.cargo/mobile_app/target/universal/release",
);
MARKETING_VERSION = 0.1.4;
MARKETING_VERSION = 0.2.0;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
Expand Down
34 changes: 8 additions & 26 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,19 +1,4 @@
PODS:
- AFNetworking (3.2.1):
- AFNetworking/NSURLSession (= 3.2.1)
- AFNetworking/Reachability (= 3.2.1)
- AFNetworking/Security (= 3.2.1)
- AFNetworking/Serialization (= 3.2.1)
- AFNetworking/UIKit (= 3.2.1)
- AFNetworking/NSURLSession (3.2.1):
- AFNetworking/Reachability
- AFNetworking/Security
- AFNetworking/Serialization
- AFNetworking/Reachability (3.2.1)
- AFNetworking/Security (3.2.1)
- AFNetworking/Serialization (3.2.1)
- AFNetworking/UIKit (3.2.1):
- AFNetworking/NSURLSession
- Base64 (1.1.2)
- boost (1.76.0)
- BVLinearGradient (2.5.6):
Expand Down Expand Up @@ -315,9 +300,6 @@ PODS:
- react-native-file-access (2.4.1):
- React-Core
- ZIPFoundation (< 0.9.12)
- react-native-minimizer (1.3.3):
- AFNetworking (~> 3.0)
- React
- react-native-pager-view (5.4.11):
- React-Core
- react-native-randombytes (3.6.1):
Expand Down Expand Up @@ -424,6 +406,8 @@ PODS:
- SDWebImageWebPCoder (~> 0.8.4)
- RNFileViewer (2.1.5):
- React-Core
- RNFlashList (1.2.1):
- React-Core
- RNGestureHandler (2.4.2):
- React-Core
- RNLocalize (2.2.2):
Expand Down Expand Up @@ -465,7 +449,7 @@ PODS:
- RNSentry (4.1.2):
- React-Core
- Sentry (= 7.20.0)
- RNSVG (12.3.0):
- RNSVG (12.4.4):
- React-Core
- RNVectorIcons (8.1.0):
- React-Core
Expand Down Expand Up @@ -530,7 +514,6 @@ DEPENDENCIES:
- "react-native-blur (from `../node_modules/@react-native-community/blur`)"
- react-native-config (from `../node_modules/react-native-config`)
- react-native-file-access (from `../node_modules/react-native-file-access`)
- react-native-minimizer (from `../node_modules/react-native-minimizer`)
- react-native-pager-view (from `../node_modules/react-native-pager-view`)
- react-native-randombytes (from `../node_modules/react-native-randombytes`)
- react-native-safe-area-context (from `../node_modules/react-native-safe-area-context`)
Expand Down Expand Up @@ -558,6 +541,7 @@ DEPENDENCIES:
- RNDeviceInfo (from `../node_modules/react-native-device-info`)
- RNFastImage (from `../node_modules/react-native-fast-image`)
- RNFileViewer (from `../node_modules/react-native-file-viewer`)
- "RNFlashList (from `../node_modules/@shopify/flash-list`)"
- RNGestureHandler (from `../node_modules/react-native-gesture-handler`)
- RNLocalize (from `../node_modules/react-native-localize`)
- RNOS (from `../node_modules/react-native-os`)
Expand All @@ -572,7 +556,6 @@ DEPENDENCIES:

SPEC REPOS:
trunk:
- AFNetworking
- Base64
- CocoaAsyncSocket
- Flipper
Expand Down Expand Up @@ -640,8 +623,6 @@ EXTERNAL SOURCES:
:path: "../node_modules/react-native-config"
react-native-file-access:
:path: "../node_modules/react-native-file-access"
react-native-minimizer:
:path: "../node_modules/react-native-minimizer"
react-native-pager-view:
:path: "../node_modules/react-native-pager-view"
react-native-randombytes:
Expand Down Expand Up @@ -696,6 +677,8 @@ EXTERNAL SOURCES:
:path: "../node_modules/react-native-fast-image"
RNFileViewer:
:path: "../node_modules/react-native-file-viewer"
RNFlashList:
:path: "../node_modules/@shopify/flash-list"
RNGestureHandler:
:path: "../node_modules/react-native-gesture-handler"
RNLocalize:
Expand Down Expand Up @@ -726,7 +709,6 @@ CHECKOUT OPTIONS:
:tag: 7.20.0

SPEC CHECKSUMS:
AFNetworking: b6f891fdfaed196b46c7a83cf209e09697b94057
Base64: cecfb41a004124895a7bcee567a89bae5a89d49b
boost: a7c83b31436843459a1961bfd74b96033dc77234
BVLinearGradient: e3aad03778a456d77928f594a649e96995f1c872
Expand Down Expand Up @@ -765,7 +747,6 @@ SPEC CHECKSUMS:
react-native-blur: cad4d93b364f91e7b7931b3fa935455487e5c33c
react-native-config: 6502b1879f97ed5ac570a029961fc35ea606cd14
react-native-file-access: 8c7b3c8935f7f33e31e16439b5882caa620cc493
react-native-minimizer: b33b62100148ac712cd6b314fcfd9c9a98a8d1a3
react-native-pager-view: 7f00d63688f7df9fad86dfb0154814419cc5eb8d
react-native-randombytes: 421f1c7d48c0af8dbcd471b0324393ebf8fe7846
react-native-safe-area-context: ebf8c413eb8b5f7c392a036a315eb7b46b96845f
Expand Down Expand Up @@ -793,14 +774,15 @@ SPEC CHECKSUMS:
RNDeviceInfo: aad3c663b25752a52bf8fce93f2354001dd185aa
RNFastImage: 1f2cab428712a4baaf78d6169eaec7f622556dd7
RNFileViewer: ce7ca3ac370e18554d35d6355cffd7c30437c592
RNFlashList: 5318fc0772902ffa55170b35caa95ad5a69da3ef
RNGestureHandler: 61628a2c859172551aa2100d3e73d1e57878392f
RNLocalize: 95a43f85e41a966be7bc9cff2437128911c52da0
RNOS: 6f2f9a70895bbbfbdad7196abd952e7b01d45027
RNReactNativeHapticFeedback: 4085973f5a38b40d3c6793a3ee5724773eae045e
RNReanimated: 58b57be69a237fb02ec8099d25171057638cf41a
RNScreens: 40a2cb40a02a609938137a1e0acfbf8fc9eebf19
RNSentry: b7b82fd671772dda9ae063af0b4873251aa04bdb
RNSVG: 302bfc9905bd8122f08966dc2ce2d07b7b52b9f8
RNSVG: ecd661f380a07ba690c9c5929c475a44f432d674
RNVectorIcons: 31cebfcf94e8cf8686eb5303ae0357da64d7a5a4
SDWebImage: a7f831e1a65eb5e285e3fb046a23fcfbf08e696d
SDWebImageWebPCoder: f93010f3f6c031e2f8fb3081ca4ee6966c539815
Expand Down
16 changes: 7 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Plug",
"version": "0.1.4(1)",
"name": "plug-mobile",
"version": "0.2.0",
"private": true,
"scripts": {
"rename-build": "chmod +x ./rename-ic-agent.sh && ./rename-ic-agent.sh",
Expand Down Expand Up @@ -33,7 +33,8 @@
"@dfinity/candid": "0.9.3",
"@dfinity/principal": "^0.9.3",
"@hookform/error-message": "^2.0.0",
"@psychedelic/plug-controller": "0.19.2",
"@psychedelic/dab-js": "1.4.10",
"@psychedelic/plug-controller": "0.20.4",
"@react-native-async-storage/async-storage": "^1.15.11",
"@react-native-community/blur": "^3.6.0",
"@react-native-community/clipboard": "^1.5.1",
Expand All @@ -44,10 +45,11 @@
"@react-navigation/native": "^6.0.10",
"@react-navigation/stack": "^6.2.1",
"@reduxjs/toolkit": "^1.6.1",
"@sentry/react-native": "^4.1.2",
"@shopify/flash-list": "^1.2.1",
"@tradle/react-native-http": "^2.0.1",
"@walletconnect/client": "^1.7.5",
"assert": "^2.0.0",
"@sentry/react-native": "^4.1.2",
"assert-browserify": "^2.0.0",
"axios": "0.24.0",
"babel-plugin-transform-exponentiation-operator": "^6.24.1",
Expand Down Expand Up @@ -92,10 +94,8 @@
"react-native-file-viewer": "^2.1.5",
"react-native-gesture-handler": "^2.4.2",
"react-native-haptic-feedback": "^1.11.0",
"react-native-level-fs": "^3.0.1",
"react-native-linear-gradient": "^2.5.6",
"react-native-localize": "^2.2.2",
"react-native-minimizer": "^1.3.0",
"react-native-modalize": "^2.0.13",
"react-native-os": "^1.2.6",
"react-native-pager-view": "^5.4.4",
Expand All @@ -106,7 +106,7 @@
"react-native-safe-area-context": "^4.2.5",
"react-native-screens": "^3.13.1",
"react-native-sensitive-info": "^6.0.0-alpha.9",
"react-native-svg": "^12.1.1",
"react-native-svg": "^12.4.4",
"react-native-tab-view": "^3.1.1",
"react-native-tcp-socket": "^5.6.2",
"react-native-udp": "^4.1.5",
Expand Down Expand Up @@ -173,7 +173,6 @@
"os": "react-native-os",
"path": "path-browserify",
"querystring": "querystring-es3",
"fs": "react-native-level-fs",
"dgram": "react-native-udp",
"timers": "timers-browserify",
"tty": "tty-browserify",
Expand All @@ -198,7 +197,6 @@
"os": "react-native-os",
"path": "path-browserify",
"querystring": "querystring-es3",
"fs": "react-native-level-fs",
"dgram": "react-native-udp",
"timers": "timers-browserify",
"tty": "tty-browserify",
Expand Down
4 changes: 2 additions & 2 deletions pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@

[Change!] Show the screenshots of the views you modified.

## Notion Ticket
## Github Issue

[Change!] Link to the associated Notion ticket.
[Change!] Link to the associated Github issue.
8 changes: 6 additions & 2 deletions src/components/buttons/Button/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ interface Props {
disabled?: boolean;
disableAnimation?: boolean;
loading?: boolean;
iconProps?: { height?: number; width?: number };
}

const Button = ({
Expand All @@ -39,14 +40,15 @@ const Button = ({
disabled = false,
disableAnimation = false,
loading = false,
iconProps,
...props
}: Props) => {
return (
<Touchable
scale={animationScales.medium}
disabled={disabled || disableAnimation}
onPress={onPress}
onLongPress={onLongPress}>
onLongPress={onLongPress || onPress}>
<View style={[styles.button, buttonStyle]} {...props}>
{loading ? (
<ActivityIndicator style={StyleSheet.absoluteFill} color="white" />
Expand All @@ -57,7 +59,9 @@ const Button = ({
style={[textStyle, disabled && styles.disabled]}>
{text}
</Text>
{iconName && <Icon name={iconName} style={iconStyle} />}
{iconName && (
<Icon name={iconName} style={iconStyle} {...iconProps} />
)}
</>
)}
</View>
Expand Down
6 changes: 3 additions & 3 deletions src/components/buttons/RainbowButton/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { StyleProp, TextProps, ViewProps } from 'react-native';
import { StyleProp, TextStyle, ViewStyle } from 'react-native';
import LinearGradient from 'react-native-linear-gradient';

import Button from '@/buttons/Button';
Expand All @@ -11,8 +11,8 @@ import { styles } from './styles';
interface Props {
text: string;
onPress: () => void;
buttonStyle?: StyleProp<ViewProps>;
textStyle?: StyleProp<TextProps>;
buttonStyle?: StyleProp<ViewStyle>;
textStyle?: StyleProp<TextStyle>;
disabled?: boolean;
onLongPress?: () => void;
loading?: boolean;
Expand Down
Loading

0 comments on commit 6a3666f

Please sign in to comment.