Skip to content

Commit

Permalink
Merge pull request #179 from VerusCoin/dev
Browse files Browse the repository at this point in the history
v1.0.17
  • Loading branch information
Asherda authored Aug 21, 2024
2 parents cadfe07 + 1c0a5f6 commit 0f3251d
Show file tree
Hide file tree
Showing 18 changed files with 527 additions and 202 deletions.
2 changes: 1 addition & 1 deletion android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import com.android.build.OutputFile

def versionMajor = 1
def versionMinor = 0
def versionRevision = 16
def versionRevision = 17
def versionBuild = 0

def keystorePropertiesFile = rootProject.file("keystore.properties");
Expand Down
2 changes: 1 addition & 1 deletion env/main.android.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"APP_VERSION": "1.0.16",
"APP_VERSION": "1.0.17",
"ELECTRUM_PROTOCOL_CHANGE": 1.4,

"KEY_DERIVATION_VERSION": 1,
Expand Down
2 changes: 1 addition & 1 deletion env/main.ios.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"APP_VERSION": "1.0.16",
"APP_VERSION": "1.0.17",
"ELECTRUM_PROTOCOL_CHANGE": 1.4,

"KEY_DERIVATION_VERSION": 1,
Expand Down
2 changes: 1 addition & 1 deletion ios/assets/env/main.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"APP_VERSION": "1.0.16",
"APP_VERSION": "1.0.17",
"ELECTRUM_PROTOCOL_CHANGE": 1.4,

"KEY_DERIVATION_VERSION": 1,
Expand Down
4 changes: 2 additions & 2 deletions ios/verusMobile.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -721,7 +721,7 @@
"\"${PODS_CONFIGURATION_BUILD_DIR}/react-native-webview\"",
"\"${PODS_CONFIGURATION_BUILD_DIR}/rn-fetch-blob\"",
);
MARKETING_VERSION = 1.0.16;
MARKETING_VERSION = 1.0.17;
PRODUCT_BUNDLE_IDENTIFIER = org.reactjs.native.verusmobile;
PRODUCT_NAME = verusmobile;
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down Expand Up @@ -792,7 +792,7 @@
"\"${PODS_CONFIGURATION_BUILD_DIR}/react-native-webview\"",
"\"${PODS_CONFIGURATION_BUILD_DIR}/rn-fetch-blob\"",
);
MARKETING_VERSION = 1.0.16;
MARKETING_VERSION = 1.0.17;
PRODUCT_BUNDLE_IDENTIFIER = org.reactjs.native.verusmobile;
PRODUCT_NAME = verusmobile;
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down
36 changes: 18 additions & 18 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "verusmobile",
"version": "1.0.16",
"version": "1.0.17",
"private": true,
"scripts": {
"postinstall": "./node_modules/.bin/rn-nodeify --hack --install --yarn && npx jetify",
Expand All @@ -15,7 +15,7 @@
},
"dependencies": {
"@bitgo/utxo-lib": "git+https://github.com/VerusCoin/BitGoJS.git#utxo-lib-verus",
"@ethersproject/signing-key": "5.0.5",
"@ethersproject/signing-key": "git+https://github.com/VerusCoin/ethersjs-signing-key-package.git",
"@react-native-async-storage/async-storage": "1.17.10",
"@react-native-camera-roll/camera-roll": "5.0.4",
"@react-native-community/cli": "7.0.3",
Expand All @@ -32,12 +32,12 @@
"@tradle/react-native-http": "2.0.0",
"@xmldom/xmldom": "0.8.6",
"assert": "1.1.1",
"axios": "1.6.5",
"axios": "1.7.4",
"base-64": "1.0.0",
"base64url": "3.0.1",
"bigi": "1.4.2",
"bignumber.js": "9.0.1",
"bip39": "git+https://github.com/michaeltout/bip39.git",
"bip39": "git+https://github.com/VerusCoin/bip39.git",
"bitgo-utxo-lib": "https://github.com/VerusCoin/bitgo-utxo-lib.git#react-native",
"browserify-zlib": "0.1.4",
"buffer": "6.0.3",
Expand All @@ -47,7 +47,7 @@
"dns.js": "1.0.1",
"domain-browser": "1.1.1",
"ethereumjs-util": "6.0.0",
"ethers": "git+https://github.com/michaeltout/ethersjs-package.git",
"ethers": "git+https://github.com/VerusCoin/ethersjs-package.git",
"events": "1.0.0",
"https-browserify": "0.0.0",
"immutable": "4.0.0-rc.12",
Expand All @@ -66,12 +66,12 @@
"react-native-alert-async": "1.0.3",
"react-native-app-intro-slider": "4.0.4",
"react-native-barcode-mask": "1.2.4",
"react-native-cache": "git+https://github.com/michaeltout/react-native-cache.git",
"react-native-cache": "git+https://github.com/VerusCoin/react-native-cache.git",
"react-native-camera": "3.22.1",
"react-native-crypto": "2.1.2",
"react-native-dialog": "5.6.0",
"react-native-elements": "1.0.0",
"react-native-format-currency": "https://github.com/michaeltout/react-native-format-currency.git",
"react-native-format-currency": "https://github.com/VerusCoin/react-native-format-currency.git",
"react-native-fs": "2.18.0",
"react-native-gesture-handler": "2.9.0",
"react-native-haptic-feedback": "1.11.0",
Expand All @@ -81,7 +81,7 @@
"react-native-level-fs": "3.0.0",
"react-native-loading-spinner-overlay": "1.0.1",
"react-native-modal-datetime-picker": "15.0.0",
"react-native-os": "git+https://github.com/michaeltout/react-native-os.git#1f79a5ae777ff296bd4911e2eb37e1de6f711d12",
"react-native-os": "git+https://github.com/VerusCoin/react-native-os.git#1f79a5ae777ff296bd4911e2eb37e1de6f711d12",
"react-native-paper": "4.7.1",
"react-native-permissions": "3.1.0",
"react-native-qrcode-scanner": "1.5.4",
Expand All @@ -94,11 +94,11 @@
"react-native-svg": "9.13.6",
"react-native-svg-transformer": "0.14.3",
"react-native-tab-view": "2.x",
"react-native-tcp": "git+https://github.com/aprock/react-native-tcp.git#be5f656ffd3aa4559270e8472ee24a1c36029cf1",
"react-native-tcp": "git+https://github.com/VerusCoin/react-native-tcp.git#be5f656ffd3aa4559270e8472ee24a1c36029cf1",
"react-native-text-input-mask": "3.1.4",
"react-native-udp": "4.1.5",
"react-native-url-polyfill": "1.3.0",
"react-native-vector-icons": "git+https://github.com/michaeltout/react-native-vector-icons.git",
"react-native-vector-icons": "git+https://github.com/VerusCoin/react-native-vector-icons.git",
"react-native-verus-light-client": "git+https://github.com/VerusCoin/react-native-verus-light-client.git",
"react-redux": "8.0.2",
"readable-stream": "1.0.33",
Expand All @@ -110,15 +110,16 @@
"string_decoder": "0.10.25",
"timers-browserify": "1.0.1",
"tty-browserify": "0.0.0",
"tx-builder": "0.18.0",
"typeforce": "git+https://github.com/VerusCoin/typeforce.git",
"url": "0.10.1",
"utf8": "3.0.0",
"util": "0.10.3",
"uuid": "8.0.0",
"varuint-bitcoin": "1.0.4",
"version_compare": "0.0.3",
"verus-pay-utils": "git+https://github.com/michaeltout/verus-pay-utils.git",
"verus-pay-utils": "git+https://github.com/VerusCoin/verus-pay-utils.git",
"verus-typescript-primitives": "git+https://github.com/VerusCoin/verus-typescript-primitives.git",
"verus-zkedid-utils": "git+https://github.com/michaeltout/verus-zkedid-utils.git",
"verus-zkedid-utils": "git+https://github.com/VerusCoin/verus-zkedid-utils.git",
"verusd-rpc-ts-client": "git+https://github.com/VerusCoin/verusd-rpc-ts-client.git",
"verusid-ts-client": "git+https://github.com/VerusCoin/verusid-ts-client.git",
"vm-browserify": "0.0.4",
Expand Down Expand Up @@ -152,7 +153,6 @@
},
"resolutions": {
"word-wrap": "1.2.4",
"typeforce": "git+https://github.com/michaeltout/typeforce.git",
"bs58check": "2.1.2",
"braces": "3.0.2",
"tar": "4.4.18",
Expand All @@ -161,7 +161,7 @@
"levelup": "4.1.0",
"mem": "5.1.1",
"handlebars": "4.7.7",
"elliptic": "6.5.4",
"elliptic": "6.5.7",
"yargs-parser": "13.1.2",
"minimist": "1.2.6",
"debug": "2.6.9",
Expand Down Expand Up @@ -190,7 +190,7 @@
"jszip": "3.8.0",
"normalize-url": "4.5.1",
"glob-parent": "5.1.2",
"axios": "1.6.5",
"axios": "1.7.4",
"lodash": "4.17.21",
"react-native": "0.68.5",
"prompts": "2.4.2",
Expand Down Expand Up @@ -220,8 +220,8 @@
"@sideway/formula": "3.0.1",
"@babel/traverse": "7.23.2",
"@babel/core": "7.21.3",
"blake2b-wasm": "https://github.com/michaeltout/blake2b-wasm/",
"@bitgo/blake2b-wasm": "https://github.com/michaeltout/blake2b-wasm/",
"blake2b-wasm": "https://github.com/VerusCoin/blake2b-wasm/",
"@bitgo/blake2b-wasm": "https://github.com/VerusCoin/blake2b-wasm/",
"browserify-sign": "4.2.2"
},
"jest": {
Expand Down
2 changes: 2 additions & 0 deletions src/VerusMobile.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ class VerusMobile extends React.Component {
}

componentDidMount() {
LogBox.ignoreLogs(['EventEmitter']);

activateKeyboardListener()

AppState.addEventListener("change", (nextAppState) => this._handleAppStateChange(nextAppState));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ import {
import { NavigationActions } from '@react-navigation/compat';
import { connect } from 'react-redux';
import QRCode from 'react-native-qrcode-svg';
import Styles from '../../../../styles/index'
import Colors from "../../../../globals/colors";
import Styles from '../../styles/index'
import Colors from "../../globals/colors";
import { CommonActions } from '@react-navigation/native';
import { DLIGHT_PRIVATE, ELECTRUM, ETH, WYRE_SERVICE } from "../../../../utils/constants/intervalConstants";
import { DLIGHT_PRIVATE, ELECTRUM, ETH, WYRE_SERVICE } from "../../utils/constants/intervalConstants";
import { Card, Paragraph, Title, Button } from 'react-native-paper'
import { deriveKeyPair, dlightSeedToBytes, isSeedPhrase } from "../../../../utils/keys";
import { createAlert } from "../../../../actions/actions/alert/dispatchers/alert";
import { coinsList } from "../../../../utils/CoinData/CoinsList";
import { deriveKeyPair, dlightSeedToBytes, isSeedPhrase } from "../../utils/keys";
import { createAlert } from "../../actions/actions/alert/dispatchers/alert";
import { coinsList } from "../../utils/CoinData/CoinsList";

class DisplaySeed extends Component {
constructor() {
Expand All @@ -31,7 +31,8 @@ class DisplaySeed extends Component {
dualSameSeed: false,
derivedKeys: {},
toggleDerivedKey: {},
fetchingDerivedKey: {}
fetchingDerivedKey: {},
completeOnBack: false,
};

this.SEED_NAMES = {
Expand Down Expand Up @@ -65,6 +66,15 @@ class DisplaySeed extends Component {
.fromDeleteAccount,
});
}

if (
data &&
data.completeOnBack
) {
this.setState({
completeOnBack: data.completeOnBack,
});
}
}

resetToScreen = () => {
Expand Down Expand Up @@ -114,8 +124,9 @@ class DisplaySeed extends Component {
}
}

// Method to derive the key from seed. Replace this with your actual implementation
deriveKeyFromSeed = async (seed, key, coinObj) => {
const { data } = this.props.route.params;

switch (key) {
case DLIGHT_PRIVATE:
return Buffer.from(await dlightSeedToBytes(seed)).toString('hex');
Expand All @@ -124,22 +135,23 @@ class DisplaySeed extends Component {
seed,
coinsList.ETH,
key,
this.props.activeAccount.keyDerivationVersion,
data.keyDerivationVersion,
)).privKey;
case ELECTRUM:
return (await deriveKeyPair(
seed,
coinObj,
key,
this.props.activeAccount.keyDerivationVersion,
data.keyDerivationVersion,
)).privKey;
default:
return seed
}
}

render() {
const { seeds, toggleDerivedKey, fetchingDerivedKey, derivedKeys } = this.state;
const { seeds, toggleDerivedKey, fetchingDerivedKey, derivedKeys, completeOnBack } = this.state;
const { data } = this.props.route.params;

return (
<View style={Styles.defaultRoot}>
Expand All @@ -163,28 +175,30 @@ class DisplaySeed extends Component {
<View style={Styles.fullWidthFlexCenterBlock}>
<QRCode value={displayedValue} size={250} />
</View>
{
((key === DLIGHT_PRIVATE && isSeedPhrase(seeds[key])) ||
key === ETH ||
key === ELECTRUM) && (
<Button onPress={() => this.toggleDerived(key, coinsList.VRSC)}>
{fetchingDerivedKey[key]
? 'Fetching...'
: isToggleOn
? 'Show Seed'
: key === ELECTRUM
? 'Show Derived Key (VRSC)'
: 'Show Derived Key'}
</Button>
)
}
{
!isToggleOn && !fetchingDerivedKey[key] && key === ELECTRUM && (
<Button onPress={() => this.toggleDerived(key, coinsList.BTC)}>
{'Show Derived Key (BTC)'}
</Button>
)
}
{data.showDerivedKeys && <>
{
((key === DLIGHT_PRIVATE && isSeedPhrase(seeds[key])) ||
key === ETH ||
key === ELECTRUM) && (
<Button onPress={() => this.toggleDerived(key, coinsList.VRSC)}>
{fetchingDerivedKey[key]
? 'Fetching...'
: isToggleOn
? 'Show Seed'
: key === ELECTRUM
? 'Show Derived Key (VRSC)'
: 'Show Derived Key'}
</Button>
)
}
{
!isToggleOn && !fetchingDerivedKey[key] && key === ELECTRUM && (
<Button onPress={() => this.toggleDerived(key, coinsList.BTC)}>
{'Show Derived Key (BTC)'}
</Button>
)
}
</>}
</Card.Content>
</Card>
</View>
Expand All @@ -194,12 +208,16 @@ class DisplaySeed extends Component {
</ScrollView>
<View style={Styles.highFooterContainer}>
<View style={Styles.standardWidthSpaceBetweenBlock}>
<Button color={Colors.warningButtonColor} onPress={this.back}>
{"Back"}
</Button>
<Button color={Colors.linkButtonColor} onPress={this.resetToScreen}>
{this.state.fromDeleteAccount ? "CONTINUE" : "HOME"}
<Button style={completeOnBack ? {
flex: 1
} : {}} color={completeOnBack ? Colors.primaryColor : Colors.warningButtonColor} onPress={this.back}>
{completeOnBack ? "Done" : "Back"}
</Button>
{!completeOnBack && (
<Button color={Colors.linkButtonColor} onPress={this.resetToScreen}>
{this.state.fromDeleteAccount ? "CONTINUE" : "HOME"}
</Button>
)}
</View>
</View>
</View>
Expand Down
14 changes: 14 additions & 0 deletions src/containers/Login/Login.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import {
} from '../../utils/constants/sendModal';
import {useSelector} from 'react-redux';
import TallButton from '../../components/LargerButton';
import SignedOutDropdown from '../SignedOutDropdown/SignedOutDropdown';

const {height} = Dimensions.get('window');

Expand All @@ -32,6 +33,9 @@ const Login = props => {
const authModalUsed = useSelector(
state => state.authentication.authModalUsed,
);
const modalVisible = useSelector(
state => state.sendModal.visible,
);
const accounts = useSelector(state => state.authentication.accounts);

openAuthModal = ignoreDefault => {
Expand Down Expand Up @@ -67,12 +71,22 @@ const Login = props => {
props.navigation.navigate('CreateProfile');
};

handleRecoverSeed = () => {
props.navigation.navigate("RecoverSeeds");
};

return (
<SafeAreaView
style={{
backgroundColor: Colors.secondaryColor,
...Styles.focalCenter,
}}>
<View style={{ position: "absolute", width: "100%", height: "100%" }}>
{!modalVisible && <SignedOutDropdown
handleRecoverSeed={() => handleRecoverSeed()}
hasAccount={true}
/>}
</View>
<VerusLogo
width={180}
height={'15%'}
Expand Down
Loading

0 comments on commit 0f3251d

Please sign in to comment.