correct ecency.app and ecency usages

This commit is contained in:
feruz 2020-07-18 07:58:13 +03:00
parent 0a47c9ba54
commit 5779d9cd60
4 changed files with 7 additions and 5 deletions

View File

@ -1403,7 +1403,7 @@ export const grantPostingPermission = async (json, pin, currentAccount) => {
{ {
account_auths: [ account_auths: [
...get(currentAccount, 'posting.account_auths'), ...get(currentAccount, 'posting.account_auths'),
['ecency', get(currentAccount, 'posting.weight_threshold')], ['ecency.app', get(currentAccount, 'posting.weight_threshold')],
], ],
}, },
); );

View File

@ -1,7 +1,7 @@
import hivesigner from 'hivesigner'; import hivesigner from 'hivesigner';
const api = new hivesigner.Client({ const api = new hivesigner.Client({
app: 'ecency', app: 'ecency.app',
callbackURL: 'http://127.0.0.1:3415', callbackURL: 'http://127.0.0.1:3415',
}); });

View File

@ -562,7 +562,7 @@ class EditorContainer extends Component {
if (currentAccount && currentAccount.posting) { if (currentAccount && currentAccount.posting) {
hasPostingPerm = hasPostingPerm =
currentAccount.posting.account_auths.filter((x) => x[0] === 'ecency').length > 0; currentAccount.posting.account_auths.filter((x) => x[0] === 'ecency.app').length > 0;
} }
if (hasPostingPerm) { if (hasPostingPerm) {

View File

@ -42,8 +42,10 @@ const parseAuthorPermlink = (u) => {
}; };
export default (url) => { export default (url) => {
if (url.startsWith('ecency://')) { if (url.startsWith('ecency://') || url.startsWith('esteem://')) {
url = url.replace('ecency://', 'https://ecency.com/'); url = url
.replace('ecency://', 'https://ecency.com/')
.replace('esteem://', 'https://ecency.com/');
} }
// eslint-disable-next-line no-useless-escape // eslint-disable-next-line no-useless-escape