@naviprotocol/lending 1.4.5-beta.3 → 1.4.5-beta.4
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/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +8 -10
- package/dist/index.esm.js.map +1 -1
- package/dist/pool.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -129,7 +129,7 @@ const J = d.bytes(32).transform({
|
|
|
129
129
|
borrow_balance: d.u256(),
|
|
130
130
|
/** User's current supply balance */
|
|
131
131
|
supply_balance: d.u256()
|
|
132
|
-
}), be = "1.4.5-beta.
|
|
132
|
+
}), be = "1.4.5-beta.4", E = {
|
|
133
133
|
version: be
|
|
134
134
|
}, ke = E.version, _e = () => {
|
|
135
135
|
if (typeof process < "u" && process.versions && process.versions.node)
|
|
@@ -309,19 +309,17 @@ async function Be(e, r, o, n) {
|
|
|
309
309
|
const t = await _({
|
|
310
310
|
...n,
|
|
311
311
|
cacheTime: b
|
|
312
|
-
}), a = await S(r, n);
|
|
313
|
-
n?.market;
|
|
314
|
-
const s = n?.env || "prod";
|
|
312
|
+
}), a = await S(r, n), s = n?.market || O, i = n?.env || "prod";
|
|
315
313
|
if (a?.deprecatedAt && Date.now() > a.deprecatedAt)
|
|
316
314
|
throw new Error(`The lending pool for coinType ${a.suiCoinType} has been deprecated.`);
|
|
317
|
-
const
|
|
318
|
-
if (k(a.suiCoinType) === k("0x2::sui::SUI") &&
|
|
315
|
+
const c = typeof o == "object" && o.$kind === "GasCoin";
|
|
316
|
+
if (k(a.suiCoinType) === k("0x2::sui::SUI") && c) {
|
|
319
317
|
if (!n?.amount)
|
|
320
318
|
throw new Error("Amount is required for sui coin");
|
|
321
319
|
o = e.splitCoins(o, [n.amount]);
|
|
322
320
|
}
|
|
323
|
-
let
|
|
324
|
-
return typeof n?.amount < "u" ?
|
|
321
|
+
let u;
|
|
322
|
+
return typeof n?.amount < "u" ? u = g(n.amount, e.pure.u64) : u = e.moveCall({
|
|
325
323
|
target: "0x2::coin::value",
|
|
326
324
|
arguments: [g(o, e.object)],
|
|
327
325
|
typeArguments: [a.suiCoinType]
|
|
@@ -346,12 +344,12 @@ async function Be(e, r, o, n) {
|
|
|
346
344
|
e.object(a.contract.pool),
|
|
347
345
|
e.pure.u8(a.id),
|
|
348
346
|
g(o, e.object),
|
|
349
|
-
|
|
347
|
+
u,
|
|
350
348
|
e.object(t.incentiveV2),
|
|
351
349
|
e.object(t.incentiveV3)
|
|
352
350
|
],
|
|
353
351
|
typeArguments: [a.suiCoinType]
|
|
354
|
-
}), t.version === 2 && a.token.symbol === "SUI" &&
|
|
352
|
+
}), t.version === 2 && a.token.symbol === "SUI" && i === "prod" && s === "main" && e.moveCall({
|
|
355
353
|
target: `${t.package}::pool::refresh_stake`,
|
|
356
354
|
arguments: [e.object(a.contract.pool), e.object("0x05")]
|
|
357
355
|
}), e;
|