diff --git a/src/config/locales/en-US.json b/src/config/locales/en-US.json index a85f266d5..4b0d0109f 100644 --- a/src/config/locales/en-US.json +++ b/src/config/locales/en-US.json @@ -39,6 +39,9 @@ "reblog": "Reblog", "login": "Login", "checkin_extra": "Bonus", + "delegation": "Delegation", + "delegation_title": "Delegation reward", + "delegation_desc": "You can earn 1 point per day for every 100sp", "post_title": "Points for post", "comment_title": "Points for comment", "vote_title": "Points for vote", diff --git a/src/constants/options/points.js b/src/constants/options/points.js index 617d83a5c..3b580dfb6 100644 --- a/src/constants/options/points.js +++ b/src/constants/options/points.js @@ -1,4 +1,12 @@ export default { + 150: { + icon: 'cached', + textKey: 'points.delegation_title', + nameKey: 'points.delegation', + descriptionKey: 'points.delegation_desc', + iconType: 'MaterialIcons', + point: 1, + }, 100: { icon: 'pencil', textKey: 'points.post_title', @@ -58,6 +66,9 @@ export default { }; export const POINTS_KEYS = [ + { + type: 150, + }, { type: 100, }, diff --git a/src/providers/steem/dsteem.js b/src/providers/steem/dsteem.js index 3dd4373c7..d268c07e8 100644 --- a/src/providers/steem/dsteem.js +++ b/src/providers/steem/dsteem.js @@ -4,7 +4,8 @@ import Config from 'react-native-config'; import { getServer } from '../../realm/realm'; import { getUnreadActivityCount } from '../esteem/esteem'; -import { userActivity } from '../esteem/ePoint'; +import { userActivity, transfer } from '../esteem/ePoint'; + // Utils import { decryptKey } from '../../utils/crypto'; import { parsePosts, parsePost, parseComments } from '../../utils/postParser'; @@ -530,7 +531,10 @@ export const transferToken = (currentAccount, pin, data) => { client.broadcast .transfer(args, privateKey) .then(result => { - resolve(result); + if (result) { + transfer(data.from, data.destination, data.ammount); + resolve(result); + } }) .catch(err => { reject(err);