diff --git a/app/core/app.utilities.js b/app/core/app.utilities.js index af5ba1f..921438f 100644 --- a/app/core/app.utilities.js +++ b/app/core/app.utilities.js @@ -128,6 +128,10 @@ object: (objectId) => ({ text: objectId, href: `/#/objects/${objectId}` + }), + offer: (offerId) => ({ + text: offerId, + href: `/#/credit-offers/${offerId}` }) }) @@ -1559,6 +1563,23 @@ }) } + else if (operation_type === 74) { // Expired Credit Deal + console.log('debug expired', operation) + const operation_account = operation.borrower; + const unpaid = operation.unpaid_amount; + getAccount(operation_account).then((account_name) => { + getAsset(unpaid.asset_id, unpaid.amount).then((unpaidAsset) => { + operation_text = $filter('translateWithLinks')('Operation Credit Deal Expired', { + accountLink : getLink().account(account_name), + amount : unpaidAsset.amount, + offerLink : getLink().offer(operation.offer_id), + assetLink : getLink().asset(unpaidAsset.symbol), + }); + callback(operation_text) + }); + }) + } + else { operation_text = $filter('translate')('Operation Beautifier Missing Description', { diff --git a/app/i18n/en.json b/app/i18n/en.json index f8c19c1..c30f6a6 100644 --- a/app/i18n/en.json +++ b/app/i18n/en.json @@ -168,7 +168,7 @@ "Operation Credit Offer Update": "{{accountLink}} update a credit offer #{{offerId}}", "Operation Credit Offer Accept": "{{accountLink}} borrows {{amount}} {{assetLink}} from credit offer #{{offerId}}", "Operation Credit Deal Repay": "{{accountLink}} repays {{amount}} {{assetLink}} to credit offer with fee {{feeAmount}} {{feeAssetLink}}", - "Operation Credit Deal Expired": "{{accountLink}} create a credit offer of {{amount}} {{assetLink}} with fee rate {{fee}}%", + "Operation Credit Deal Expired": "{{accountLink}} credit deal for offer {{offerLink}} has expired. Unpaid amount: {{amount}} {{assetLink}}", "Operation Ticket Create Description": "{{accountLink}} locked away {{amount}} {{assetLink}} in a voting ticket", "Operation Ticket Update Description": "{{accountLink}} changed the locked away amount to {{amount}} {{assetLink}} of ticket {{ticket}}",