@streamflow/distributor 6.0.0-alpha.6 → 6.0.0-alpha.8

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.
@@ -140,7 +140,7 @@ var SolanaDistributorClient = /** @class */ (function () {
140
140
  case 5:
141
141
  ixs.push((0, instructions_1.newDistributor)(args, accounts, this.programId));
142
142
  ixs.push((0, spl_token_1.createTransferCheckedInstruction)(senderTokens, mint, tokenVault, invoker.publicKey, BigInt(data.maxTotalClaim.toString()), mintAccount.decimals));
143
- return [4 /*yield*/, (0, solana_1.prepareTransaction)(this.connection, ixs, invoker.publicKey, this.getCommitment())];
143
+ return [4 /*yield*/, (0, solana_1.prepareTransaction)(this.connection, ixs, invoker.publicKey)];
144
144
  case 6:
145
145
  _g = _h.sent(), tx = _g.tx, hash = _g.hash;
146
146
  return [4 /*yield*/, (0, utils_1.wrappedSignAndExecuteTransaction)(this.connection, invoker, tx, hash)];
@@ -204,8 +204,10 @@ var SolanaDistributorClient = /** @class */ (function () {
204
204
  };
205
205
  ixs.push((0, instructions_1.newClaim)(args, accounts, this.programId));
206
206
  }
207
- ixs.push((0, instructions_1.claimLocked)(accounts, this.programId));
208
- return [4 /*yield*/, (0, solana_1.prepareTransaction)(this.connection, ixs, invoker.publicKey, this.getCommitment())];
207
+ if (data.amountLocked.gtn(0)) {
208
+ ixs.push((0, instructions_1.claimLocked)(accounts, this.programId));
209
+ }
210
+ return [4 /*yield*/, (0, solana_1.prepareTransaction)(this.connection, ixs, invoker.publicKey)];
209
211
  case 5:
210
212
  _f = _g.sent(), tx = _f.tx, hash = _f.hash;
211
213
  return [4 /*yield*/, (0, utils_1.wrappedSignAndExecuteTransaction)(this.connection, invoker, tx, hash)];
@@ -250,7 +252,7 @@ var SolanaDistributorClient = /** @class */ (function () {
250
252
  tokenProgram: spl_token_1.TOKEN_PROGRAM_ID,
251
253
  };
252
254
  ixs.push((0, instructions_1.clawback)(accounts, this.programId));
253
- return [4 /*yield*/, (0, solana_1.prepareTransaction)(this.connection, ixs, invoker.publicKey, this.getCommitment())];
255
+ return [4 /*yield*/, (0, solana_1.prepareTransaction)(this.connection, ixs, invoker.publicKey)];
254
256
  case 3:
255
257
  _f = _g.sent(), tx = _f.tx, hash = _f.hash;
256
258
  return [4 /*yield*/, (0, utils_1.wrappedSignAndExecuteTransaction)(this.connection, invoker, tx, hash)];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@streamflow/distributor",
3
- "version": "6.0.0-alpha.6",
3
+ "version": "6.0.0-alpha.8",
4
4
  "description": "JavaScript SDK to interact with Streamflow Airdrop protocol.",
5
5
  "homepage": "https://github.com/streamflow-finance/js-sdk/",
6
6
  "main": "dist/index.js",
@@ -22,9 +22,9 @@
22
22
  "lint": "eslint --fix .",
23
23
  "prepublishOnly": "npm run lint && npm run build"
24
24
  },
25
- "gitHead": "b58e61246a5597202680e6f965284fbbc2968b74",
25
+ "gitHead": "1daaf0af241b2cc9b72a15022f461ee641e591f9",
26
26
  "devDependencies": {
27
- "@streamflow/eslint-config": "6.0.0-alpha.6",
27
+ "@streamflow/eslint-config": "6.0.0-alpha.8",
28
28
  "@types/bn.js": "5.1.1",
29
29
  "@types/jest": "29.2.4",
30
30
  "date-fns": "2.28.0",
@@ -38,7 +38,7 @@
38
38
  "@solana/spl-token": "0.3.6",
39
39
  "@solana/wallet-adapter-base": "0.9.19",
40
40
  "@solana/web3.js": "1.70.1",
41
- "@streamflow/common": "6.0.0-alpha.6",
41
+ "@streamflow/common": "6.0.0-alpha.8",
42
42
  "bn.js": "5.2.1",
43
43
  "borsh": "^2.0.0",
44
44
  "bs58": "5.0.0"