@gloom-sh/terminal 0.20.10 → 0.20.11
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/patches/@opentui%2Fcore@0.3.2.patch +16 -0
- package/src/api-client/socket-connection.ts +355 -0
- package/src/api-client/socket-features.ts +75 -0
- package/src/api-client/socket-frames.ts +161 -0
- package/src/api-client/socket-listeners.ts +207 -0
- package/src/api-client/socket-quotes.ts +332 -0
- package/src/api-client/socket.ts +150 -983
- package/src/brokers/signed-in/adapter.ts +19 -5
- package/src/brokers/signed-in/client.ts +13 -1
- package/src/brokers/signed-in/sign-in-dialog.tsx +33 -9
- package/src/components/chart/native/kitty/manager.ts +2 -0
- package/src/components/chart/native/surface/manager.ts +211 -11
- package/src/components/command-bar/panel/index.tsx +2 -13
- package/src/components/command-bar/panel/layout.ts +1 -7
- package/src/components/command-bar/panel/runtime.ts +0 -1
- package/src/components/command-bar/panel/types.ts +0 -2
- package/src/components/data-table/column-menu.tsx +89 -0
- package/src/components/data-table/sort-menu.tsx +9 -2
- package/src/components/data-table/view.tsx +33 -6
- package/src/components/form-modal/content.tsx +10 -0
- package/src/components/index.ts +1 -1
- package/src/components/layout/pane/footer/index.tsx +25 -11
- package/src/components/layout/pane/footer/model.ts +62 -20
- package/src/components/layout/pane/sidebar.tsx +125 -15
- package/src/components/layout/shell/active-drag.ts +18 -13
- package/src/components/layout/shell/drag/magnets.ts +34 -18
- package/src/components/ticker/list-table-view.tsx +5 -0
- package/src/components/ui/data-table/column-order.ts +180 -0
- package/src/components/ui/data-table/index.tsx +12 -1
- package/src/components/ui/data-table/opentui/index.tsx +267 -23
- package/src/components/ui/data-table/opentui/model.ts +43 -4
- package/src/components/ui/data-table/types.ts +49 -0
- package/src/components/ui/data-table/use-column-order.ts +135 -0
- package/src/components/ui/index.ts +1 -1
- package/src/components/ui/table-layout.ts +120 -0
- package/src/docs/snapshot.json +3 -2
- package/src/i18n/es.ts +2 -0
- package/src/i18n/ja.ts +2 -0
- package/src/i18n/ko.ts +2 -0
- package/src/i18n/zh-cn.ts +2 -0
- package/src/i18n/zh-tw.ts +2 -0
- package/src/market-data/coordinator/index.ts +4 -3
- package/src/market-data/coordinator/quotes.ts +12 -4
- package/src/market-data/quotes/freshness.ts +12 -0
- package/src/market-data/quotes/live-valuation.ts +1 -1
- package/src/market-data/quotes/regular-session-valuation.ts +1 -1
- package/src/plugins/builtin/broker-manager/detail.tsx +5 -3
- package/src/plugins/builtin/broker-manager/index.tsx +6 -6
- package/src/plugins/builtin/broker-manager/model.ts +15 -6
- package/src/plugins/builtin/broker-manager/pane-actions.tsx +11 -4
- package/src/plugins/builtin/broker-manager/sign-in-end.ts +50 -19
- package/src/plugins/builtin/broker-manager/table.ts +10 -4
- package/src/plugins/builtin/chat/sidebar.tsx +33 -16
- package/src/plugins/builtin/cloud/askg/tool-timeline.tsx +2 -0
- package/src/plugins/builtin/equity-screener/live.ts +74 -18
- package/src/plugins/builtin/equity-screener/model.ts +19 -4
- package/src/plugins/builtin/equity-screener/pane.tsx +19 -14
- package/src/plugins/builtin/equity-screener/refresh-anchor.ts +45 -0
- package/src/plugins/builtin/equity-screener/results.ts +22 -2
- package/src/plugins/builtin/equity-screener/screen-check.ts +9 -3
- package/src/plugins/builtin/futures/index.tsx +15 -1
- package/src/plugins/builtin/futures/table.tsx +1 -1
- package/src/plugins/builtin/fx-matrix/index.tsx +2 -0
- package/src/plugins/builtin/holders/pane.tsx +30 -20
- package/src/plugins/builtin/iv-history/events.ts +5 -0
- package/src/plugins/builtin/iv-history/headless.ts +7 -2
- package/src/plugins/builtin/kelly-sizer/sections.tsx +2 -0
- package/src/plugins/builtin/macro-day/headless.ts +12 -3
- package/src/plugins/builtin/options/view.tsx +2 -0
- package/src/plugins/builtin/options-scenario/pane.tsx +2 -1
- package/src/plugins/builtin/perps/cascade-tabs.tsx +2 -1
- package/src/plugins/builtin/portfolio-list/pane/index.tsx +13 -0
- package/src/plugins/builtin/portfolio-list/table.tsx +5 -0
- package/src/plugins/builtin/rate-path/pane.tsx +2 -0
- package/src/plugins/builtin/revenue-breakdown/pane.tsx +2 -0
- package/src/plugins/builtin/reverse-dcf/pane.tsx +2 -1
- package/src/plugins/builtin/seasonality/pane.tsx +2 -1
- package/src/plugins/builtin/thirteenf/pane.tsx +2 -0
- package/src/plugins/builtin/ticker-detail/financials/model.ts +28 -6
- package/src/plugins/builtin/ticker-detail/financials/ratio-table.tsx +26 -9
- package/src/plugins/builtin/ticker-detail/financials/tab.tsx +58 -35
- package/src/plugins/builtin/vol-surface/heat-grid.tsx +2 -1
- package/src/plugins/builtin/vol-surface/pane.tsx +2 -1
- package/src/plugins/builtin/world-indices/index.tsx +5 -1
- package/src/plugins/builtin/yield-curve/index.tsx +2 -1
- package/src/renderers/dom/data-table/column-drag.ts +147 -0
- package/src/renderers/dom/data-table/index.tsx +22 -0
- package/src/renderers/dom/data-table/row.tsx +27 -5
- package/src/renderers/dom/styles.css +22 -0
- package/src/renderers/opentui/chart-surface.tsx +1 -0
- package/src/renderers/opentui/frame-hits.ts +33 -0
- package/src/renderers/opentui/host.tsx +2 -0
- package/src/renderers/opentui/native-surface.ts +14 -21
- package/src/renderers/opentui/test-utils.tsx +3 -0
- package/src/state/app/context/index.tsx +22 -0
- package/src/test-support/app-store.ts +24 -1
- package/src/time-series/live-quotes.ts +3 -9
- package/src/ui/host.tsx +18 -0
- package/src/ui/pointer-drag.ts +11 -2
- package/src/utils/fundamentals.ts +14 -3
- package/src/utils/share-multiples.cases.json +780 -2
- package/src/utils/share-multiples.ts +154 -24
|
@@ -6,7 +6,12 @@ import {
|
|
|
6
6
|
type CellRect,
|
|
7
7
|
type NativeChartBitmap,
|
|
8
8
|
} from "../../components/chart/native/chart-rasterizer";
|
|
9
|
-
import {
|
|
9
|
+
import {
|
|
10
|
+
getNativeSurfaceManager,
|
|
11
|
+
insetCellRect,
|
|
12
|
+
type CellInsets,
|
|
13
|
+
type NativeSurfaceAnchor,
|
|
14
|
+
} from "../../components/chart/native/surface/manager";
|
|
10
15
|
import {
|
|
11
16
|
getRenderableCellRect,
|
|
12
17
|
resolveNativeSurfaceVisibleRect,
|
|
@@ -32,38 +37,24 @@ export interface NativeSurfaceTarget {
|
|
|
32
37
|
pixelHeight: number;
|
|
33
38
|
/** The source key plus the pixel size, so a resize uploads a fresh bitmap. */
|
|
34
39
|
bitmapKey: string;
|
|
40
|
+
/** The box drawn over, which the image layer measures again after every frame. */
|
|
41
|
+
anchor: NativeSurfaceAnchor;
|
|
35
42
|
}
|
|
36
43
|
|
|
37
|
-
export
|
|
38
|
-
top: number;
|
|
39
|
-
right: number;
|
|
40
|
-
bottom: number;
|
|
41
|
-
left: number;
|
|
42
|
-
}
|
|
44
|
+
export type { CellInsets };
|
|
43
45
|
|
|
44
46
|
function sameTarget(left: NativeSurfaceTarget | null, right: NativeSurfaceTarget | null): boolean {
|
|
45
47
|
if (left === right) return true;
|
|
46
48
|
if (!left || !right) return false;
|
|
47
49
|
return left.bitmapKey === right.bitmapKey
|
|
50
|
+
&& left.anchor.renderable === right.anchor.renderable
|
|
51
|
+
&& left.anchor.insets === right.anchor.insets
|
|
48
52
|
&& left.pixelWidth === right.pixelWidth
|
|
49
53
|
&& left.pixelHeight === right.pixelHeight
|
|
50
54
|
&& sameCellRect(left.rect, right.rect)
|
|
51
55
|
&& sameCellRect(left.visibleRect, right.visibleRect);
|
|
52
56
|
}
|
|
53
57
|
|
|
54
|
-
function insetRect(rect: CellRect, insets: CellInsets | undefined): CellRect | null {
|
|
55
|
-
if (!insets) return rect;
|
|
56
|
-
const width = rect.width - insets.left - insets.right;
|
|
57
|
-
const height = rect.height - insets.top - insets.bottom;
|
|
58
|
-
if (width <= 0 || height <= 0) return null;
|
|
59
|
-
return {
|
|
60
|
-
x: rect.x + insets.left,
|
|
61
|
-
y: rect.y + insets.top,
|
|
62
|
-
width,
|
|
63
|
-
height,
|
|
64
|
-
};
|
|
65
|
-
}
|
|
66
|
-
|
|
67
58
|
/**
|
|
68
59
|
* Where a terminal image surface should draw, re-measured on every lifecycle
|
|
69
60
|
* pass so it follows layout, scrolling and clipping.
|
|
@@ -96,7 +87,7 @@ export function useNativeSurfaceTarget(
|
|
|
96
87
|
let mountTimer: Timer | null = null;
|
|
97
88
|
const previousLifecyclePass = renderable.onLifecyclePass;
|
|
98
89
|
const syncTarget = () => {
|
|
99
|
-
const rect =
|
|
90
|
+
const rect = insetCellRect(getRenderableCellRect(renderable), insets);
|
|
100
91
|
if (!rect || !renderer.resolution || renderer.terminalWidth <= 0 || renderer.terminalHeight <= 0) {
|
|
101
92
|
setTarget((current) => (current === null ? current : null));
|
|
102
93
|
return;
|
|
@@ -110,6 +101,7 @@ export function useNativeSurfaceTarget(
|
|
|
110
101
|
pixelWidth: size.pixelWidth,
|
|
111
102
|
pixelHeight: size.pixelHeight,
|
|
112
103
|
bitmapKey: `${sourceKey}:${size.pixelWidth}x${size.pixelHeight}`,
|
|
104
|
+
anchor: { renderable, insets },
|
|
113
105
|
};
|
|
114
106
|
setTarget((current) => (sameTarget(current, nextTarget) ? current : nextTarget));
|
|
115
107
|
};
|
|
@@ -170,6 +162,7 @@ export function useNativeSurface(
|
|
|
170
162
|
visibleRect: target.visibleRect,
|
|
171
163
|
bitmap,
|
|
172
164
|
bitmapKey: target.bitmapKey,
|
|
165
|
+
anchor: target.anchor,
|
|
173
166
|
});
|
|
174
167
|
renderer.requestRender();
|
|
175
168
|
}, [bitmap, nativeSurfaceManager, paneId, renderer, surfaceId, target]);
|
|
@@ -9,6 +9,7 @@ import { AppDialogBridge } from "../../app/dialog-bridge";
|
|
|
9
9
|
import { OpenTuiDialogHostProvider } from "./dialog-host";
|
|
10
10
|
import { OpenTuiInputHostProvider } from "./input-host";
|
|
11
11
|
import { provideKittyServices } from "./kitty-services";
|
|
12
|
+
import { createFrameHits } from "./frame-hits";
|
|
12
13
|
import { captureRendererFrame } from "./frame-capture";
|
|
13
14
|
import { openTuiToastHost } from "./toast-host";
|
|
14
15
|
import { openTuiUiHost } from "./ui-host";
|
|
@@ -90,6 +91,8 @@ function createTestNativeRendererHost(renderer: any): NativeRendererHost {
|
|
|
90
91
|
}
|
|
91
92
|
// What a feedback report and Ask Gloom read from the screen, as the app's host gives it.
|
|
92
93
|
if (typeof renderer.captureFrame !== "function") renderer.captureFrame = () => captureRendererFrame(renderer);
|
|
94
|
+
// What covers a kitty image, as the app's host reads it.
|
|
95
|
+
if (!renderer.frameHits) renderer.frameHits = createFrameHits(renderer);
|
|
93
96
|
return provideKittyServices(renderer as NativeRendererHost);
|
|
94
97
|
}
|
|
95
98
|
|
|
@@ -376,6 +376,28 @@ export function useUpdatePaneSettings(paneId?: string) {
|
|
|
376
376
|
}, [scopedPaneId, updateLayout]);
|
|
377
377
|
}
|
|
378
378
|
|
|
379
|
+
/**
|
|
380
|
+
* Rewrites one setting of a pane that may be absent (a table drawn outside a
|
|
381
|
+
* pane): `update` gets its value and returns the next one, `undefined` to
|
|
382
|
+
* remove it, or the same value to leave the layout alone.
|
|
383
|
+
*/
|
|
384
|
+
export function useOptionalPaneSettingUpdater(paneId: string | null, key: string) {
|
|
385
|
+
const updateLayout = useUpdatePaneLayout();
|
|
386
|
+
return useCallback((update: (value: unknown) => unknown) => {
|
|
387
|
+
if (!paneId) return;
|
|
388
|
+
updateLayout((layout) => {
|
|
389
|
+
const pane = findPaneInstance(layout, paneId);
|
|
390
|
+
if (!pane) return layout;
|
|
391
|
+
const current = pane.settings?.[key];
|
|
392
|
+
const next = update(current);
|
|
393
|
+
if (Object.is(next, current)) return layout;
|
|
394
|
+
if (next !== undefined) return setPaneSetting(layout, paneId, key, next);
|
|
395
|
+
const { [key]: _removed, ...rest } = pane.settings ?? {};
|
|
396
|
+
return setPaneSettings(layout, paneId, Object.keys(rest).length > 0 ? rest : undefined);
|
|
397
|
+
});
|
|
398
|
+
}, [key, paneId, updateLayout]);
|
|
399
|
+
}
|
|
400
|
+
|
|
379
401
|
function useScopedPaneId(paneId?: string): string {
|
|
380
402
|
const contextId = useOptionalPaneInstanceId();
|
|
381
403
|
const id = paneId ?? contextId;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Dispatch } from "react";
|
|
2
|
-
import type
|
|
2
|
+
import { appReducer, type AppAction, type AppContextStoreValue, type AppState } from "../state/app/context";
|
|
3
3
|
|
|
4
4
|
const ignoreAction: Dispatch<AppAction> = () => {};
|
|
5
5
|
const noUnsubscribe = () => {};
|
|
@@ -19,3 +19,26 @@ export function createStaticAppStore(
|
|
|
19
19
|
subscribe: () => noUnsubscribe,
|
|
20
20
|
};
|
|
21
21
|
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* An `AppContext` value that runs the app's reducer on every dispatch and
|
|
25
|
+
* notifies its subscribers, for a suite that checks what the app's own
|
|
26
|
+
* actions did to the state (a pane setting written, a layout saved).
|
|
27
|
+
*/
|
|
28
|
+
export function createReducerAppStore(state: AppState): AppContextStoreValue {
|
|
29
|
+
let current = state;
|
|
30
|
+
const listeners = new Set<() => void>();
|
|
31
|
+
return {
|
|
32
|
+
dispatch: (action) => {
|
|
33
|
+
current = appReducer(current, action);
|
|
34
|
+
for (const listener of listeners) listener();
|
|
35
|
+
},
|
|
36
|
+
getState: () => current,
|
|
37
|
+
subscribe: (listener) => {
|
|
38
|
+
listeners.add(listener);
|
|
39
|
+
return () => {
|
|
40
|
+
listeners.delete(listener);
|
|
41
|
+
};
|
|
42
|
+
},
|
|
43
|
+
};
|
|
44
|
+
}
|
|
@@ -6,7 +6,7 @@ import type { ChartSeriesSpec, ChartSpec, SecuritySeriesSource } from "./types";
|
|
|
6
6
|
import { activeStudyInputSeriesIds } from "./studies/resolve";
|
|
7
7
|
import { withFormulaNextMonths } from "./formula-months";
|
|
8
8
|
import { valuationSeriesUsesLiveQuote } from "./fundamentals";
|
|
9
|
-
import { hasValidQuoteObservationTime } from "../market-data/quotes/freshness";
|
|
9
|
+
import { hasValidQuoteObservationTime, quoteStampBucket } from "../market-data/quotes/freshness";
|
|
10
10
|
import type { InstrumentRef } from "../market-data/request-types";
|
|
11
11
|
import type { QueryEntry } from "../market-data/result-types";
|
|
12
12
|
import { buildQuoteKey, instrumentFromQuoteTarget, resolveEntryData } from "../market-data/selectors";
|
|
@@ -105,19 +105,13 @@ function isNewerQuote(next: Quote, current: Quote | undefined): boolean {
|
|
|
105
105
|
&& (next.stale === true) !== (current.stale === true));
|
|
106
106
|
}
|
|
107
107
|
|
|
108
|
-
/** Every chart bar boundary, intraday or calendar, is a whole minute. */
|
|
109
|
-
const QUOTE_TIME_BUCKET_MS = 60_000;
|
|
110
|
-
|
|
111
|
-
function quoteTimeBucket(quote: Quote): number {
|
|
112
|
-
return Number.isFinite(quote.lastUpdated) ? Math.floor(quote.lastUpdated / QUOTE_TIME_BUCKET_MS) : Number.NaN;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
108
|
function hasResolutionRelevantChange(next: Quote, current: Quote | undefined): boolean {
|
|
116
109
|
if (!current) return true;
|
|
117
110
|
// Bid/ask updates restamp a quote many times a second without moving its
|
|
118
111
|
// price or volume. The stamp alone matters only when it crosses into
|
|
119
112
|
// another minute, where it can open a bar at the same price.
|
|
120
|
-
|
|
113
|
+
// Every chart bar boundary, intraday or calendar, is a whole minute (quoteStampBucket).
|
|
114
|
+
return !Object.is(quoteStampBucket(next), quoteStampBucket(current))
|
|
121
115
|
|| next.price !== current.price
|
|
122
116
|
|| next.volume !== current.volume
|
|
123
117
|
|| next.stale !== current.stale
|
package/src/ui/host.tsx
CHANGED
|
@@ -167,6 +167,8 @@ interface ScrollBarRenderable {
|
|
|
167
167
|
visible: boolean;
|
|
168
168
|
/** Terminal only: whether a click on the bar moves the keyboard focus to it. */
|
|
169
169
|
focusable?: boolean;
|
|
170
|
+
/** Terminal only: shows the bar again while the content overflows, after `visible` was set. */
|
|
171
|
+
resetVisibilityControl?(): void;
|
|
170
172
|
on?(event: "change", handler: () => void): void;
|
|
171
173
|
off?(event: "change", handler: () => void): void;
|
|
172
174
|
}
|
|
@@ -267,6 +269,20 @@ export interface NativePaneImage {
|
|
|
267
269
|
cells?: { cols: number; rows: number; cells: NativeFrameCell[] };
|
|
268
270
|
}
|
|
269
271
|
|
|
272
|
+
/**
|
|
273
|
+
* What the frame on screen drew on top, cell by cell: kitty images are drawn
|
|
274
|
+
* out of band, so the terminal image layer reads this to keep each image under
|
|
275
|
+
* whatever covers it.
|
|
276
|
+
*/
|
|
277
|
+
export interface NativeFrameHits {
|
|
278
|
+
/** The renderable drawn last at a cell of the frame on screen, or null. */
|
|
279
|
+
at(x: number, y: number): unknown;
|
|
280
|
+
/** Whether a renderable fills its cells (a background), rather than only grouping or writing over others. */
|
|
281
|
+
paints(renderable: unknown): boolean;
|
|
282
|
+
/** Whether a renderable is still in the tree the terminal draws. */
|
|
283
|
+
attached(renderable: unknown): boolean;
|
|
284
|
+
}
|
|
285
|
+
|
|
270
286
|
/** The last frame the terminal renderer drew, as styled rows. */
|
|
271
287
|
export interface NativeFrameCapture {
|
|
272
288
|
cols: number;
|
|
@@ -304,6 +320,8 @@ export interface NativeRendererHost {
|
|
|
304
320
|
removePostProcessFn?(processFn: NativePostProcessFn): void;
|
|
305
321
|
/** Terminal renderers only. Kitty graphics are drawn out of band and come back as blank cells. */
|
|
306
322
|
captureFrame?(): NativeFrameCapture | null;
|
|
323
|
+
/** Terminal renderers only: what each cell of the frame on screen drew on top. */
|
|
324
|
+
frameHits?: NativeFrameHits;
|
|
307
325
|
/**
|
|
308
326
|
* Terminal renderers only: a PNG of a rectangle of the frame shown now, in
|
|
309
327
|
* cells, its characters drawn in a bundled font and its kitty images put back.
|
package/src/ui/pointer-drag.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
if (!renderable) return;
|
|
1
|
+
function setCapture(renderer: unknown, renderable: unknown): void {
|
|
3
2
|
const hostCapture = (renderer as { captureMouseRenderable?: (target: unknown) => void }).captureMouseRenderable;
|
|
4
3
|
if (typeof hostCapture === "function") {
|
|
5
4
|
hostCapture.call(renderer, renderable);
|
|
@@ -10,3 +9,13 @@ export function capturePointerDrag(renderer: unknown, renderable: unknown): void
|
|
|
10
9
|
capture.call(renderer, renderable);
|
|
11
10
|
}
|
|
12
11
|
}
|
|
12
|
+
|
|
13
|
+
export function capturePointerDrag(renderer: unknown, renderable: unknown): void {
|
|
14
|
+
if (!renderable) return;
|
|
15
|
+
setCapture(renderer, renderable);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/** Ends a capture whose release never came (the button let go outside the window), so the next press goes where it lands. */
|
|
19
|
+
export function releasePointerDrag(renderer: unknown): void {
|
|
20
|
+
setCapture(renderer, undefined);
|
|
21
|
+
}
|
|
@@ -572,11 +572,22 @@ export function trailingEpsSourceNote(
|
|
|
572
572
|
|
|
573
573
|
type PriceEarningsBasis = Pick<Fundamentals, "financialCurrency" | "ttmConversion" | "epsCurrency" | "trailingPEConversion">;
|
|
574
574
|
|
|
575
|
-
/** The
|
|
576
|
-
|
|
575
|
+
/** The minor units a quote can be priced in, as Gloom Cloud reads them: pence, South African cents and agorot. */
|
|
576
|
+
const MINOR_QUOTE_UNITS = new Set(["GBp", "GBX", "ZAc", "ZAC", "ILA"]);
|
|
577
|
+
|
|
578
|
+
/**
|
|
579
|
+
* The trailing EPS in the price's currency and unit: converted at the rate the served P/E used when it says so, a
|
|
580
|
+
* rate into the major unit, so a price in pence, South African cents or agorot takes it a hundredfold (30,000 ILA
|
|
581
|
+
* over 2.50 USD at 3.7037 ILS is 32.4, not 3,240).
|
|
582
|
+
*/
|
|
583
|
+
export function priceEarningsEps(
|
|
584
|
+
fundamentals: Pick<Fundamentals, "eps" | "trailingPEConversion"> | undefined,
|
|
585
|
+
quoteCurrency?: string | null,
|
|
586
|
+
): number | undefined {
|
|
577
587
|
const eps = fundamentals?.eps;
|
|
578
588
|
const rate = fundamentals?.trailingPEConversion?.rate;
|
|
579
|
-
|
|
589
|
+
if (typeof eps !== "number" || typeof rate !== "number" || !Number.isFinite(rate) || !(rate > 0)) return eps;
|
|
590
|
+
return eps * rate * (MINOR_QUOTE_UNITS.has(quoteCurrency?.trim() ?? "") ? 100 : 1);
|
|
580
591
|
}
|
|
581
592
|
|
|
582
593
|
/**
|