From 28defd06dbe46d8a43283a9c71ba70faa526d936 Mon Sep 17 00:00:00 2001 From: rsercano Date: Tue, 24 Nov 2020 09:33:42 +0300 Subject: [PATCH] fixed the test --- lib/service/Service.ts | 4 ++-- test/jest/LndClient.spec.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/service/Service.ts b/lib/service/Service.ts index 5c9d9f27a..e9ec58b1b 100644 --- a/lib/service/Service.ts +++ b/lib/service/Service.ts @@ -742,9 +742,9 @@ class Service extends EventEmitter { private structAlertMessage = (type: AlertType, payload: ChannelBalanceAlert | BalanceAlert) => { switch (type) { case AlertType.LowChannelBalance: - return `${BalanceSide[payload.side || 0]} channel balance (${satsToCoinsStr(payload.sideBalance || 0)}) of one of the channels is lower than 10% of channel capacity (${satsToCoinsStr(payload.totalBalance || 0)})`; + return `${BalanceSide[payload.side || 0]} channel balance (${satsToCoinsStr(payload.sideBalance || 0)} ${payload.currency}) of one of the channels is lower than 10% of channel capacity (${satsToCoinsStr(payload.totalBalance || 0)} ${payload.currency})`; case AlertType.LowTradingBalance: - return `${BalanceSide[payload.side || 0]} trading balance (${satsToCoinsStr(payload.sideBalance || 0)}) is lower than 10% of trading capacity (${satsToCoinsStr(payload.totalBalance || 0)})`; + return `${BalanceSide[payload.side || 0]} trading balance (${satsToCoinsStr(payload.sideBalance || 0)} ${payload.currency}) is lower than 10% of trading capacity (${satsToCoinsStr(payload.totalBalance || 0)} ${payload.currency})`; default: return 'unknown alert type'; } diff --git a/test/jest/LndClient.spec.ts b/test/jest/LndClient.spec.ts index 1039c746a..c8aa1425e 100644 --- a/test/jest/LndClient.spec.ts +++ b/test/jest/LndClient.spec.ts @@ -331,7 +331,7 @@ describe('LndClient', () => { ); expect(emit).toHaveBeenCalledTimes(1); - expect(emit).toHaveBeenCalledWith('lowBalance', { + expect(emit).toHaveBeenCalledWith('lowTradingBalance', { totalBalance, currency, side: BalanceSide.Local,