@t2000/sdk 0.16.15 → 0.16.16
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/adapters/index.cjs +4 -4
- package/dist/adapters/index.cjs.map +1 -1
- package/dist/adapters/index.js +4 -4
- package/dist/adapters/index.js.map +1 -1
- package/dist/index.cjs +4 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/adapters/index.js
CHANGED
|
@@ -1492,7 +1492,7 @@ var SuilendAdapter = class {
|
|
|
1492
1492
|
const deposited = dep ? dep.ctokenAmount * ratio / 10 ** reserve.mintDecimals : 0;
|
|
1493
1493
|
const effectiveAmount = Math.min(amount, deposited);
|
|
1494
1494
|
if (effectiveAmount <= 0) throw new T2000Error("NO_COLLATERAL", `Nothing to withdraw for ${assetInfo.displayName} on Suilend`);
|
|
1495
|
-
const
|
|
1495
|
+
const rawAmount = Math.floor(effectiveAmount * 10 ** reserve.mintDecimals);
|
|
1496
1496
|
const tx = new Transaction();
|
|
1497
1497
|
tx.setSender(address);
|
|
1498
1498
|
const [ctokens] = tx.moveCall({
|
|
@@ -1503,7 +1503,7 @@ var SuilendAdapter = class {
|
|
|
1503
1503
|
tx.pure.u64(reserve.arrayIndex),
|
|
1504
1504
|
tx.object(caps[0].id),
|
|
1505
1505
|
tx.object(CLOCK2),
|
|
1506
|
-
tx.pure.u64(
|
|
1506
|
+
tx.pure.u64(rawAmount)
|
|
1507
1507
|
]
|
|
1508
1508
|
});
|
|
1509
1509
|
const exemptionType = `${SUILEND_PACKAGE}::lending_market::RateLimiterExemption<${LENDING_MARKET_TYPE}, ${assetInfo.type}>`;
|
|
@@ -1539,7 +1539,7 @@ var SuilendAdapter = class {
|
|
|
1539
1539
|
const deposited = dep ? dep.ctokenAmount * ratio / 10 ** reserve.mintDecimals : 0;
|
|
1540
1540
|
const effectiveAmount = Math.min(amount, deposited);
|
|
1541
1541
|
if (effectiveAmount <= 0) throw new T2000Error("NO_COLLATERAL", `Nothing to withdraw for ${assetInfo.displayName} on Suilend`);
|
|
1542
|
-
const
|
|
1542
|
+
const rawAmount = Math.floor(effectiveAmount * 10 ** reserve.mintDecimals);
|
|
1543
1543
|
const [ctokens] = tx.moveCall({
|
|
1544
1544
|
target: `${pkg}::lending_market::withdraw_ctokens`,
|
|
1545
1545
|
typeArguments: [LENDING_MARKET_TYPE, assetInfo.type],
|
|
@@ -1548,7 +1548,7 @@ var SuilendAdapter = class {
|
|
|
1548
1548
|
tx.pure.u64(reserve.arrayIndex),
|
|
1549
1549
|
tx.object(caps[0].id),
|
|
1550
1550
|
tx.object(CLOCK2),
|
|
1551
|
-
tx.pure.u64(
|
|
1551
|
+
tx.pure.u64(rawAmount)
|
|
1552
1552
|
]
|
|
1553
1553
|
});
|
|
1554
1554
|
const exemptionType = `${SUILEND_PACKAGE}::lending_market::RateLimiterExemption<${LENDING_MARKET_TYPE}, ${assetInfo.type}>`;
|