@gearbox-protocol/sdk 3.0.0-next.202 → 3.0.0-next.203
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.
|
@@ -120,7 +120,7 @@ export declare class CreditAccountData {
|
|
|
120
120
|
setDeleteInProgress(d: boolean): void;
|
|
121
121
|
static sortBalances(balances: Record<string, bigint>, prices: Record<string, bigint>, tokens: Record<string, TokenData>): Array<[string, bigint]>;
|
|
122
122
|
static sortAssets(balances: Array<Asset>, prices: Record<string, bigint>, tokens: Record<string, TokenData>): Asset[];
|
|
123
|
-
static tokensAbcComparator(t1?: TokenData, t2?: TokenData): 1 | -1;
|
|
123
|
+
static tokensAbcComparator(t1?: TokenData, t2?: TokenData): 0 | 1 | -1;
|
|
124
124
|
static amountAbcComparator(t1: bigint, t2: bigint): 1 | -1;
|
|
125
125
|
isForbidden(token: string): boolean;
|
|
126
126
|
isQuoted(token: string): boolean;
|
|
@@ -140,7 +140,11 @@ class CreditAccountData {
|
|
|
140
140
|
static tokensAbcComparator(t1, t2) {
|
|
141
141
|
const { symbol: symbol1 = "" } = t1 || {};
|
|
142
142
|
const { symbol: symbol2 = "" } = t2 || {};
|
|
143
|
-
|
|
143
|
+
const symbol1LC = symbol1.toLowerCase();
|
|
144
|
+
const symbol2LC = symbol2.toLowerCase();
|
|
145
|
+
if (symbol1LC === symbol2LC)
|
|
146
|
+
return 0;
|
|
147
|
+
return symbol1LC > symbol2LC ? 1 : -1;
|
|
144
148
|
}
|
|
145
149
|
static amountAbcComparator(t1, t2) {
|
|
146
150
|
return t1 > t2 ? -1 : 1;
|