From 674f41910e2c5587a67c30d84ac3fbff17da39c1 Mon Sep 17 00:00:00 2001 From: feruz Date: Tue, 10 Dec 2019 05:51:36 +0200 Subject: [PATCH] grooming some more transaction types --- src/config/locales/en-US.json | 2 +- src/utils/wallet.js | 48 +++++++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+), 1 deletion(-) diff --git a/src/config/locales/en-US.json b/src/config/locales/en-US.json index 116503bbc..1e0344352 100644 --- a/src/config/locales/en-US.json +++ b/src/config/locales/en-US.json @@ -28,7 +28,7 @@ "login_title": "Points for login", "checkin_title": "Points for heartbeat", "checkin_extra_title": "Usage bonus", - "no_activity": "No activity here!", + "no_activity": "No recent activity", "outgoing_transfer_description": "", "incoming_transfer_description": "", "post_desc": "You can earn point by posting regularly. Posting gives you upto 15 points.", diff --git a/src/utils/wallet.js b/src/utils/wallet.js index 90c8d813c..54eb8dfd2 100644 --- a/src/utils/wallet.js +++ b/src/utils/wallet.js @@ -109,6 +109,54 @@ export const groomingTransactionData = (transaction, steemPerMVests, formatNumbe result.value = `${currentPays} = ${openPays}`; result.icon = 'reorder'; break; + case 'escrow_transfer': + case 'escrow_dispute': + case 'escrow_release': + case 'escrow_approve': + const { agent, escrow_id } = opData; + let { from: frome } = opData; + let { to: toe } = opData; + + result.value = `${escrow_id}`; + result.icon = 'wb-iridescent'; + result.details = frome && toe ? `@${frome} to @${toe}` : null; + result.memo = agent || null; + break; + case 'delegate_vesting_shares': + const { delegator, delegatee, vesting_shares } = opData; + + result.value = `${vesting_shares}`; + result.icon = 'change-history'; + result.details = delegatee && delegator ? `@${delegator} to @${delegatee}` : null; + break; + case 'cancel_transfer_from_savings': + let { from: from_who, request_id: requestId } = opData; + + result.value = `${0}`; + result.icon = 'cancel'; + result.details = from_who ? `from @${from_who}, id: ${requestId}` : null; + break; + case 'fill_convert_request': + let { owner: who, requestid: requestedId, amount_out: amount_out } = opData; + + result.value = `${amount_out}`; + result.icon = 'hourglass-full'; + result.details = who ? `@${who}, id: ${requestedId}` : null; + break; + case 'fill_transfer_from_savings': + let { from: fillwho, to: fillto, amount: fillamount, request_id: fillrequestId } = opData; + + result.value = `${fillamount}`; + result.icon = 'hourglass-full'; + result.details = fillwho ? `@${fillwho} to @${fillto}, id: ${fillrequestId}` : null; + break; + case 'fill_vesting_withdraw': + let { from_account: pd_who, to_account: pd_to, deposited: deposited } = opData; + + result.value = `${deposited}`; + result.icon = 'hourglass-full'; + result.details = pd_who ? `@${pd_who} to ${pd_to}` : null; + break; default: return []; }