@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/index.js
CHANGED
|
@@ -2133,7 +2133,7 @@ var SuilendAdapter = class {
|
|
|
2133
2133
|
const deposited = dep ? dep.ctokenAmount * ratio / 10 ** reserve.mintDecimals : 0;
|
|
2134
2134
|
const effectiveAmount = Math.min(amount, deposited);
|
|
2135
2135
|
if (effectiveAmount <= 0) throw new T2000Error("NO_COLLATERAL", `Nothing to withdraw for ${assetInfo.displayName} on Suilend`);
|
|
2136
|
-
const
|
|
2136
|
+
const rawAmount = Math.floor(effectiveAmount * 10 ** reserve.mintDecimals);
|
|
2137
2137
|
const tx = new Transaction();
|
|
2138
2138
|
tx.setSender(address);
|
|
2139
2139
|
const [ctokens] = tx.moveCall({
|
|
@@ -2144,7 +2144,7 @@ var SuilendAdapter = class {
|
|
|
2144
2144
|
tx.pure.u64(reserve.arrayIndex),
|
|
2145
2145
|
tx.object(caps[0].id),
|
|
2146
2146
|
tx.object(CLOCK2),
|
|
2147
|
-
tx.pure.u64(
|
|
2147
|
+
tx.pure.u64(rawAmount)
|
|
2148
2148
|
]
|
|
2149
2149
|
});
|
|
2150
2150
|
const exemptionType = `${SUILEND_PACKAGE}::lending_market::RateLimiterExemption<${LENDING_MARKET_TYPE}, ${assetInfo.type}>`;
|
|
@@ -2180,7 +2180,7 @@ var SuilendAdapter = class {
|
|
|
2180
2180
|
const deposited = dep ? dep.ctokenAmount * ratio / 10 ** reserve.mintDecimals : 0;
|
|
2181
2181
|
const effectiveAmount = Math.min(amount, deposited);
|
|
2182
2182
|
if (effectiveAmount <= 0) throw new T2000Error("NO_COLLATERAL", `Nothing to withdraw for ${assetInfo.displayName} on Suilend`);
|
|
2183
|
-
const
|
|
2183
|
+
const rawAmount = Math.floor(effectiveAmount * 10 ** reserve.mintDecimals);
|
|
2184
2184
|
const [ctokens] = tx.moveCall({
|
|
2185
2185
|
target: `${pkg}::lending_market::withdraw_ctokens`,
|
|
2186
2186
|
typeArguments: [LENDING_MARKET_TYPE, assetInfo.type],
|
|
@@ -2189,7 +2189,7 @@ var SuilendAdapter = class {
|
|
|
2189
2189
|
tx.pure.u64(reserve.arrayIndex),
|
|
2190
2190
|
tx.object(caps[0].id),
|
|
2191
2191
|
tx.object(CLOCK2),
|
|
2192
|
-
tx.pure.u64(
|
|
2192
|
+
tx.pure.u64(rawAmount)
|
|
2193
2193
|
]
|
|
2194
2194
|
});
|
|
2195
2195
|
const exemptionType = `${SUILEND_PACKAGE}::lending_market::RateLimiterExemption<${LENDING_MARKET_TYPE}, ${assetInfo.type}>`;
|