@haven-fi/solauto-sdk 1.0.723 → 1.0.724
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.
@@ -37,7 +37,7 @@ async function getPositionExBulk(umi, publicKeys) {
|
|
37
37
|
}
|
38
38
|
async function getOrCreatePositionEx(umi, authority, positionId, programId, customArgs, contextUpdates) {
|
39
39
|
const publicKey = (0, utils_1.getSolautoPositionAccount)(authority, positionId, programId);
|
40
|
-
const data = await (0, generated_1.safeFetchSolautoPosition)(umi, (0, umi_web3js_adapters_1.fromWeb3JsPublicKey)(publicKey));
|
40
|
+
const data = await (0, utils_1.retryWithExponentialBackoff)(async () => await (0, generated_1.safeFetchSolautoPosition)(umi, (0, umi_web3js_adapters_1.fromWeb3JsPublicKey)(publicKey)));
|
41
41
|
const lendingPlatform = data
|
42
42
|
? data.position.lendingPlatform
|
43
43
|
: customArgs.lendingPlatform;
|
package/package.json
CHANGED
@@ -84,9 +84,9 @@ export async function getOrCreatePositionEx(
|
|
84
84
|
contextUpdates?: ContextUpdates
|
85
85
|
): Promise<SolautoPositionEx> {
|
86
86
|
const publicKey = getSolautoPositionAccount(authority, positionId, programId);
|
87
|
-
const data = await
|
88
|
-
|
89
|
-
|
87
|
+
const data = await retryWithExponentialBackoff(
|
88
|
+
async () =>
|
89
|
+
await safeFetchSolautoPosition(umi, fromWeb3JsPublicKey(publicKey))
|
90
90
|
);
|
91
91
|
|
92
92
|
const lendingPlatform = data
|