Skip to content

Commit 2b330ea

Browse files
authored
Merge pull request #198 from VerusCoin/dev
v1.0.23
2 parents 211a6bb + e71ace8 commit 2b330ea

File tree

25 files changed

+1511
-99
lines changed

25 files changed

+1511
-99
lines changed

android/app/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import com.android.build.OutputFile
55

66
def versionMajor = 1
77
def versionMinor = 0
8-
def versionRevision = 22
8+
def versionRevision = 23
99
def versionBuild = 0
1010

1111
def keystorePropertiesFile = rootProject.file("keystore.properties");

env/main.android.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"APP_VERSION": "1.0.22",
2+
"APP_VERSION": "1.0.23",
33
"ELECTRUM_PROTOCOL_CHANGE": 1.4,
44

55
"KEY_DERIVATION_VERSION": 1,

env/main.ios.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"APP_VERSION": "1.0.22",
2+
"APP_VERSION": "1.0.23",
33
"ELECTRUM_PROTOCOL_CHANGE": 1.4,
44

55
"KEY_DERIVATION_VERSION": 1,

ios/assets/env/main.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"APP_VERSION": "1.0.22",
2+
"APP_VERSION": "1.0.23",
33
"ELECTRUM_PROTOCOL_CHANGE": 1.4,
44

55
"KEY_DERIVATION_VERSION": 1,

ios/verusMobile.xcodeproj/project.pbxproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -745,7 +745,7 @@
745745
"\"${PODS_CONFIGURATION_BUILD_DIR}/react-native-webview\"",
746746
"\"${PODS_CONFIGURATION_BUILD_DIR}/rn-fetch-blob\"",
747747
);
748-
MARKETING_VERSION = 1.0.22;
748+
MARKETING_VERSION = 1.0.23;
749749
PRODUCT_BUNDLE_IDENTIFIER = org.reactjs.native.verusmobile;
750750
PRODUCT_NAME = verusmobile;
751751
PROVISIONING_PROFILE_SPECIFIER = "";
@@ -817,7 +817,7 @@
817817
"\"${PODS_CONFIGURATION_BUILD_DIR}/react-native-webview\"",
818818
"\"${PODS_CONFIGURATION_BUILD_DIR}/rn-fetch-blob\"",
819819
);
820-
MARKETING_VERSION = 1.0.22;
820+
MARKETING_VERSION = 1.0.23;
821821
PRODUCT_BUNDLE_IDENTIFIER = org.reactjs.native.verusmobile;
822822
PRODUCT_NAME = verusmobile;
823823
PROVISIONING_PROFILE_SPECIFIER = "";

ios/verusMobile/Info.plist

+30-10
Original file line numberDiff line numberDiff line change
@@ -48,16 +48,36 @@
4848
</dict>
4949
</dict>
5050
</dict>
51-
<key>NSCameraUsageDescription</key>
52-
<string>Verus Mobile needs access to the camera to scan QR codes, and to allow you to add images to your locally encrypted personal profile</string>
53-
<key>NSFaceIDUsageDescription</key>
54-
<string>Enabling Face ID allows you quick and secure access to your account.</string>
55-
<key>NSMicrophoneUsageDescription</key>
56-
<string>Verus Mobile needs access to the camera to scan QR codes</string>
57-
<key>NSPhotoLibraryAddUsageDescription</key>
58-
<string>The user can save QR code invoices to their photo library.</string>
59-
<key>NSPhotoLibraryUsageDescription</key>
60-
<string>The user can use the photo library to add images to their locally encrypted personal profile</string>
51+
<key>NSAppleMusicUsageDescription</key>
52+
<string>The app does not request this permission or utilize this functionality but it is included in our info.plist since our app utilizes the react-native-permissions library, which references this permission in its code.</string>
53+
<key>NSBluetoothAlwaysUsageDescription</key>
54+
<string>The app does not request this permission or utilize this functionality but it is included in our info.plist since our app utilizes the react-native-permissions library, which references this permission in its code.</string>
55+
<key>NSBluetoothPeripheralUsageDescription</key>
56+
<string>The app does not request this permission or utilize this functionality but it is included in our info.plist since our app utilizes the react-native-permissions library, which references this permission in its code.</string>
57+
<key>NSCalendarsUsageDescription</key>
58+
<string>The app does not request this permission or utilize this functionality but it is included in our info.plist since our app utilizes the react-native-permissions library, which references this permission in its code.</string>
59+
<key>NSCameraUsageDescription</key>
60+
<string>Verus Mobile needs access to the camera to scan QR codes, and to allow you to add images to your locally encrypted personal profile</string>
61+
<key>NSContactsUsageDescription</key>
62+
<string>The app does not request this permission or utilize this functionality but it is included in our info.plist since our app utilizes the react-native-permissions library, which references this permission in its code.</string>
63+
<key>NSFaceIDUsageDescription</key>
64+
<string>Enabling Face ID allows you quick and secure access to your account.</string>
65+
<key>NSLocationAlwaysUsageDescription</key>
66+
<string>The app does not request this permission or utilize this functionality but it is included in our info.plist since our app utilizes the react-native-permissions library, which references this permission in its code.</string>
67+
<key>NSLocationWhenInUseUsageDescription</key>
68+
<string>The app does not request this permission or utilize this functionality but it is included in our info.plist since our app utilizes the react-native-permissions library, which references this permission in its code.</string>
69+
<key>NSMicrophoneUsageDescription</key>
70+
<string>Verus Mobile needs access to the camera to scan QR codes</string>
71+
<key>NSMotionUsageDescription</key>
72+
<string>The app does not request this permission or utilize this functionality but it is included in our info.plist since our app utilizes the react-native-permissions library, which references this permission in its code.</string>
73+
<key>NSPhotoLibraryAddUsageDescription</key>
74+
<string>The user can save QR code invoices to their photo library.</string>
75+
<key>NSPhotoLibraryUsageDescription</key>
76+
<string>The user can use the photo library to add images to their locally encrypted personal profile</string>
77+
<key>NSSiriUsageDescription</key>
78+
<string>The app does not request this permission or utilize this functionality but it is included in our info.plist since our app utilizes the react-native-permissions library, which references this permission in its code.</string>
79+
<key>NSSpeechRecognitionUsageDescription</key>
80+
<string>The app does not request this permission or utilize this functionality but it is included in our info.plist since our app utilizes the react-native-permissions library, which references this permission in its code.</string>
6181
<key>UIAppFonts</key>
6282
<array>
6383
<string>AntDesign.ttf</string>

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "verusmobile",
3-
"version": "1.0.22",
3+
"version": "1.0.23",
44
"private": true,
55
"scripts": {
66
"postinstall": "./node_modules/.bin/rn-nodeify --hack --install --yarn && npx jetify",

src/components/BarcodeReader/BarcodeReader.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ const BarcodeReader = props => {
108108
}}
109109
device={device}
110110
codeScanner={codeScanner}
111-
isActive={appStateVisible === 'active'}
111+
isActive={appStateVisible === 'active' && !props.cameraDisabled}
112112
{...cameraProps}
113113
/>
114114
<View style={{
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,207 @@
1+
import React, { useState, useEffect, useRef } from "react";
2+
import { Platform, SafeAreaView, View } from "react-native";
3+
import { Text, Portal, Button, IconButton } from "react-native-paper";
4+
import Colors from "../../globals/colors";
5+
import SemiModal from "../SemiModal";
6+
import { createMaterialTopTabNavigator } from '@react-navigation/material-top-tabs';
7+
import { NavigationContainer } from "@react-navigation/native";
8+
import { createStackNavigator } from "@react-navigation/stack";
9+
import AnimatedActivityIndicatorBox from "../AnimatedActivityIndicatorBox";
10+
11+
import { useSelector } from "react-redux";
12+
import { CONVERT_CARD_MODAL_MODES } from "../../utils/constants/convert";
13+
import SearchableList from "../SearchableList";
14+
15+
const TopTabs = createMaterialTopTabNavigator();
16+
const Root = createStackNavigator();
17+
18+
const ConvertCardModal = ({
19+
onClose,
20+
visible,
21+
setVisible,
22+
totalBalances,
23+
mode,
24+
networks,
25+
converters,
26+
currencies,
27+
addresses,
28+
onSelectNetwork,
29+
onSelectAddress,
30+
onSelectCurrency,
31+
onSelectConverter,
32+
loading
33+
}) => {
34+
const [preventExit, setPreventExit] = useState(false);
35+
const [modalHeight, setModalHeight] = useState(600); // Adjust as needed
36+
37+
const activeCoinsForUser = useSelector(state => state.coins.activeCoinsForUser);
38+
const [modalTitle, setModalTitle] = useState("Title");
39+
40+
useEffect(() => {
41+
// Handle side effects here if necessary
42+
}, []);
43+
44+
const cancel = () => {
45+
if (!preventExit) {
46+
setVisible(false);
47+
if (onClose) {
48+
onClose();
49+
}
50+
}
51+
};
52+
53+
const showHelpModal = () => {
54+
// Implement your help modal logic here
55+
};
56+
57+
return (
58+
<Portal>
59+
<NavigationContainer>
60+
<SemiModal
61+
animationType="slide"
62+
transparent={true}
63+
visible={visible}
64+
onRequestClose={cancel}
65+
contentContainerStyle={{
66+
height: modalHeight,
67+
flex: 0,
68+
backgroundColor: "white",
69+
}}
70+
>
71+
{loading ? <AnimatedActivityIndicatorBox /> :
72+
<SafeAreaView style={{ flex: 1 }}>
73+
<Root.Navigator
74+
screenOptions={{
75+
header: () => (
76+
<View style={{
77+
flexDirection: 'row',
78+
alignItems: "center",
79+
justifyContent: "space-between",
80+
backgroundColor: Colors.secondaryColor
81+
}}>
82+
<IconButton icon="close" size={16} iconColor={Colors.verusDarkGray} />
83+
<Text style={{ marginBottom: 16, fontSize: 16, textAlign: "center" }}>
84+
{modalTitle}
85+
</Text>
86+
</View>
87+
),
88+
headerStyle: {
89+
height: 52,
90+
},
91+
}}
92+
>
93+
<Root.Screen name="ModalInner">
94+
{() => (
95+
<TopTabs.Navigator
96+
initialRouteName="SelectCurrency"
97+
backBehavior="none"
98+
tabBarPosition="bottom"
99+
screenOptions={{
100+
swipeEnabled: false,
101+
tabBarPressColor: "transparent",
102+
tabBarPressOpacity: 1,
103+
tabBarLabelStyle: {
104+
fontSize: 12,
105+
},
106+
lazy: true,
107+
lazyPlaceholder: () => <AnimatedActivityIndicatorBox />,
108+
}}
109+
>
110+
<TopTabs.Screen
111+
name="SelectCurrency"
112+
options={{
113+
tabBarLabel: 'Currency',
114+
}}
115+
listeners={{
116+
tabPress: e => {
117+
e.preventDefault();
118+
},
119+
}}
120+
>
121+
{tabProps => (
122+
<SearchableList
123+
{...tabProps}
124+
items={currencies}
125+
setModalTitle={setModalTitle}
126+
onSelect={onSelectCurrency}
127+
nextScreen="SelectNetwork"
128+
/>
129+
)}
130+
</TopTabs.Screen>
131+
<TopTabs.Screen
132+
name="SelectNetwork"
133+
options={{
134+
tabBarLabel: 'Network',
135+
}}
136+
listeners={{
137+
tabPress: e => {
138+
e.preventDefault();
139+
},
140+
}}
141+
>
142+
{tabProps => (
143+
<SearchableList
144+
{...tabProps}
145+
items={networks}
146+
setModalTitle={setModalTitle}
147+
onSelect={onSelectNetwork}
148+
nextScreen={mode === CONVERT_CARD_MODAL_MODES.SEND ? "SelectAddress" : "SelectConverter"}
149+
/>
150+
)}
151+
</TopTabs.Screen>
152+
{mode === CONVERT_CARD_MODAL_MODES.RECEIVE && (
153+
<TopTabs.Screen
154+
name="SelectConverter"
155+
options={{
156+
tabBarLabel: 'Via',
157+
}}
158+
listeners={{
159+
tabPress: e => {
160+
e.preventDefault();
161+
},
162+
}}
163+
>
164+
{tabProps => (
165+
<SearchableList
166+
{...tabProps}
167+
items={converters}
168+
setModalTitle={setModalTitle}
169+
onSelect={onSelectConverter}
170+
nextScreen="SelectAddress"
171+
/>
172+
)}
173+
</TopTabs.Screen>
174+
)}
175+
<TopTabs.Screen
176+
name="SelectAddress"
177+
options={{
178+
tabBarLabel: mode === CONVERT_CARD_MODAL_MODES.SEND ? 'Source' : 'Dest',
179+
}}
180+
listeners={{
181+
tabPress: e => {
182+
e.preventDefault();
183+
},
184+
}}
185+
>
186+
{tabProps => (
187+
<SearchableList
188+
{...tabProps}
189+
items={addresses}
190+
setModalTitle={setModalTitle}
191+
onSelect={onSelectAddress}
192+
/>
193+
)}
194+
</TopTabs.Screen>
195+
</TopTabs.Navigator>
196+
)}
197+
</Root.Screen>
198+
</Root.Navigator>
199+
</SafeAreaView>
200+
}
201+
</SemiModal>
202+
</NavigationContainer>
203+
</Portal>
204+
);
205+
};
206+
207+
export default ConvertCardModal;

0 commit comments

Comments
 (0)