Comparing version 0.0.21 to 0.0.22
@@ -119,2 +119,3 @@ const sui = require('@mysten/sui.js'); | ||
const callArgs = []; | ||
for (let param of params) { | ||
@@ -125,2 +126,7 @@ if (param && param.type && param.amount && param.type === 'SUI') { | ||
callArgs.push(coin); | ||
} else if (param && Array.isArray(param) && param.length == 1 && param[0].type && param[0].amount && param[0].type === 'SUI') { | ||
// vector<Coin<SUI>> | ||
let amount = BigInt(param[0].amount); | ||
const coin = tx.add(sui.Transactions.SplitCoins(tx.gas, [tx.pure(amount)])); | ||
callArgs.push(tx.makeMoveVec({ objects: [coin]})); | ||
} else { | ||
@@ -130,2 +136,3 @@ callArgs.push(tx.pure(param)); | ||
} | ||
tx.moveCall({ | ||
@@ -132,0 +139,0 @@ target: `${this._package.address}::${this._moduleName}::${methodName}`, |
{ | ||
"name": "suidouble", | ||
"version": "0.0.21", | ||
"version": "0.0.22", | ||
"description": "Set of provider, package and object classes for javascript representation of Sui Move smart contracts. Use same code for publishing, upgrading, integration testing, interaction with smart contracts and integration in browser web3 dapps", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
179560
2549