@haven-fi/solauto-sdk 1.0.129 → 1.0.130
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/transactions/transactionsManager.js +1 -1
- package/dist/utils/generalUtils.d.ts +1 -1
- package/dist/utils/generalUtils.d.ts.map +1 -1
- package/dist/utils/generalUtils.js +1 -1
- package/package.json +1 -1
- package/src/transactions/transactionsManager.ts +1 -1
- package/src/utils/generalUtils.ts +3 -3
@@ -217,7 +217,7 @@ class TransactionsManager {
|
|
217
217
|
this.txHandler.log("Chores before: ", choresBefore.getInstructions().length);
|
218
218
|
}
|
219
219
|
if (choresAfter.getInstructions().length > 0) {
|
220
|
-
const chore = new TransactionItem(async () => ({ tx: choresAfter }), "
|
220
|
+
const chore = new TransactionItem(async () => ({ tx: choresAfter }), "close temp accounts");
|
221
221
|
await chore.initialize();
|
222
222
|
items.push(chore);
|
223
223
|
this.txHandler.log("Chores after: ", choresAfter.getInstructions().length);
|
@@ -7,7 +7,7 @@ export declare function getSolanaAccountCreated(umi: Umi, pk: PublicKey): Promis
|
|
7
7
|
export declare function rpcAccountCreated(account: MaybeRpcAccount): boolean;
|
8
8
|
export declare function arraysAreEqual(arrayA: number[], arrayB: number[]): boolean;
|
9
9
|
export declare function fetchTokenPrices(mints: PublicKey[]): Promise<number[]>;
|
10
|
-
export declare function safeGetPrice(mint: PublicKey | UmiPublicKey): number | undefined;
|
10
|
+
export declare function safeGetPrice(mint: PublicKey | UmiPublicKey | undefined): number | undefined;
|
11
11
|
export type ErrorsToThrow = Array<new (...args: any[]) => Error>;
|
12
12
|
export declare function retryWithExponentialBackoff<T>(fn: (attemptNum: number) => Promise<T>, retries?: number, delay?: number, errorsToThrow?: ErrorsToThrow): Promise<T>;
|
13
13
|
//# sourceMappingURL=generalUtils.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"generalUtils.d.ts","sourceRoot":"","sources":["../../src/utils/generalUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB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AAE,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAU1E;AAED,wBAAsB,gBAAgB,CAAC,KAAK,EAAE,SAAS,EAAE,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CA+C5E;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,SAAS,GAAG,YAAY,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAK3F;AAED,MAAM,MAAM,aAAa,GAAG,KAAK,CAAC,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,KAAK,CAAC,CAAC;AAEjE,wBAAgB,2BAA2B,CAAC,CAAC,EAC3C,EAAE,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC,CAAC,CAAC,EACtC,OAAO,GAAE,MAAU,EACnB,KAAK,GAAE,MAAY,EACnB,aAAa,CAAC,EAAE,aAAa,GAC5B,OAAO,CAAC,CAAC,CAAC,CA8BZ"}
|
@@ -81,7 +81,7 @@ async function fetchTokenPrices(mints) {
|
|
81
81
|
return prices;
|
82
82
|
}
|
83
83
|
function safeGetPrice(mint) {
|
84
|
-
if (mint
|
84
|
+
if (mint && mint?.toString() in solautoConstants_1.PRICES) {
|
85
85
|
return solautoConstants_1.PRICES[mint.toString()].price;
|
86
86
|
}
|
87
87
|
return undefined;
|
package/package.json
CHANGED
@@ -331,7 +331,7 @@ export class TransactionsManager {
|
|
331
331
|
if (choresAfter.getInstructions().length > 0) {
|
332
332
|
const chore = new TransactionItem(
|
333
333
|
async () => ({ tx: choresAfter }),
|
334
|
-
"
|
334
|
+
"close temp accounts"
|
335
335
|
);
|
336
336
|
await chore.initialize();
|
337
337
|
items.push(chore);
|
@@ -94,9 +94,9 @@ export async function fetchTokenPrices(mints: PublicKey[]): Promise<number[]> {
|
|
94
94
|
return prices;
|
95
95
|
}
|
96
96
|
|
97
|
-
export function safeGetPrice(mint: PublicKey | UmiPublicKey): number | undefined {
|
98
|
-
if (mint
|
99
|
-
return PRICES[mint
|
97
|
+
export function safeGetPrice(mint: PublicKey | UmiPublicKey | undefined): number | undefined {
|
98
|
+
if (mint && mint?.toString() in PRICES) {
|
99
|
+
return PRICES[mint!.toString()].price;
|
100
100
|
}
|
101
101
|
return undefined;
|
102
102
|
}
|