Skip to content

Commit

Permalink
Merge pull request #1599 from bithyve/dev1
Browse files Browse the repository at this point in the history
Release 0.0.96(95)
  • Loading branch information
cakesoft-shashank authored Dec 21, 2022
2 parents 4b121e0 + e5cd577 commit 0be6019
Show file tree
Hide file tree
Showing 11 changed files with 277 additions and 260 deletions.
2 changes: 1 addition & 1 deletion android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ android {
applicationId "io.hexawallet.keeper"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 94
versionCode 95
versionName "0.0.96"
missingDimensionStrategy 'react-native-camera', 'general'
missingDimensionStrategy 'store', 'play'
Expand Down
184 changes: 92 additions & 92 deletions ios/hexa_keeper.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions src/common/content/language/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -469,9 +469,9 @@
"skipHealthCheckPara01": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
"skipHealthCheckPara02": "Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris",
"myWalletBackupTitle": "My Wallet Backup",
"SEED_BACKUP_CREATED": "Seed backup created",
"SEED_BACKUP_CONFIRMED": "Seed backup confirmed",
"SEED_BACKUP_CONFIRMATION_SKIPPED": "Seed health confirmation skipped",
"SEED_BACKUP_CREATED": "Recovery Phrase backup is created",
"SEED_BACKUP_CONFIRMED": "Recovery Phrase backup is confirmed",
"SEED_BACKUP_CONFIRMATION_SKIPPED": "Recovery Phrase health confirmation is skipped",
"CLOUD_BACKUP_CREATED": "Cloud backup created",
"CLOUD_BACKUP_FAILED": "Cloud backup failed",
"CLOUD_BACKUP_CONFIRMATION_SKIPPED": "Cloud backup confirmation skipped",
Expand Down Expand Up @@ -511,4 +511,4 @@
"12502": "We recommend signing in as it easily allows you to backup your wallet on your personal drive.",
"default": "We encountered a non-standard error. Please try again after sometime or contact us"
}
}
}
8 changes: 4 additions & 4 deletions src/common/content/language/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -468,9 +468,9 @@
"skipHealthCheckPara01": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
"skipHealthCheckPara02": "Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris",
"myWalletBackupTitle": "My Wallet Backup",
"SEED_BACKUP_CREATED": "Seed backup created",
"SEED_BACKUP_CONFIRMED": "Seed backup confirmed",
"SEED_BACKUP_CONFIRMATION_SKIPPED": "Seed health confirmation skipped",
"SEED_BACKUP_CREATED": "Recovery Phrase backup is created",
"SEED_BACKUP_CONFIRMED": "Recovery Phrase backup is confirmed",
"SEED_BACKUP_CONFIRMATION_SKIPPED": "Recovery Phrase health confirmation is skipped",
"CLOUD_BACKUP_CREATED": "Cloud backup created",
"CLOUD_BACKUP_FAILED": "Cloud backup failed",
"CLOUD_BACKUP_CONFIRMATION_SKIPPED": "Cloud backup confirmation skipped",
Expand Down Expand Up @@ -510,4 +510,4 @@
"12502": "We recommend signing in as it easily allows you to backup your wallet on your personal drive.",
"default": "We encountered a non-standard error. Please try again after sometime or contact us"
}
}
}
41 changes: 16 additions & 25 deletions src/screens/AppSettings/AppSettings.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import React, { useContext, useEffect, useState, useCallback } from 'react';
import { Alert, NativeModules, StyleSheet } from 'react-native';
import React, { useContext, useEffect, useState, useCallback, useMemo } from 'react';
import { Alert, StyleSheet } from 'react-native';
import { Box, Pressable, ScrollView, Text, useColorMode } from 'native-base';
import { getCloudBackupData, uploadData } from 'src/nativemodules/Cloud';
import { hp, wp } from 'src/common/data/responsiveness/responsive';
import BackupIcon from 'src/assets/images/svgs/backup.svg';
import Twitter from 'src/assets/images/svgs/Twitter.svg';
Expand All @@ -19,28 +18,36 @@ import SettingsSwitchCard from 'src/components/SettingComponent/SettingsSwitchCa
import openLink from 'src/utils/OpenLink';
import RestClient, { TorStatus } from 'src/core/services/rest/RestClient';
import { setTorEnabled } from 'src/store/reducers/settings';
import { RealmSchema } from 'src/storage/realm/enum';
import { RealmWrapperContext } from 'src/storage/realm/RealmProvider';
import { BackupHistory } from 'src/common/data/enums/BHR';
import { changeLoginMethod } from '../../store/sagaActions/login';
import TorModalMap from './TorModalMap';
import { useAppDispatch, useAppSelector } from '../../store/hooks';

const RNBiometrics = new ReactNativeBiometrics();
const { GoogleDrive } = NativeModules;

function AppSettings({ navigation }) {
const { colorMode } = useColorMode();
const [darkMode, setDarkMode] = useState(false);
const { appId } = useAppSelector((state) => state.storage);
const { backupMethod } = useAppSelector((state) => state.bhr);
const { useQuery } = useContext(RealmWrapperContext);
const data: BackupHistory = useQuery(RealmSchema.BackupHistory);

const { loginMethod }: { loginMethod: LoginMethod } = useAppSelector((state) => state.settings);
const dispatch = useAppDispatch();
const [sensorType, setSensorType] = useState('Biometrics');
const { translations, formatString } = useContext(LocalizationContext);
const { common } = translations;
const { settings } = translations;
const backupWalletStrings = translations.BackupWallet;

const [showTorModal, setShowTorModal] = useState(false);
const [torStatus, settorStatus] = useState<TorStatus>(RestClient.getTorStatus());

const backupHistory = useMemo(() => data.sorted('date', true), [data]);

const onChangeTorStatus = (status: TorStatus, message) => {
settorStatus(status);
};
Expand Down Expand Up @@ -113,26 +120,6 @@ function AppSettings({ navigation }) {
setDarkMode(!darkMode);
};

const backup = async () => {
try {
const res = await uploadData(appId, {
encData: 'vavadv',
});
console.log('RESSS', res);
} catch (error) {
console.log(error);
}
};

const doanload = async () => {
try {
const res = await getCloudBackupData();
console.log('CLOUD DATA', JSON.stringify(res));
} catch (error) {
console.log(error);
}
};

function Option({ title, subTitle, onPress, Icon }) {
return (
<Pressable
Expand Down Expand Up @@ -203,7 +190,11 @@ function AppSettings({ navigation }) {
>
<Option
title="App Backup"
subTitle="Recovery Phrases health check is due"
subTitle={
backupMethod === null
? 'Recovery Phrases health check is due'
: backupWalletStrings[backupHistory[0].title]
}
onPress={() => {
navigation.navigate('BackupWallet');
}}
Expand Down
3 changes: 0 additions & 3 deletions src/screens/ExportSeedScreen/ExportSeedScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@ function ExportSeedScreen({ route, navigation }) {
const { backupMethod } = useAppSelector((state) => state.bhr);
const seedText = translations.seed;

console.log('showWordIndex', showWordIndex, typeof showWordIndex);

console.log('showWordIndex', showWordIndex, typeof showWordIndex);

useEffect(() => {
if (backupMethod !== null) {
Expand Down
151 changes: 76 additions & 75 deletions src/screens/Send/AddSendAmount.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Box, Input, Pressable, Text } from 'native-base';
import { Keyboard, TextInput } from 'react-native';
import React, { useEffect, useState } from 'react';
import { calculateSendMaxFee, sendPhaseOne } from 'src/store/sagaActions/send_and_receive';
import { hp, windowHeight, windowWidth, wp } from 'src/common/data/responsiveness/responsive';
import { hp, windowWidth, wp } from 'src/common/data/responsiveness/responsive';

import AppNumPad from 'src/components/AppNumPad';
import Buttons from 'src/components/Buttons';
Expand All @@ -19,9 +19,9 @@ import { useAppSelector } from 'src/store/hooks';
import { useDispatch } from 'react-redux';
import { useNavigation } from '@react-navigation/native';
import useToastMessage from 'src/hooks/useToastMessage';
import WalletDetails from './WalletDetails';
import { TransferType } from 'src/common/data/enums/TransferType';
import { Vault } from 'src/core/wallets/interfaces/vault';
import WalletDetails from './WalletDetails';

function AddSendAmount({ route }) {
const navigation = useNavigation();
Expand Down Expand Up @@ -94,14 +94,13 @@ function AddSendAmount({ route }) {
},
[]
);
console.log(windowHeight);
return (
<ScreenWrapper>
<HeaderTitle
title={
transferType == TransferType.WALLET_TO_WALLET ? `Sending to Wallet` : `Enter the amount`
}
// subtitle={`Sending to ${address}`}
// subtitle={`Sending to ${address}`}
/>
<Box
style={{
Expand All @@ -120,78 +119,83 @@ function AddSendAmount({ route }) {
marginVertical: hp(10),
}}
></Box>
<Box marginX={3}>
<Box backgroundColor="light.lightYellow" style={styles.inputWrapper}>
<Box flexDirection="row" alignItems="center">
<Box marginRight={2}>
<BitcoinInput />
<Box
style={{
flex: 1,
justifyContent: 'space-between'
}}
>
<Box marginX={3}>
<Box backgroundColor="light.lightYellow" style={styles.inputWrapper}>
<Box flexDirection="row" alignItems="center">
<Box marginRight={2}>
<BitcoinInput />
</Box>
<Box
marginLeft={2}
width={0.5}
backgroundColor="light.borderSaperator"
opacity={0.3}
height={7}
/>
<Input
placeholder="Enter Amount (sats)"
placeholderTextColor="light.greenText"
color="light.greenText"
opacity={0.5}
width="70%"
fontSize={RFValue(12)}
letterSpacing={1.04}
fontWeight={300}
borderWidth="0"
value={amount}
onChangeText={(value) => setAmount(value)}
onFocus={() => Keyboard.dismiss()}
/>
</Box>
<Box
marginLeft={2}
width={0.5}
backgroundColor="light.borderSaperator"
opacity={0.3}
height={7}
/>
<Input
placeholder="Enter Amount (sats)"
placeholderTextColor="light.greenText"
color="light.greenText"
opacity={0.5}
width="70%"
fontSize={RFValue(12)}
letterSpacing={1.04}
fontWeight={300}
borderWidth="0"
value={amount}
onChangeText={(value) => setAmount(value)}
onFocus={() => Keyboard.dismiss()}
/>
<Pressable
onPress={() => {
const confirmBalance = sender.specs.balances.confirmed;
if (confirmBalance)
dispatch(
calculateSendMaxFee({ numberOfRecipients: recipientCount, wallet: sender })
);
}}
style={styles.sendMaxWrapper}
>
<Text color="light.sendMax" style={styles.sendMaxText}>
Send Max
</Text>
</Pressable>
</Box>
<Pressable
onPress={() => {
const confirmBalance = sender.specs.balances.confirmed;
if (confirmBalance)
dispatch(
calculateSendMaxFee({ numberOfRecipients: recipientCount, wallet: sender })
);
}}
style={styles.sendMaxWrapper}
>
<Text color="light.sendMax" style={styles.sendMaxText}>
Send Max
</Text>
</Pressable>
</Box>

<Box style={styles.addNoteWrapper}>
<TextInput placeholder="Add a note" style={styles.textInput} />
</Box>
<Box style={styles.ctaBtnWrapper}>
<Box ml={windowWidth * -0.09}>
<Buttons
secondaryText="Cancel"
secondaryCallback={() => {
navigation.goBack();
}}
primaryText="Send"
primaryDisable={Boolean(!amount)}
primaryCallback={executeSendPhaseOne}
/>
<Box style={styles.addNoteWrapper}>
<TextInput placeholder="Add a note" style={styles.textInput} />
</Box>
<Box style={styles.ctaBtnWrapper}>
<Box ml={windowWidth * -0.09}>
<Buttons
secondaryText="Cancel"
secondaryCallback={() => {
navigation.goBack();
}}
primaryText="Send"
primaryDisable={Boolean(!amount)}
primaryCallback={executeSendPhaseOne}
/>
</Box>
</Box>
</Box>
<Box style={styles.appNumPadWrapper}>
<AppNumPad
setValue={setAmount}
clear={() => setAmount('')}
color="#073E39"
height={65}
darkDeleteIcon={true}
/>
</Box>
</Box>
{/* {!isKeyboardVisible && ( */}
<Box style={styles.appNumPadWrapper}>
<AppNumPad
setValue={setAmount}
clear={() => setAmount('')}
color="#073E39"
height={windowHeight > 670 ? 85 : 65}
darkDeleteIcon={true}
/>
</Box>
{/* )} */}
</ScreenWrapper>
);
}
Expand Down Expand Up @@ -250,11 +254,8 @@ const styles = ScaledSheet.create({
justifyContent: 'flex-end',
},
appNumPadWrapper: {
justifyContent: 'center',
alignItems: 'center',
width: windowWidth,
position: 'absolute',
bottom: 0,
width: '110%',
marginLeft: '-5%'
},
});
export default AddSendAmount;
1 change: 1 addition & 0 deletions src/screens/SignTransaction/SignerList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ function SignerList({
fontWeight={200}
fontFamily="heading"
letterSpacing={1.12}
maxWidth={width * 0.6}
>
{`${signer.signerName} (${signer.xpubInfo.xfp})`}
</Text>
Expand Down
Loading

0 comments on commit 0be6019

Please sign in to comment.