mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-25 22:33:52 +03:00
fixed get pincode usage
This commit is contained in:
parent
b29f9c3a5d
commit
4404bdb2eb
@ -617,7 +617,6 @@ export const lookupAccounts = async (username) => {
|
|||||||
*/
|
*/
|
||||||
export const postContent = async (
|
export const postContent = async (
|
||||||
account,
|
account,
|
||||||
digitPinCode,
|
|
||||||
parentAuthor,
|
parentAuthor,
|
||||||
parentPermlink,
|
parentPermlink,
|
||||||
permlink,
|
permlink,
|
||||||
@ -628,6 +627,7 @@ export const postContent = async (
|
|||||||
voteWeight = null,
|
voteWeight = null,
|
||||||
) => {
|
) => {
|
||||||
const { name: author } = account;
|
const { name: author } = account;
|
||||||
|
const digitPinCode = await getDigitPinCode();
|
||||||
|
|
||||||
if (account.local.authType === AUTH_TYPE.MASTER_KEY) {
|
if (account.local.authType === AUTH_TYPE.MASTER_KEY) {
|
||||||
const opArray = [
|
const opArray = [
|
||||||
|
@ -8,9 +8,6 @@ import ImagePicker from 'react-native-image-crop-picker';
|
|||||||
import { uploadImage } from '../../../providers/esteem/esteem';
|
import { uploadImage } from '../../../providers/esteem/esteem';
|
||||||
import { postContent } from '../../../providers/steem/dsteem';
|
import { postContent } from '../../../providers/steem/dsteem';
|
||||||
import { setDraftPost, getDraftPost } from '../../../realm/realm';
|
import { setDraftPost, getDraftPost } from '../../../realm/realm';
|
||||||
import { getDigitPinCode } from '../../../providers/steem/auth';
|
|
||||||
|
|
||||||
// Middleware
|
|
||||||
|
|
||||||
// Constants
|
// Constants
|
||||||
import { default as ROUTES } from '../../../constants/routeNames';
|
import { default as ROUTES } from '../../../constants/routeNames';
|
||||||
@ -138,7 +135,7 @@ class EditorContainer extends Component {
|
|||||||
});
|
});
|
||||||
// For new image api
|
// For new image api
|
||||||
// const { currentAccount } = this.props;
|
// const { currentAccount } = this.props;
|
||||||
// const digitPinCode = await getDigitPinCode();
|
// const digitPinCode = await getPinCode();
|
||||||
// const privateKey = decryptKey(currentAccount.local.postingKey, digitPinCode);
|
// const privateKey = decryptKey(currentAccount.local.postingKey, digitPinCode);
|
||||||
// const sign = generateSignature(media, privateKey);
|
// const sign = generateSignature(media, privateKey);
|
||||||
// const data = new Buffer(media.data, 'base64');
|
// const data = new Buffer(media.data, 'base64');
|
||||||
@ -214,14 +211,12 @@ class EditorContainer extends Component {
|
|||||||
const meta = extractMetadata(fields.body);
|
const meta = extractMetadata(fields.body);
|
||||||
const jsonMeta = makeJsonMetadata(meta, fields.tags);
|
const jsonMeta = makeJsonMetadata(meta, fields.tags);
|
||||||
const permlink = generatePermlink(fields.title);
|
const permlink = generatePermlink(fields.title);
|
||||||
const digitPinCode = await getDigitPinCode();
|
|
||||||
const author = currentAccount.name;
|
const author = currentAccount.name;
|
||||||
const options = makeOptions(author, permlink);
|
const options = makeOptions(author, permlink);
|
||||||
const parentPermlink = fields.tags[0];
|
const parentPermlink = fields.tags[0];
|
||||||
|
|
||||||
await postContent(
|
await postContent(
|
||||||
currentAccount,
|
currentAccount,
|
||||||
digitPinCode,
|
|
||||||
'',
|
'',
|
||||||
parentPermlink,
|
parentPermlink,
|
||||||
permlink,
|
permlink,
|
||||||
@ -251,7 +246,6 @@ class EditorContainer extends Component {
|
|||||||
|
|
||||||
const jsonMeta = makeJsonMetadataReply(post.json_metadata.tags || ['esteem']);
|
const jsonMeta = makeJsonMetadataReply(post.json_metadata.tags || ['esteem']);
|
||||||
const permlink = generateReplyPermlink(post.author);
|
const permlink = generateReplyPermlink(post.author);
|
||||||
const digitPinCode = await getDigitPinCode();
|
|
||||||
const author = currentAccount.name;
|
const author = currentAccount.name;
|
||||||
const options = makeOptions(author, permlink);
|
const options = makeOptions(author, permlink);
|
||||||
const parentAuthor = post.author;
|
const parentAuthor = post.author;
|
||||||
@ -259,7 +253,6 @@ class EditorContainer extends Component {
|
|||||||
|
|
||||||
await postContent(
|
await postContent(
|
||||||
currentAccount,
|
currentAccount,
|
||||||
digitPinCode,
|
|
||||||
parentAuthor,
|
parentAuthor,
|
||||||
parentPermlink,
|
parentPermlink,
|
||||||
permlink,
|
permlink,
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import React, { Component, Fragment } from 'react';
|
import React, { Component } from 'react';
|
||||||
import { View, Text } from 'react-native';
|
import { View } from 'react-native';
|
||||||
import { injectIntl } from 'react-intl';
|
import { injectIntl } from 'react-intl';
|
||||||
|
|
||||||
// Utils
|
// Utils
|
||||||
|
Loading…
Reference in New Issue
Block a user