...
 
Commits (9)
......@@ -22,10 +22,10 @@ org.gradle.jvmargs=-Xmx2048m
systemProp.org.gradle.internal.http.connectionTimeout=180000
systemProp.org.gradle.internal.http.socketTimeout=180000
versionName=3.10.0
versionName=3.11.0
# CUSTOM
versionCode=1050000014
versionCode=1050000015
# PLAY STORE
# versionCode=310032
# versionCode=310033
......@@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>3.10.0</string>
<string>3.11.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
......
......@@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>3.10.0</string>
<string>3.11.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
......
......@@ -19,7 +19,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>3.10.0</string>
<string>3.11.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
......
......@@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>3.10.0</string>
<string>3.11.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
......
......@@ -4,12 +4,9 @@ const Web3 = require('web3');
import { BLOCKCHAIN_URI } from "../../config/Config";
import MindsService from '../../common/services/minds.service';
import BlockchainApiService from '../BlockchainApiService';
import StorageService from '../../common/services/storage.service';
import appStores from '../../../AppStores';
import logService from '../../common/services/log.service';
import mindsService from '../../common/services/minds.service';
const sign = require('ethjs-signer').sign;
......@@ -56,7 +53,7 @@ class Web3Service {
// Contracts
async getContract(contractId) {
const settings = (await MindsService.getSettings()).blockchain;
const settings = (await mindsService.getSettings()).blockchain;
if (!this.contractInstances[contractId]) {
this.contractInstances[contractId] = new this.web3.eth.Contract(settings[contractId].abi, settings[contractId].address);
......@@ -139,13 +136,17 @@ class Web3Service {
const nonce = await this.web3.eth.getTransactionCount(baseOptions.from);
const settings = await mindsService.getSettings();
const gasPrice = ((settings.blockchain && settings.blockchain.default_gas_price) ? settings.blockchain.default_gas_price : '20') + ''; // force string
const tx = {
nonce,
to,
from: baseOptions.from,
value: toHex( this.web3.utils.toWei(amount, 'ether') ),
gas: toHex(21000),
gasPrice: toHex( this.web3.utils.toWei('2', 'Gwei') ), // converts the gwei price to wei
gasPrice: toHex( this.web3.utils.toWei(gasPrice, 'Gwei') ), // converts the gwei price to wei
}
const signedTx = sign(tx, privateKey);
......
......@@ -151,6 +151,7 @@ export default class CommentList extends React.Component<Props, State> {
if (isIOS) {
if (this.focusedChild !== -1) {
setTimeout(() => {
if (!this.listRef) return;
this.listRef.scrollToIndex({
index: this.focusedChild,
viewOffset: this.focusedOffset ? -(this.focusedOffset - (this.height - e.endCoordinates.height - 110)) : -110 ,
......@@ -245,6 +246,7 @@ export default class CommentList extends React.Component<Props, State> {
if (!this.props.parent) {
setTimeout(() => {
if (!this.listRef) return;
this.listRef.scrollToIndex({
index: comments.findIndex(c => item === c),
viewOffset: offset ? -(offset - (this.height - 200)): -110 ,
......
......@@ -3,6 +3,7 @@ import navigation from '../../../navigation/NavigationService'
import session from '../session.service'
import featuresService from '../features.service';
import logService from '../log.service';
import entitiesService from '../entities.service';
/**
* Push Router
......@@ -10,7 +11,7 @@ import logService from '../log.service';
export default class Router {
/**
*
* Navigate to the screen based on the notification data
* @param {object} notification
*/
navigate(data) {
......@@ -41,7 +42,8 @@ export default class Router {
let entity_type = data.json.entity_type.split(':');
if (entity_type[0] === 'comment') {
navigation.push('Activity', { guid: data.json.parent_guid });
this.navigateToActivityOrGroup(data);
//navigation.push('Activity', { guid: data.json.parent_guid });
} else if (entity_type[0] === 'activity') {
navigation.push('Activity', { guid: data.json.entity_guid });
} else if (entity_type[1] === 'blog') {
......@@ -77,10 +79,28 @@ export default class Router {
default:
navigation.navigate('Notifications', {});
logService.exception('[DeepLinkRouter] Unknown notification:', data);
logService.error('[DeepLinkRouter] Unknown notification:' + JSON.stringify(data));
break;
}
}
}
/**
* Temporary fix until the push notification includes the necessary data to decide
* @param {Object} data
*/
async navigateToActivityOrGroup(data) {
try {
const entity = await entitiesService.single('urn:entity:' + data.json.parent_guid);
if (entity.type === 'group') {
navigation.push('GroupView', { guid: data.json.parent_guid, tab: 'conversation'});
} else {
navigation.push('Activity', { entity: entity });
}
} catch (err) {
}
}
}
......@@ -56,7 +56,7 @@ export default class CommentView extends PureComponent {
}
break;
case 'group':
this.props.navigation.push('GroupView', { group: this.props.entity.entityObj, hydrate: true, tab: 'conversation', focusedUrn: this.props.entity.params.focusedCommentUrn });
this.props.navigation.push('GroupView', { guid: this.props.entity.entityObj.guid, tab: 'conversation', focusedUrn: this.props.entity.params.focusedCommentUrn });
break;
}
}
......