library updates

This commit is contained in:
feruz 2020-12-03 11:37:03 +02:00
parent 780583804a
commit 0642d17e91
20 changed files with 146 additions and 113 deletions

View File

@ -143,7 +143,7 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode versionMajor * 10000 + versionMinor * 100 + versionPatch
versionName "3.0.9"
versionName "3.0.10"
resValue "string", "build_config_package", "app.esteem.mobile.android"
multiDexEnabled true
// react-native-image-crop-picker

View File

@ -15,11 +15,11 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>3.0.9</string>
<string>3.0.10</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>2559</string>
<string>2560</string>
<key>LSRequiresIPhoneOS</key>
<true />
<key>NSAppTransportSecurity</key>

View File

@ -15,10 +15,10 @@
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>3.0.9</string>
<string>3.0.10</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>2559</string>
<string>2560</string>
</dict>
</plist>

View File

@ -1100,7 +1100,7 @@
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 2559;
CURRENT_PROJECT_VERSION = 2560;
DEAD_CODE_STRIPPING = NO;
DEVELOPMENT_TEAM = 75B6RXTKGT;
HEADER_SEARCH_PATHS = (
@ -1176,7 +1176,7 @@
CODE_SIGN_ENTITLEMENTS = Ecency/Ecency.entitlements;
CODE_SIGN_IDENTITY = "iPhone Distribution";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 2559;
CURRENT_PROJECT_VERSION = 2560;
DEAD_CODE_STRIPPING = NO;
DEVELOPMENT_TEAM = 75B6RXTKGT;
HEADER_SEARCH_PATHS = (

View File

@ -19,7 +19,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>3.0.9</string>
<string>3.0.10</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>

View File

@ -15,10 +15,10 @@
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>3.0.9</string>
<string>3.0.10</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>2559</string>
<string>2560</string>
</dict>
</plist>

View File

@ -17,9 +17,9 @@
<key>CFBundlePackageType</key>
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
<key>CFBundleShortVersionString</key>
<string>3.0.9</string>
<string>3.0.10</string>
<key>CFBundleVersion</key>
<string>2559</string>
<string>2560</string>
<key>NSExtension</key>
<dict>
<key>NSExtensionAttributes</key>

View File

@ -1,6 +1,6 @@
{
"name": "ecency",
"version": "3.0.9",
"version": "3.0.10",
"displayName": "Ecency",
"private": true,
"rnpm": {
@ -27,14 +27,14 @@
},
"dependencies": {
"@babel/runtime": "^7.5.5",
"@ecency/render-helper": "^2.0.11",
"@esteemapp/dhive": "0.15.0",
"@esteemapp/esteem-render-helpers": "^1.8.0",
"@esteemapp/react-native-autocomplete-input": "^4.2.1",
"@esteemapp/react-native-modal-popover": "^0.0.15",
"@esteemapp/react-native-multi-slider": "^1.1.0",
"@esteemapp/react-native-render-html": "^4.1.5",
"@esteemapp/react-native-slider": "^0.12.0",
"@hiveio/dhive": "^0.14.8",
"@hiveio/dhive": "^0.14.12",
"@react-native-community/async-storage": "^1.11.0",
"@react-native-community/cameraroll": "^1.3.0",
"@react-native-community/cli-platform-ios": "^4.10.1",

View File

@ -1,7 +1,7 @@
import React, { useState, useRef, useEffect, useCallback } from 'react';
import { View, KeyboardAvoidingView, FlatList, Text, Platform, ScrollView } from 'react-native';
import ActionSheet from 'react-native-actionsheet';
import { renderPostBody } from '@esteemapp/esteem-render-helpers';
import { renderPostBody } from '@ecency/render-helper';
// Utils
import Formats from './formats/formats';

View File

@ -191,7 +191,7 @@ class PostDropdownContainer extends PureComponent {
),
);
} else {
if (error && error.jse_shortmsg.split(':')[1].includes('wait to transact')) {
if (error && error.jse_shortmsg.split(': ')[1].includes('wait to transact')) {
//when RC is not enough, offer boosting account
dispatch(setRcOffer(true));
} else {

View File

@ -38,7 +38,7 @@ const SearchModalContainer = ({
};
const _handleOnChangeSearchInput = (text) => {
if (text && text.length < 2) {
if (text && text.length < 3) {
return;
}
if (!isConnected) {
@ -46,27 +46,31 @@ const SearchModalContainer = ({
}
if (text && text !== '@' && text !== '#') {
if (text[0] === '@') {
lookupAccounts(text.substr(1).trim()).then((res) => {
const users = res
? res.map((item) => ({
image: getResizedAvatar(item),
text: item,
...item,
}))
: [];
setSearchResults({ type: 'user', data: users });
});
lookupAccounts(text.substr(1).trim())
.then((res) => {
const users = res
? res.map((item) => ({
image: getResizedAvatar(item),
text: item,
...item,
}))
: [];
setSearchResults({ type: 'user', data: users });
})
.catch((e) => console.log('lookupAccounts', e));
} else if (text[0] === '#') {
getTrendingTags(text.substr(1).trim()).then((res) => {
const tags = res
? res.map((item) => ({
text: `#${get(item, 'name', '')}`,
...item,
}))
: [];
getTrendingTags(text.substr(1).trim())
.then((res) => {
const tags = res
? res.map((item) => ({
text: `#${get(item, 'name', '')}`,
...item,
}))
: [];
setSearchResults({ type: 'tag', data: tags });
});
setSearchResults({ type: 'tag', data: tags });
})
.catch((e) => console.log('getTrendingTags', e));
} else if (
text.includes('https://') ||
text.includes('esteem://') ||
@ -79,37 +83,41 @@ const SearchModalContainer = ({
if (author) {
if (permlink) {
getPurePost(author, permlink).then((post) => {
if (post.id !== 0) {
const result = {};
let metadata = {};
try {
metadata = JSON.parse(get(post, 'json_metadata', ''));
} catch (error) {
metadata = {};
}
if (get(metadata, 'image', false) && metadata.image.length > 0) {
[result.image] = metadata.image;
getPurePost(author, permlink)
.then((post) => {
if (post.id !== 0) {
const result = {};
let metadata = {};
try {
metadata = JSON.parse(get(post, 'json_metadata', ''));
} catch (error) {
metadata = {};
}
if (get(metadata, 'image', false) && metadata.image.length > 0) {
[result.image] = metadata.image;
} else {
result.image = getResizedAvatar(author);
}
result.author = author;
result.text = post.title;
result.permlink = permlink;
setSearchResults({ type: 'content', data: [result] });
} else {
result.image = getResizedAvatar(author);
setSearchResults({ type: 'content', data: [] });
}
result.author = author;
result.text = post.title;
result.permlink = permlink;
setSearchResults({ type: 'content', data: [result] });
} else {
setSearchResults({ type: 'content', data: [] });
}
});
})
.catch((e) => console.log('getPurePost', e));
} else {
lookupAccounts(author).then((res) => {
const users = res.map((item) => ({
image: getResizedAvatar(item),
text: item,
...item,
}));
setSearchResults({ type: 'user', data: users });
});
lookupAccounts(author)
.then((res) => {
const users = res.map((item) => ({
image: getResizedAvatar(item),
text: item,
...item,
}));
setSearchResults({ type: 'user', data: users });
})
.catch((e) => console.log('lookupAccounts', e));
}
} else if (feedType) {
// handleOnClose();
@ -141,16 +149,18 @@ const SearchModalContainer = ({
}
}
} else {
search({ q: text }).then((res) => {
res.results = res.results
.filter((item) => item.title !== '')
.map((item) => ({
image: item.img_url || getResizedAvatar(get(item, 'author')),
text: item.title,
...item,
}));
setSearchResults({ type: 'content', data: get(res, 'results', []) });
});
search({ q: text })
.then((res) => {
res.results = res.results
.filter((item) => item.title !== '')
.map((item) => ({
image: item.img_url || getResizedAvatar(get(item, 'author')),
text: item.title,
...item,
}));
setSearchResults({ type: 'content', data: get(res, 'results', []) });
})
.catch((e) => console.log('search', e));
}
}
};

View File

@ -105,7 +105,19 @@ class UpvoteView extends Component {
);
})
.catch((err) => {
if (err && err.jse_shortmsg && err.jse_shortmsg.indexOf('Please wait to transact') > 0) {
if (
err &&
err.response &&
err.response.jse_shortmsg &&
err.response.jse_shortmsg.includes('wait to transact')
) {
//when RC is not enough, offer boosting account
this.setState({
isVoted: false,
isVoting: false,
});
dispatch(setRcOffer(true));
} else if (err && err.jse_shortmsg && err.jse_shortmsg.includes('wait to transact')) {
//when RC is not enough, offer boosting account
this.setState({
isVoted: false,
@ -125,14 +137,14 @@ class UpvoteView extends Component {
intl.formatMessage({
id: 'alert.fail',
}),
err.jse_shortmsg.split(':')[1],
err.error_description.split(': ')[1],
);
} else {
Alert.alert(
intl.formatMessage({
id: 'alert.fail',
}),
err.jse_shortmsg,
err.jse_shortmsg || err.error_description,
);
}
this.setState({

View File

@ -2,11 +2,4 @@ export default ['rpc.esteem.app', 'api.hive.blog', 'anyx.io', 'api.pharesim.me']
export const VALUE = ['rpc.esteem.app', 'api.hive.blog', 'anyx.io', 'api.pharesim.me'];
export const SERVER_LIST = [
'https://rpc.ecency.com',
'https://anyx.io',
'https://api.hive.blog',
'https://hive-api.arcange.eu',
'https://api.deathwing.me',
'https://rpc.ausbit.dev',
];
export const SERVER_LIST = ['https://rpc.ecency.com'];

View File

@ -278,6 +278,7 @@ export const search = (data) =>
resolve(res.data);
})
.catch((error) => {
console.log('search', error);
bugsnag.notify(error);
reject(error);
});

View File

@ -1086,6 +1086,7 @@ export const lookupAccounts = async (username) => {
const users = await client.database.call('lookup_accounts', [username, 20]);
return users;
} catch (error) {
console.log('lookup_accounts');
throw error;
}
};
@ -1095,6 +1096,7 @@ export const getTrendingTags = async (tag) => {
const users = await client.database.call('get_trending_tags', [tag, 20]);
return users;
} catch (error) {
console.log('get_trending_tags');
throw error;
}
};

View File

@ -5,7 +5,7 @@ import ScrollableTabView from 'react-native-scrollable-tab-view';
import ActionSheet from 'react-native-actionsheet';
// Utils
import { postBodySummary } from '@esteemapp/esteem-render-helpers';
import { postBodySummary } from '@ecency/render-helper';
import { catchDraftImage } from '../../../utils/image';
import { getFormatedCreatedDate } from '../../../utils/time';

View File

@ -492,7 +492,16 @@ class EditorContainer extends Component {
_handleSubmitFailure = (error) => {
const { intl, dispatch } = this.props;
if (error && error.jse_shortmsg.includes('wait to transact')) {
console.log(error);
if (
error &&
error.response &&
error.response.jse_shortmsg &&
error.response.jse_shortmsg.includes('wait to transact')
) {
//when RC is not enough, offer boosting account
dispatch(setRcOffer(true));
} else if (error && error.jse_shortmsg && error.jse_shortmsg.includes('wait to transact')) {
//when RC is not enough, offer boosting account
dispatch(setRcOffer(true));
} else {
@ -501,7 +510,7 @@ class EditorContainer extends Component {
intl.formatMessage({
id: 'alert.fail',
}),
error.message.split(':')[1] || error.toString(),
error.error_description.split(': ')[1] || error.toString(),
);
}

View File

@ -1,7 +1,7 @@
import CryptoJS from 'crypto-js';
import * as dsteem from '@esteemapp/dhive';
import { Buffer } from 'buffer';
import { proxifyImageSrc } from '@esteemapp/esteem-render-helpers';
import { proxifyImageSrc } from '@ecency/render-helper';
import { Platform } from 'react-native';
const whatOs = Platform.OS;

View File

@ -2,7 +2,7 @@ import isEmpty from 'lodash/isEmpty';
import forEach from 'lodash/forEach';
import { get } from 'lodash';
import { Platform } from 'react-native';
import { postBodySummary, renderPostBody, catchPostImage } from '@esteemapp/esteem-render-helpers';
import { postBodySummary, renderPostBody, catchPostImage } from '@ecency/render-helper';
// Utils
import parseAsset from './parseAsset';

View File

@ -698,6 +698,21 @@
exec-sh "^0.3.2"
minimist "^1.2.0"
"@ecency/render-helper@^2.0.11":
version "2.0.11"
resolved "https://registry.yarnpkg.com/@ecency/render-helper/-/render-helper-2.0.11.tgz#faa140a318aa6c2a693cfb3d21f3e8b1821cdb8e"
integrity sha512-g9lDtdB3yrta3pHQodPQQbFIkg3kCrVvcKhrqUrl2JY0hYreKUlmRzGWobJFphyAoXnUubrTW/l8p4N3hUwteg==
dependencies:
he "^1.2.0"
lru-cache "^5.1.1"
multihashes "0.4.13"
path "^0.12.7"
querystring "^0.2.0"
remarkable "^1.7.3"
url "^0.11.0"
xmldom "^0.1.27"
xss "^1.0.8"
"@egjs/hammerjs@^2.0.17":
version "2.0.17"
resolved "https://registry.yarnpkg.com/@egjs/hammerjs/-/hammerjs-2.0.17.tgz#5dc02af75a6a06e4c2db0202cae38c9263895124"
@ -718,21 +733,6 @@
verror "^1.10.0"
whatwg-fetch "^2.0.3"
"@esteemapp/esteem-render-helpers@^1.8.0":
version "1.8.0"
resolved "https://registry.yarnpkg.com/@esteemapp/esteem-render-helpers/-/esteem-render-helpers-1.8.0.tgz#3c5d03f401d306f615b191b0142d641260c36eb2"
integrity sha512-QZ6kxET6iK+OOI/pa8Q/FnNKHnrJMD2rpQcXkvhCVOhrXPq8FRwGByrpTRQT96ZtflgkaGEHiGfslmw2dFDIoA==
dependencies:
he "^1.2.0"
lru-cache "^5.1.1"
multihashes "0.4.13"
path "^0.12.7"
querystring "^0.2.0"
remarkable "^1.7.3"
url "^0.11.0"
xmldom "^0.1.27"
xss "^1.0.8"
"@esteemapp/react-native-autocomplete-input@^4.2.1":
version "4.2.1"
resolved "https://registry.yarnpkg.com/@esteemapp/react-native-autocomplete-input/-/react-native-autocomplete-input-4.2.1.tgz#a883db553dcc152cf6ac5e6a39bc7e35682286ce"
@ -837,15 +837,16 @@
dependencies:
"@hapi/hoek" "^8.3.0"
"@hiveio/dhive@^0.14.8":
version "0.14.8"
resolved "https://registry.yarnpkg.com/@hiveio/dhive/-/dhive-0.14.8.tgz#7ff2e60c579559d136440e46bd58c55a09d854d9"
integrity sha512-TfnzrnVD6OKLYSb8quHeT8hUjPeR1etIGg6EXaH+lbzgNpmlVBwgmM+uDdGNPRifh4CT8sf+/6fsLvKF2ens/Q==
"@hiveio/dhive@^0.14.12":
version "0.14.12"
resolved "https://registry.yarnpkg.com/@hiveio/dhive/-/dhive-0.14.12.tgz#1e0eddc7ad7c0e169fe8349fb302d108683cf251"
integrity sha512-jYbLrRX2Citax+IzVrM1f1RoyYEjwCnAPr9ZT+aMjrtYvYOjsxg46eGfO6m/tTB1PkhABRGyAbb1yBodNogjyw==
dependencies:
bs58 "^4.0.1"
bytebuffer "^5.0.1"
core-js "^3.6.4"
cross-fetch "^3.0.4"
jsbi "^3.1.4"
node-fetch "^2.6.0"
secp256k1 "^3.8.0"
verror "^1.10.0"
@ -5418,6 +5419,11 @@ js-yaml@^3.13.0, js-yaml@^3.13.1:
argparse "^1.0.7"
esprima "^4.0.0"
jsbi@^3.1.4:
version "3.1.4"
resolved "https://registry.yarnpkg.com/jsbi/-/jsbi-3.1.4.tgz#9654dd02207a66a4911b4e4bb74265bc2cbc9dd0"
integrity sha512-52QRRFSsi9impURE8ZUbzAMCLjPm4THO7H2fcuIvaaeFTbSysvkodbQQXIVsNgq/ypDbq6dJiuGKL0vZ/i9hUg==
jsbn@~0.1.0:
version "0.1.1"
resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513"
@ -9334,9 +9340,9 @@ validate-npm-package-license@^3.0.1:
spdx-expression-parse "^3.0.0"
varint@^5.0.0:
version "5.0.0"
resolved "https://registry.yarnpkg.com/varint/-/varint-5.0.0.tgz#d826b89f7490732fabc0c0ed693ed475dcb29ebf"
integrity sha1-2Ca4n3SQcy+rwMDtaT7Uddyynr8=
version "5.0.2"
resolved "https://registry.yarnpkg.com/varint/-/varint-5.0.2.tgz#5b47f8a947eb668b848e034dcfa87d0ff8a7f7a4"
integrity sha512-lKxKYG6H03yCZUpAGOPOsMcGxd1RHCu1iKvEHYDPmTyq2HueGhD73ssNBqqQWfvYs04G9iUFRvmAVLW20Jw6ow==
vary@~1.1.2:
version "1.1.2"