diff --git a/android/app/build.gradle b/android/app/build.gradle index 9e5f37ca7..d9ce9f7c4 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -143,7 +143,7 @@ android { minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion versionCode versionMajor * 10000 + versionMinor * 100 + versionPatch - versionName "3.0.5" + versionName "3.0.6" resValue "string", "build_config_package", "app.esteem.mobile.android" multiDexEnabled true // react-native-image-crop-picker diff --git a/android/gradle.properties b/android/gradle.properties index 027ef9db8..dbfbcb76b 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -19,3 +19,4 @@ android.useAndroidX=true android.enableJetifier=true +org.gradle.jvmargs=-Xmx10248m diff --git a/ios/Ecency-tvOS/Info.plist b/ios/Ecency-tvOS/Info.plist index 766a24ff2..846597d1a 100644 --- a/ios/Ecency-tvOS/Info.plist +++ b/ios/Ecency-tvOS/Info.plist @@ -15,11 +15,11 @@ CFBundlePackageType APPL CFBundleShortVersionString - 3.0.5 + 3.0.6 CFBundleSignature ???? CFBundleVersion - 2555 + 2556 LSRequiresIPhoneOS NSAppTransportSecurity diff --git a/ios/Ecency-tvOSTests/Info.plist b/ios/Ecency-tvOSTests/Info.plist index 6bf1f23f9..1c579c780 100644 --- a/ios/Ecency-tvOSTests/Info.plist +++ b/ios/Ecency-tvOSTests/Info.plist @@ -15,10 +15,10 @@ CFBundlePackageType BNDL CFBundleShortVersionString - 3.0.5 + 3.0.6 CFBundleSignature ???? CFBundleVersion - 2555 + 2556 diff --git a/ios/Ecency.xcodeproj/project.pbxproj b/ios/Ecency.xcodeproj/project.pbxproj index 8b952f7ef..efd9c80a5 100644 --- a/ios/Ecency.xcodeproj/project.pbxproj +++ b/ios/Ecency.xcodeproj/project.pbxproj @@ -1100,7 +1100,7 @@ CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 2555; + CURRENT_PROJECT_VERSION = 2556; 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 = 2555; + CURRENT_PROJECT_VERSION = 2556; DEAD_CODE_STRIPPING = NO; DEVELOPMENT_TEAM = 75B6RXTKGT; HEADER_SEARCH_PATHS = ( diff --git a/ios/Ecency/Info.plist b/ios/Ecency/Info.plist index 1b39e9c82..9e6e49c38 100644 --- a/ios/Ecency/Info.plist +++ b/ios/Ecency/Info.plist @@ -19,7 +19,7 @@ CFBundlePackageType APPL CFBundleShortVersionString - 3.0.5 + 3.0.6 CFBundleSignature ???? CFBundleURLTypes diff --git a/ios/EcencyTests/Info.plist b/ios/EcencyTests/Info.plist index d4fea9a21..5f6fb2ba3 100644 --- a/ios/EcencyTests/Info.plist +++ b/ios/EcencyTests/Info.plist @@ -15,10 +15,10 @@ CFBundlePackageType BNDL CFBundleShortVersionString - 3.0.5 + 3.0.6 CFBundleSignature ???? CFBundleVersion - 2555 + 2556 diff --git a/ios/eshare/Info.plist b/ios/eshare/Info.plist index 11643a0c4..4ee30d55d 100644 --- a/ios/eshare/Info.plist +++ b/ios/eshare/Info.plist @@ -17,9 +17,9 @@ CFBundlePackageType $(PRODUCT_BUNDLE_PACKAGE_TYPE) CFBundleShortVersionString - 3.0.5 + 3.0.6 CFBundleVersion - 2555 + 2556 NSExtension NSExtensionAttributes diff --git a/package.json b/package.json index c7b761014..68ddfe487 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ecency", - "version": "3.0.5", + "version": "3.0.6", "displayName": "Ecency", "private": true, "rnpm": { @@ -34,7 +34,7 @@ "@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.1", + "@hiveio/dhive": "^0.14.8", "@react-native-community/async-storage": "^1.11.0", "@react-native-community/cameraroll": "^1.3.0", "@react-native-community/cli-platform-ios": "^4.10.1", diff --git a/src/components/comment/view/commentView.js b/src/components/comment/view/commentView.js index eaf371e25..d1f645b75 100644 --- a/src/components/comment/view/commentView.js +++ b/src/components/comment/view/commentView.js @@ -51,17 +51,9 @@ const CommentView = ({ const actionSheet = useRef(null); useEffect(() => { - getActiveVotes(get(comment, 'author'), get(comment, 'permlink')) - .then((result) => { - result.sort((a, b) => b.rshares - a.rshares); - - const _votes = parseActiveVotes( - { ...comment, active_votes: result }, - currentAccountUsername, - ); - setActiveVotes(_votes); - }) - .catch(() => {}); + if (comment) { + setActiveVotes(get(comment, 'active_votes', [])); + } }, [comment]); const _showSubCommentsToggle = () => { @@ -106,7 +98,7 @@ const CommentView = ({ onPress={() => handleOnVotersPress && activeVotes.length > 0 && - handleOnVotersPress(activeVotes) + handleOnVotersPress(activeVotes, comment) } text={activeVotes.length} textStyle={styles.voteCountText} diff --git a/src/components/comments/container/commentsContainer.js b/src/components/comments/container/commentsContainer.js index c7c56f23e..808f251f2 100644 --- a/src/components/comments/container/commentsContainer.js +++ b/src/components/comments/container/commentsContainer.js @@ -168,11 +168,12 @@ const CommentsContainer = ({ }); }; - const _handleOnVotersPress = (activeVotes) => { + const _handleOnVotersPress = (activeVotes, content) => { navigation.navigate({ routeName: ROUTES.SCREENS.VOTERS, params: { activeVotes, + content, }, key: get(content, 'permlink'), }); diff --git a/src/components/postCard/container/postCardContainer.js b/src/components/postCard/container/postCardContainer.js index 737a70ede..d8a352964 100644 --- a/src/components/postCard/container/postCardContainer.js +++ b/src/components/postCard/container/postCardContainer.js @@ -30,7 +30,7 @@ const PostCardContainer = ({ }) => { const [activeVotes, setActiveVotes] = useState([]); const [reblogs, setReblogs] = useState([]); - const [_content, setContent] = useState(null); + const [_content, setContent] = useState(content); useEffect(() => { if (isRefresh) { @@ -40,18 +40,12 @@ const PostCardContainer = ({ useEffect(() => { if (content) { - getActiveVotes(get(content, 'author'), get(content, 'permlink')) - .then((result) => { - result.sort((a, b) => b.rshares - a.rshares); - - const _votes = parseActiveVotes({ ...content, active_votes: result }); - setActiveVotes(_votes); - }) - .catch(() => {}); + setActiveVotes(get(content, 'active_votes', [])); getPostReblogs(content).then((result) => { setReblogs(result); }); + setContent(content); } }, [content]); @@ -85,6 +79,7 @@ const PostCardContainer = ({ routeName: ROUTES.SCREENS.VOTERS, params: { activeVotes, + content, }, key: get(content, 'permlink'), }); diff --git a/src/components/postView/container/postDisplayContainer.js b/src/components/postView/container/postDisplayContainer.js index 1462df302..d3792732a 100644 --- a/src/components/postView/container/postDisplayContainer.js +++ b/src/components/postView/container/postDisplayContainer.js @@ -41,18 +41,7 @@ const PostDisplayContainer = ({ useEffect(() => { if (post) { - getActiveVotes(get(post, 'author'), get(post, 'permlink')) - .then((result) => { - result.sort((a, b) => b.rshares - a.rshares); - - const _votes = parseActiveVotes( - { ...post, active_votes: result }, - get(currentAccount, 'name'), - ); - - setActiveVotes(_votes); - }) - .catch(() => {}); + setActiveVotes(get(post, 'active_votes', [])); getPostReblogs(post).then((result) => { setReblogs(result); @@ -70,6 +59,7 @@ const PostDisplayContainer = ({ routeName: ROUTES.SCREENS.VOTERS, params: { activeVotes, + content: post, }, // TODO: make unic key: post.permlink + activeVotes.length, diff --git a/src/components/posts/container/postsContainer.js b/src/components/posts/container/postsContainer.js index 5f339ad16..58f464850 100644 --- a/src/components/posts/container/postsContainer.js +++ b/src/components/posts/container/postsContainer.js @@ -1,4 +1,4 @@ -import React, { useCallback, useState, useEffect } from 'react'; +import React, { useCallback, useState, useEffect, useRef } from 'react'; import { useDispatch, useSelector } from 'react-redux'; import get from 'lodash/get'; import unionBy from 'lodash/unionBy'; @@ -50,6 +50,7 @@ const PostsContainer = ({ const [selectedFilterValue, setSelectedFilterValue] = useState( filterOptionsValue && filterOptionsValue[selectedFilterIndex], ); + const elem = useRef(null); useEffect(() => { if (isConnected) { @@ -103,6 +104,8 @@ const PostsContainer = ({ dispatch(hidePostsThumbnails(!isHideImages)); }; + const checkIfMounted = () => elem.current != null; + const _getPromotePosts = useCallback(async () => { if (pageType === 'profiles') { return; @@ -195,8 +198,8 @@ const PostsContainer = ({ _posts = unionBy(posts, _posts, 'permlink'); } } - - if (posts.length < 4 && pageType !== 'profiles') { + console.log('mounted?', checkIfMounted()); + if (posts.length <= 4 && pageType !== 'profiles') { _setFeedPosts(_posts); } @@ -265,6 +268,7 @@ const PostsContainer = ({ return ( { const intl = useIntl(); + /*getActiveVotes(get(content, 'author'), get(content, 'permlink')) + .then((result) => { + result.sort((a, b) => b.rshares - a.rshares); + + const _votes = parseActiveVotes({ ...content, active_votes: result }); + setActiveVotes(_votes); + }) + .catch(() => {});*/ + const _handleOnUserPress = (username) => { navigation.navigate({ routeName: ROUTES.SCREENS.PROFILE, @@ -29,7 +38,7 @@ const VotersDisplayView = ({ votes, navigation }) => { }; const _renderItem = ({ item, index }) => { - const value = `$ ${item.value}`; + const value = `$ ${item.reward}`; const percent = `${item.percent}%`; return ( diff --git a/src/config/locales/en-US.json b/src/config/locales/en-US.json index 5ea55a656..29531e90f 100644 --- a/src/config/locales/en-US.json +++ b/src/config/locales/en-US.json @@ -341,7 +341,8 @@ "payloadTooLarge": "File size too big, please resize or upload smaller image", "qoutaExceeded": "Upload quota exceeded", "invalidImage": "Invalid image, try different file", - "something_wrong": "Something went wrong. Try https://ecency.com until we fix the issue!" + "something_wrong": "Something went wrong.", + "something_wrong_alt": "Try https://ecency.com" }, "post": { "reblog_alert": "Are you sure, you want to reblog?", diff --git a/src/containers/accountListContainer.js b/src/containers/accountListContainer.js index 4327000e3..b1fa8b5b9 100644 --- a/src/containers/accountListContainer.js +++ b/src/containers/accountListContainer.js @@ -1,32 +1,20 @@ -import { Component } from 'react'; +import { Component, useState, useEffect } from 'react'; import { isBefore } from '../utils/time'; import ROUTES from '../constants/routeNames'; -class AccountListContainer extends Component { - /* Props - * ------------------------------------------------ - * @prop { type } name - Description.... - */ +const AccountListContainer = ({ data, navigation, children }) => { + const [vdata, setVData] = useState(data); + const [filterResult, setFilterResult] = useState(null); + const [filterIndex, setFilterIndex] = useState(0); - constructor(props) { - super(props); - this.state = { - data: props.data, - filterResult: null, - filterIndex: 0, - }; - } + useEffect(() => { + setVData(data); + }, [data]); - // Component Life Cycles - - // Component Functions - - _handleSearch = (searchText, key) => { - const { data, filterIndex } = this.state; - - const newData = data.filter((item) => { + const _handleSearch = (searchText, key) => { + const newData = vdata.filter((item) => { const itemName = item[key].toUpperCase(); const _text = searchText.toUpperCase(); @@ -34,15 +22,14 @@ class AccountListContainer extends Component { }); if (filterIndex !== 0) { - this._handleOnVotersDropdownSelect(filterIndex, '', newData); + _handleOnVotersDropdownSelect(filterIndex, '', newData); } else { - this.setState({ filterResult: newData }); + setFilterResult(newData); } }; - _handleOnVotersDropdownSelect = (index, text, oldData) => { - const { data, filterIndex } = this.state; - const _data = Object.assign([], oldData || data); + const _handleOnVotersDropdownSelect = (index, text, oldData) => { + const _data = Object.assign([], oldData || vdata); if (filterIndex === index) { switch (index) { @@ -73,13 +60,11 @@ class AccountListContainer extends Component { break; } } - - this.setState({ filterResult: _data, filterIndex: index }); + setFilterResult(_data); + setFilterIndex(index); }; - _handleOnUserPress = (username) => { - const { navigation } = this.props; - + const _handleOnUserPress = (username) => { navigation.navigate({ routeName: ROUTES.SCREENS.PROFILE, params: { @@ -89,22 +74,17 @@ class AccountListContainer extends Component { }); }; - render() { - const { data, filterResult, filterIndex } = this.state; - const { children } = this.props; - - return ( - children && - children({ - data, - filterResult, - filterIndex, - handleOnVotersDropdownSelect: this._handleOnVotersDropdownSelect, - handleSearch: this._handleSearch, - handleOnUserPress: this._handleOnUserPress, - }) - ); - } -} + return ( + children && + children({ + data, + filterResult, + filterIndex, + handleOnVotersDropdownSelect: _handleOnVotersDropdownSelect, + handleSearch: _handleSearch, + handleOnUserPress: _handleOnUserPress, + }) + ); +}; export default AccountListContainer; diff --git a/src/containers/steemWalletContainer.js b/src/containers/steemWalletContainer.js index c6efb219e..64f54b41c 100644 --- a/src/containers/steemWalletContainer.js +++ b/src/containers/steemWalletContainer.js @@ -12,7 +12,7 @@ import { getAccount, claimRewardBalance, getBtcAddress } from '../providers/stee import { openPinCodeModal } from '../redux/actions/applicationActions'; // Utils -import { groomingWalletData, groomingTransactionData } from '../utils/wallet'; +import { groomingWalletData, groomingTransactionData, transferTypes } from '../utils/wallet'; import parseToken from '../utils/parseToken'; import { vestsToSp } from '../utils/conversions'; import { navigate } from '../navigation/service'; @@ -73,24 +73,8 @@ const WalletContainer = ({ }, [_getWalletData, selectedUser]); useEffect(() => { - const _transferHistory = userActivities.filter( - (item) => - get(item, 'textKey') === 'transfer' || - get(item, 'textKey') === 'transfer_to_vesting' || - get(item, 'textKey') === 'transfer_to_savings' || - get(item, 'textKey') === 'withdraw_vesting' || - get(item, 'textKey') === 'transfer_from_savings' || - get(item, 'textKey') === 'convert' || - get(item, 'textKey') === 'escrow_transfer' || - get(item, 'textKey') === 'escrow_dispute' || - get(item, 'textKey') === 'escrow_release' || - get(item, 'textKey') === 'escrow_approve' || - get(item, 'textKey') === 'cancel_transfer_from_savings' || - get(item, 'textKey') === 'delegate_vesting_shares' || - get(item, 'textKey') === 'fill_convert_request' || - get(item, 'textKey') === 'fill_transfer_from_savings' || - get(item, 'textKey') === 'fill_vesting_withdraw' || - get(item, 'textKey') === 'fill_order', + const _transferHistory = userActivities.filter((item) => + transferTypes.includes(get(item, 'textKey')), ); setTransferHistory(_transferHistory); diff --git a/src/providers/steem/dsteem.js b/src/providers/steem/dsteem.js index b8a4a1f63..61c4b6bc0 100644 --- a/src/providers/steem/dsteem.js +++ b/src/providers/steem/dsteem.js @@ -31,12 +31,13 @@ global.Buffer = global.Buffer || require('buffer').Buffer; const DEFAULT_SERVER = [ 'https://rpc.ecency.com', 'https://anyx.io', - 'https://api.pharesim.me', + 'https://hive-api.arcange.eu', + 'https://api.openhive.network', 'https://api.hive.blog', - 'https://api.hivekings.com', ]; let client = new Client(DEFAULT_SERVER, { - timeout: 5000, + timeout: 3000, + rebrandedApi: true, }); export const checkClient = async () => { @@ -49,7 +50,7 @@ export const checkClient = async () => { }); client = new Client(selectedServer, { - timeout: 5000, + timeout: 3000, rebrandedApi: true, }); }; diff --git a/src/screens/application/screen/errorBoundary.js b/src/screens/application/screen/errorBoundary.js index 4b601e92c..c0e739151 100644 --- a/src/screens/application/screen/errorBoundary.js +++ b/src/screens/application/screen/errorBoundary.js @@ -33,11 +33,16 @@ class ErrorBoundary extends React.Component { return ( - + {intl.formatMessage({ id: 'alert.something_wrong', })} + + {intl.formatMessage({ + id: 'alert.something_wrong_alt', + })} + ); } diff --git a/src/screens/settings/container/settingsContainer.js b/src/screens/settings/container/settingsContainer.js index fc805d03f..29e8e57bb 100644 --- a/src/screens/settings/container/settingsContainer.js +++ b/src/screens/settings/container/settingsContainer.js @@ -123,7 +123,8 @@ class SettingsContainer extends Component { let isError = false; let alertMessage; const client = new Client(server, { - timeout: 5000, + timeout: 3000, + rebrandedApi: true, }); dispatch(setApi('')); diff --git a/src/screens/voters/screen/votersScreen.js b/src/screens/voters/screen/votersScreen.js index 7ab64820c..bcf93c2ed 100644 --- a/src/screens/voters/screen/votersScreen.js +++ b/src/screens/voters/screen/votersScreen.js @@ -1,4 +1,4 @@ -import React from 'react'; +import React, { useState, useEffect } from 'react'; import { SafeAreaView } from 'react-native'; import { useIntl } from 'react-intl'; import get from 'lodash/get'; @@ -9,20 +9,38 @@ import { BasicHeader, FilterBar, VotersDisplay } from '../../../components'; import AccountListContainer from '../../../containers/accountListContainer'; // Utils -import globalStyles from '../../../globalStyles'; +import { getActiveVotes } from '../../../providers/steem/dsteem'; +import { parseActiveVotes } from '../../../utils/postParser'; const filterOptions = ['rewards', 'percent', 'time']; const VotersScreen = ({ navigation }) => { const intl = useIntl(); + const [content, setContent] = useState(get(navigation, 'state.params.content')); + const [activeVotes, setActiveVotes] = useState(get(content, 'active_votes') || []); + const [isLoading, setIsLoading] = useState(false); + const headerTitle = intl.formatMessage({ id: 'voters.voters_info', }); - const activeVotes = get(navigation, 'state.params.activeVotes'); + useEffect(() => { + if (content) { + getActiveVotes(get(content, 'author'), get(content, 'permlink')) + .then((result) => { + result.sort((a, b) => b.rshares - a.rshares); + const _votes = parseActiveVotes({ ...content, active_votes: result }); + setActiveVotes(_votes); + }) + .catch(() => {}); + } + }, [content]); + + //const activeVotes = get(navigation, 'state.params.activeVotes'); + //const content = get(navigation, 'state.params.content'); return ( - + {({ data, filterResult, filterIndex, handleOnVotersDropdownSelect, handleSearch }) => ( <> { percent_hbd: 10000, extensions: [[0, { beneficiaries: [] }]], }; - console.log(postObj); switch (postObj.operationType) { case 'sp': a.max_accepted_payout = '1000000.000 HBD'; diff --git a/src/utils/postParser.js b/src/utils/postParser.js index d08ac578d..b5aadcfc7 100644 --- a/src/utils/postParser.js +++ b/src/utils/postParser.js @@ -104,7 +104,7 @@ export const isVoted = (activeVotes, currentUserName) => { return false; } const result = activeVotes.find( - (element) => get(element, 'voter') === currentUserName && get(element, 'percent', 0) > 0, + (element) => get(element, 'voter') === currentUserName && get(element, 'rshares', 0) > 0, ); if (result) { return result.percent; @@ -117,7 +117,7 @@ export const isDownVoted = (activeVotes, currentUserName) => { return false; } const result = activeVotes.find( - (element) => get(element, 'voter') === currentUserName && get(element, 'percent') < 0, + (element) => get(element, 'voter') === currentUserName && get(element, 'rshares') < 0, ); if (result) { return result.percent; @@ -127,16 +127,17 @@ export const isDownVoted = (activeVotes, currentUserName) => { export const parseActiveVotes = (post) => { const totalPayout = + post.total_payout || parseFloat(post.pending_payout_value) + - parseFloat(post.total_payout_value) + - parseFloat(post.curator_payout_value); + parseFloat(post.total_payout_value) + + parseFloat(post.curator_payout_value); const voteRshares = post.active_votes.reduce((a, b) => a + parseFloat(b.rshares), 0); const ratio = totalPayout / voteRshares || 0; if (!isEmpty(post.active_votes)) { forEach(post.active_votes, (value) => { - value.value = (value.rshares * ratio).toFixed(3); + value.reward = (value.rshares * ratio).toFixed(3); //value.reputation = getReputation(get(value, 'reputation')); value.percent /= 100; value.is_down_vote = Math.sign(value.percent) < 0; diff --git a/src/utils/wallet.js b/src/utils/wallet.js index 43c04d6d6..159fae68d 100644 --- a/src/utils/wallet.js +++ b/src/utils/wallet.js @@ -2,9 +2,31 @@ import get from 'lodash/get'; import parseDate from './parseDate'; import parseToken from './parseToken'; import { vestsToSp } from './conversions'; -import { getState, getFeedHistory, getAccount, getAccountHistory } from '../providers/steem/dsteem'; +import { getFeedHistory, getAccount, getAccountHistory } from '../providers/steem/dsteem'; import { getCurrencyTokenRate } from '../providers/esteem/esteem'; +export const transferTypes = [ + 'curation_reward', + 'author_reward', + 'comment_benefactor_reward', + 'claim_reward_balance', + 'transfer', + 'transfer_to_savings', + 'transfer_from_savings', + 'transfer_to_vesting', + 'withdraw_vesting', + 'fill_order', + 'escrow_transfer', + 'escrow_dispute', + 'escrow_release', + 'escrow_approve', + 'delegate_vesting_shares', + 'cancel_transfer_from_savings', + 'fill_convert_request', + 'fill_transfer_from_savings', + 'fill_vesting_withdraw', +]; + export const groomingTransactionData = (transaction, steemPerMVests) => { if (!transaction || !steemPerMVests) { return []; @@ -224,22 +246,13 @@ export const groomingWalletData = async (user, globalProps, userCurrency) => { const timeDiff = Math.abs(parseDate(userdata.next_vesting_withdrawal) - new Date()); walletData.nextVestingWithdrawal = Math.round(timeDiff / (1000 * 3600)); - /*const history = await getAccountHistory(get(user, 'name')); + const history = await getAccountHistory(get(user, 'name')); - const transfers = history.filter((tx) => { - return tx[1] && tx[1].op && tx[1].op[0] === 'claim_reward_balance' - }); + const transfers = history.filter((tx) => transferTypes.includes(get(tx[1], 'op[0]', false))); - const actualTransfers = transfers.reduce((arr, tx) => { - console.log('tx', tx[1]) - const transaction = tx[1].op[1]; - const date = new Date(`${tx[1].timestamp}Z`); - transaction.date = date; - arr.push(transaction); - return arr; - }, []); - */ - walletData.transactions = []; + transfers.sort(compare); + + walletData.transactions = transfers; return walletData; }; diff --git a/yarn.lock b/yarn.lock index 5705846c5..8288f7c45 100644 --- a/yarn.lock +++ b/yarn.lock @@ -837,10 +837,10 @@ dependencies: "@hapi/hoek" "^8.3.0" -"@hiveio/dhive@^0.14.1": - version "0.14.1" - resolved "https://registry.yarnpkg.com/@hiveio/dhive/-/dhive-0.14.1.tgz#1a6273d1544bd97bf2a047baa85a6afb4cecae78" - integrity sha512-80I1alxQW5Cnt61KvAuSa+dPH6V+JNrE/0vR+DgQGH9y8l3xmn+pr4TXNLtSvx37pI8Zt1UEPsgvren/R02WeQ== +"@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== dependencies: bs58 "^4.0.1" bytebuffer "^5.0.1"