hedgequantx 2.4.28 → 2.4.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/menus/dashboard.js +2 -2
package/package.json
CHANGED
package/src/menus/dashboard.js
CHANGED
|
@@ -63,8 +63,8 @@ const dashboardMenu = async (service) => {
|
|
|
63
63
|
// Yellow icons: ✔ for each stat
|
|
64
64
|
const icon = chalk.yellow('✔ ');
|
|
65
65
|
const statsPlain = `✔ Connections: ${statsInfo.connections} ✔ Accounts: ${statsInfo.accounts} ✔ Balance: ${balStr} ✔ P&L: ${pnlDisplay}`;
|
|
66
|
-
const statsLeftPad = Math.floor((W - statsPlain.length) / 2);
|
|
67
|
-
const statsRightPad = W - statsPlain.length - statsLeftPad;
|
|
66
|
+
const statsLeftPad = Math.max(0, Math.floor((W - statsPlain.length) / 2));
|
|
67
|
+
const statsRightPad = Math.max(0, W - statsPlain.length - statsLeftPad);
|
|
68
68
|
|
|
69
69
|
console.log(chalk.cyan('║') + ' '.repeat(statsLeftPad) +
|
|
70
70
|
icon + chalk.white(`Connections: ${statsInfo.connections}`) + ' ' +
|