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