Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • 19-on-proposals-page-make-vote-count-clickable-and-have-it-show-modal-dialog-with-individual-votes
  • 42-take-into-account-badactor-list-and-disallow-transfers-2
  • dependabot/npm_and_yarn/handlebars-4.5.3
  • develop
  • master
  • mirrornet
  • refactor-proposals-ui
  • walletCleanse
  • witnesses-page-fixes
9 results

Target

Select target project
  • hive/wallet
1 result
Select Git revision
  • 19-on-proposals-page-make-vote-count-clickable-and-have-it-show-modal-dialog-with-individual-votes
  • 42-take-into-account-badactor-list-and-disallow-transfers-2
  • dependabot/npm_and_yarn/handlebars-4.5.3
  • develop
  • master
  • mirrornet
  • refactor-proposals-ui
  • walletCleanse
  • witnesses-page-fixes
9 results
Show changes
Commits on Source (7)
......@@ -114,9 +114,7 @@ class UserWallet extends React.Component {
.split(' ')
.shift();
return (
virtualSupply *
currentInflationRate *
vestingRewardPercent /
(virtualSupply * currentInflationRate * vestingRewardPercent) /
totalVestingFunds
);
};
......@@ -541,7 +539,11 @@ class UserWallet extends React.Component {
);
}
const spApr = this.getCurrentApr(gprops);
let spApr = 0;
try {
// TODO: occasionally fails. grops not loaded yet?
spApr = this.getCurrentApr(gprops);
} catch (e) {}
return (
<div className="UserWallet">
......
......@@ -56,11 +56,27 @@ export default function reducer(state = defaultState, action) {
let errorStr = error.toString();
let errorKey = 'Transaction broadcast error.';
for (const [type /*, operation*/] of operations) {
for (const [type, operation] of operations) {
switch (type) {
case 'transfer':
if (/get_balance/.test(errorStr)) {
errorKey = 'Insufficient balance.';
} else {
for (
let ei = 0;
ei < error.data.stack.length;
ei += 1
) {
const errorStackItem = error.data.stack[ei];
if (
errorStackItem.data.name === operation.to &&
errorStackItem.data.what === 'unknown key'
) {
errorKey = 'Unknown recipient';
break;
}
}
}
break;
case 'withdraw_vesting':
......
......@@ -48,7 +48,7 @@ export default function useAccountRecoveryApi(app) {
const arec = yield models.AccountRecoveryRequest.findOne({
attributes: ['id', 'account_name', 'owner_key'],
where: { validation_code: esc(code) },
order: 'id desc',
order: [['id', 'DESC']],
});
if (arec) {
this.session.arec = arec.id;
......
......@@ -147,7 +147,7 @@ export default function useGeneralApi(app) {
// const existing_created_account = yield models.Account.findOne({
// attributes: ['id'],
// where: {user_id, ignored: false, created: true},
// order: 'id DESC'
// order: [['id', 'DESC']]
// });
// if (existing_created_account) {
// throw new Error("Only one Steem account per user is allowed in order to prevent abuse");
......@@ -158,7 +158,7 @@ export default function useGeneralApi(app) {
const same_ip_account = yield models.Account.findOne({
attributes: ['created_at'],
where: { remote_ip: esc(remote_ip), created: true },
order: 'id DESC',
order: [['id', 'DESC']],
});
if (same_ip_account) {
const minutes =
......@@ -236,7 +236,7 @@ export default function useGeneralApi(app) {
const existing_account = yield models.Account.findOne({
attributes: ['id'],
where: { user_id, name: account.name },
order: 'id DESC',
order: [['id', 'DESC']],
});
if (existing_account) {
yield existing_account.update(account_attrs);
......@@ -368,9 +368,7 @@ export default function useGeneralApi(app) {
if (!sigHex) return;
if (weight !== 1 || weight_threshold !== 1) {
console.error(
`/login_account login_challenge unsupported ${
type
} auth configuration: ${account}`
`/login_account login_challenge unsupported ${type} auth configuration: ${account}`
);
} else {
const sig = parseSig(sigHex);
......
......@@ -266,9 +266,7 @@ export default function useEnterAndConfirmEmailPages(app) {
]);
if (check_account_res && check_account_res.length > 0) {
this.flash = {
error: `${
picked_account_name
} is already taken, please try another name`,
error: `${picked_account_name} is already taken, please try another name`,
};
this.redirect('/pick_account' + makeParams(params));
return;
......@@ -455,7 +453,7 @@ export default function useEnterAndConfirmEmailPages(app) {
const existing_account = yield models.Account.findOne({
attributes: ['id'],
where: { user_id: user.id, name: account },
order: 'id DESC',
order: [['id', 'DESC']],
});
if (!existing_account) {
yield models.Account.create({
......