@azuro-org/images-generator 2.0.4 → 2.0.6

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.
@@ -11,7 +11,8 @@ export type Props = {
11
11
  openLevel: string;
12
12
  exitLevel: string | undefined;
13
13
  };
14
- pnl: number;
14
+ pnl: string;
15
+ isProfit: boolean;
15
16
  };
16
17
  declare const template: Template<Props>;
17
18
  export default template;
@@ -38,8 +38,7 @@ var template = {
38
38
  return __generator(this, function (_b) {
39
39
  switch (_b.label) {
40
40
  case 0:
41
- accountAddress = props.accountAddress, trend = props.trend, pnl = props.pnl, position = props.position;
42
- isProfit = pnl > 0;
41
+ accountAddress = props.accountAddress, trend = props.trend, pnl = props.pnl, position = props.position, isProfit = props.isProfit;
43
42
  bgColor = (isProfit ? cardTypes.profit : cardTypes.loss).bgColor;
44
43
  leverage = position.leverage, isLong = position.isLong, openLevel = position.openLevel, exitLevel = position.exitLevel;
45
44
  html = getFile(path.join(__dirname, 'index.html'));
@@ -67,7 +66,7 @@ var template = {
67
66
  .replace('{trendTitle}', trend.title)
68
67
  .replace('{positionInfo}', positionInfo)
69
68
  .replace('{arrowImage}', arrowImage)
70
- .replace('{pnl}', pnl > 0 ? "+".concat(pnl) : "".concat(pnl))
69
+ .replace('{pnl}', isProfit ? "+".concat(pnl) : "".concat(pnl))
71
70
  .replace('{openLevel}', String(openLevel))
72
71
  .replace('{exitLevel}', String(exitLevel || ''))
73
72
  .replace('{exitLevelClass}', exitLevel ? '' : 'none')];
@@ -11,7 +11,8 @@ export type Props = {
11
11
  openLevel: string;
12
12
  exitLevel: string | undefined;
13
13
  };
14
- pnl: number;
14
+ pnl: string;
15
+ isProfit: boolean;
15
16
  };
16
17
  declare const template: Template<Props>;
17
18
  export default template;
@@ -38,8 +38,7 @@ var template = {
38
38
  return index.a(this, function (_b) {
39
39
  switch (_b.label) {
40
40
  case 0:
41
- accountAddress = props.accountAddress, trend = props.trend, pnl = props.pnl, position = props.position;
42
- isProfit = pnl > 0;
41
+ accountAddress = props.accountAddress, trend = props.trend, pnl = props.pnl, position = props.position, isProfit = props.isProfit;
43
42
  bgColor = (isProfit ? cardTypes.profit : cardTypes.loss).bgColor;
44
43
  leverage = position.leverage, isLong = position.isLong, openLevel = position.openLevel, exitLevel = position.exitLevel;
45
44
  html = index.g(path__default["default"].join(__dirname, 'index.html'));
@@ -67,7 +66,7 @@ var template = {
67
66
  .replace('{trendTitle}', trend.title)
68
67
  .replace('{positionInfo}', positionInfo)
69
68
  .replace('{arrowImage}', arrowImage)
70
- .replace('{pnl}', pnl > 0 ? "+".concat(pnl) : "".concat(pnl))
69
+ .replace('{pnl}', isProfit ? "+".concat(pnl) : "".concat(pnl))
71
70
  .replace('{openLevel}', String(openLevel))
72
71
  .replace('{exitLevel}', String(exitLevel || ''))
73
72
  .replace('{exitLevelClass}', exitLevel ? '' : 'none')];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@azuro-org/images-generator",
3
- "version": "2.0.4",
3
+ "version": "2.0.6",
4
4
  "license": "ISC",
5
5
  "engines": {
6
6
  "node": ">=16.15.1",