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