Skip to content

Commit

Permalink
Closes #236 - navigation fixed from main page token item to coin send
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisfenos committed Sep 30, 2018
1 parent db96a4a commit e125739
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 17 deletions.
8 changes: 5 additions & 3 deletions src/screens/main/portfolio/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,11 @@ class Portfolio extends Component {
renderRow = (token) => {
return (
<TouchableOpacity
onPress={() => {
this.props.addTokenInfo(token);
this.props.navigation.navigate('TokenFunctionality');
onPress={() => {
const navigateToTransaction = NavigationActions.navigate({
routeName: 'TokenFunctionality',
});
this.props.navigation.dispatch(navigateToTransaction);
}}
style={styles.listItemParentContainer}
>
Expand Down
24 changes: 17 additions & 7 deletions src/screens/main/tokens/receive/CoinReceive.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,17 @@ class CoinReceive extends Component {
<SafeAreaView style={styles.safeAreaView}>
<View style={mainContainer}>
<View style={contentContainer} >
<View style={imageContainer}>
{/* <View style={imageContainer}>
<QRCode
value={this.props.walletAddress}
value={this.props.wallet.address}
size={ 225}
bgColor='#27c997'
fgColor='#fafbfe' />
</View>
<View style={addressContainer}>
<Text style={addressTitle}>Address: </Text>
<Text style={addressValue}>{this.props.walletAddress}</Text>
</View>
<Text style={addressValue}>{this.props.wallet.address}</Text>
</View> */}
</View>
<View style={footerGrandparentContainer}>
<View style={footerParentContainer}>
Expand Down Expand Up @@ -136,8 +136,18 @@ const styles = StyleSheet.create({
* create/reterived during the initial process
* @param {Object} state
*/
const mapStateToProps = state => ({
walletAddress: state.newWallet.wallet.address,
});

const mapStateToProps = (state) => {
console.log('revieve', state.Wallet);

return {
wallet: state,
};
};

// const mapStateToProps = state => ({

// walletAddress: state.Wallet.wallets[0].hdWallet.address,
// });

export default connect(mapStateToProps, null)(CoinReceive);
7 changes: 0 additions & 7 deletions src/screens/main/tokens/send/CoinSend.js
Original file line number Diff line number Diff line change
Expand Up @@ -435,13 +435,6 @@ const styles = StyleSheet.create({
* @param {Object} state
*/
const mapStateToProps = (state) => {
// return {
// wallet: state.newWallet.wallet,
// addressData: state.newWallet.QrData,
// token: state.newWallet.current_token,
// txnFee: state.newWallet.txnFee,
// contactAddress: state.contacts.contactDataforCoinSend,
// };
return {
wallet: state.Wallet.wallets[0].hdWallet,
addressData: state.Wallet.tokenInfoForTransaction.toAddress, //to address
Expand Down

0 comments on commit e125739

Please sign in to comment.