added new e mpoints

This commit is contained in:
u-e 2019-06-08 16:05:27 +03:00
parent deb097d063
commit 2c373d2a40
3 changed files with 20 additions and 2 deletions

View File

@ -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",

View File

@ -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,
},

View File

@ -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 => {
if (result) {
transfer(data.from, data.destination, data.ammount);
resolve(result);
}
})
.catch(err => {
reject(err);