@suilend/sui-fe 3.0.4 → 3.0.6
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/lib/transactions.js +3 -3
- package/package.json +1 -1
package/lib/transactions.js
CHANGED
|
@@ -122,14 +122,14 @@ export const getSpendableCoin = (suiGrpcClient_1, address_1, coinType_1, value_1
|
|
|
122
122
|
}
|
|
123
123
|
const objectCoinSpend = objectCoinBalance >= spendValue ? spendValue : objectCoinBalance;
|
|
124
124
|
const addressBalanceSpend = spendValue - objectCoinSpend;
|
|
125
|
-
console.log(`[getSpendableCoin] ${coinType} requested=${value} coinObjects=${objectCoinSpend.toString()} addressBalance=${addressBalanceSpend.toString()}`);
|
|
126
125
|
// Address balance only.
|
|
127
126
|
if (objectCoinSpend === BigInt(0)) {
|
|
128
|
-
|
|
127
|
+
const [coin] = transaction.moveCall({
|
|
129
128
|
target: "0x2::coin::redeem_funds",
|
|
130
129
|
typeArguments: [coinType],
|
|
131
130
|
arguments: [transaction.withdrawal({ amount: value, type: coinType })],
|
|
132
131
|
});
|
|
132
|
+
return coin;
|
|
133
133
|
}
|
|
134
134
|
let coinSource;
|
|
135
135
|
if (mergeCoins) {
|
|
@@ -152,7 +152,7 @@ export const getSpendableCoin = (suiGrpcClient_1, address_1, coinType_1, value_1
|
|
|
152
152
|
const [objectCoin] = transaction.splitCoins(coinSource, [
|
|
153
153
|
objectCoinSpend.toString(),
|
|
154
154
|
]);
|
|
155
|
-
const addressCoin = transaction.moveCall({
|
|
155
|
+
const [addressCoin] = transaction.moveCall({
|
|
156
156
|
target: "0x2::coin::redeem_funds",
|
|
157
157
|
typeArguments: [coinType],
|
|
158
158
|
arguments: [
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@suilend/sui-fe","version":"3.0.
|
|
1
|
+
{"name":"@suilend/sui-fe","version":"3.0.6","private":false,"description":"A collection of TypeScript frontend libraries","author":"Suilend","license":"MIT","main":"./index.js","exports":{".":"./index.js","./lib/constants":"./lib/constants.js","./lib/transactions":"./lib/transactions.js","./lib/format":"./lib/format.js","./lib/ledger":"./lib/ledger.js","./lib/coinMetadata":"./lib/coinMetadata.js","./lib":"./lib/index.js","./lib/indexedDB":"./lib/indexedDB.js","./lib/coinType":"./lib/coinType.js","./lib/coin":"./lib/coin.js","./lib/msafe":"./lib/msafe.js","./lib/keypair":"./lib/keypair.js","./lib/api":"./lib/api.js"},"types":"./index.js","scripts":{"build":"rm -rf ./dist && bun tsc","eslint":"eslint --fix src/","prettier":"prettier --write src/","lint":"bun eslint && bun prettier && bun tsc --noEmit","release":"bun run build && bun ./release.js && cd ./dist && npm publish --access public"},"repository":{"type":"git","url":"git+https://github.com/suilend/sui-fe.git"},"bugs":{"url":"https://github.com/suilend/sui-fe/issues"},"dependencies":{"@mysten/wallet-standard":"0.20.0","bignumber.js":"^9.1.2","blake2b":"^2.1.4","lodash":"^4.17.21","p-limit":"3.1.0"},"devDependencies":{"@tsconfig/recommended":"^1.0.8","@types/blake2b":"^2.1.3","@types/lodash":"^4.17.13","@types/node":"^22.9.0","@typescript-eslint/eslint-plugin":"^8.14.0","@typescript-eslint/parser":"^8.14.0","eslint":"^9.14.0","eslint-config-prettier":"^9.1.0","eslint-plugin-import":"^2.31.0","eslint-plugin-prettier":"^5.2.1","prettier":"^3.3.3","ts-node":"^10.9.2","typescript":"^5.6.3"},"peerDependencies":{"@mysten/sui":"2.17.0"}}
|