Commit f73bca6e authored by Bartłomiej Górnicki's avatar Bartłomiej Górnicki

Merge branch 'master' into 'autoclave'

# Conflicts:
#   src/app/components/modules/UserWallet.jsx
parents 378892ff 439dc5b0
......@@ -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':
......
......@@ -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 Hive account per user is allowed in order to prevent abuse");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment