@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.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.3", E = {
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 i = typeof o == "object" && o.$kind === "GasCoin";
318
- if (k(a.suiCoinType) === k("0x2::sui::SUI") && i) {
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 c;
324
- return typeof n?.amount < "u" ? c = g(n.amount, e.pure.u64) : c = e.moveCall({
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
- c,
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" && s === "prod" && e.moveCall({
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;