@primuslabs/fund-js-sdk 0.1.13 → 0.1.14

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/index.js CHANGED
@@ -199,9 +199,7 @@ var Contract = class {
199
199
  try {
200
200
  console.log("sendTransaction params:", functionName, ...functionParams);
201
201
  const tx = await this.contractInstance[functionName](...functionParams);
202
- const txreceipt = await tx.wait();
203
- console.log("txreceipt", txreceipt);
204
- resolve(txreceipt);
202
+ resolve(tx.hash);
205
203
  } catch (error) {
206
204
  console.log("sendTransaction error:", error);
207
205
  const errStr = error?.message || error?.toString()?.toLowerCase() || "";
@@ -217,7 +215,7 @@ var Contract = class {
217
215
  if (isNoPendingWithdrawals) {
218
216
  return reject("no pending withdrawals");
219
217
  }
220
- const insufficientBalanceErrStrArr = ["insufficient balance", "INSUFFICIENT_FUNDS"];
218
+ const insufficientBalanceErrStrArr = ["insufficient balance", "INSUFFICIENT_FUNDS", "The caller does not have enough funds for value transfer."];
221
219
  const isInsufficientBalance = hasErrorFlagFn(curErrorStrArr, insufficientBalanceErrStrArr);
222
220
  if (isInsufficientBalance) {
223
221
  return reject("insufficient balance");
package/dist/index.mjs CHANGED
@@ -175,9 +175,7 @@ var Contract = class {
175
175
  try {
176
176
  console.log("sendTransaction params:", functionName, ...functionParams);
177
177
  const tx = await this.contractInstance[functionName](...functionParams);
178
- const txreceipt = await tx.wait();
179
- console.log("txreceipt", txreceipt);
180
- resolve(txreceipt);
178
+ resolve(tx.hash);
181
179
  } catch (error) {
182
180
  console.log("sendTransaction error:", error);
183
181
  const errStr = error?.message || error?.toString()?.toLowerCase() || "";
@@ -193,7 +191,7 @@ var Contract = class {
193
191
  if (isNoPendingWithdrawals) {
194
192
  return reject("no pending withdrawals");
195
193
  }
196
- const insufficientBalanceErrStrArr = ["insufficient balance", "INSUFFICIENT_FUNDS"];
194
+ const insufficientBalanceErrStrArr = ["insufficient balance", "INSUFFICIENT_FUNDS", "The caller does not have enough funds for value transfer."];
197
195
  const isInsufficientBalance = hasErrorFlagFn(curErrorStrArr, insufficientBalanceErrStrArr);
198
196
  if (isInsufficientBalance) {
199
197
  return reject("insufficient balance");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@primuslabs/fund-js-sdk",
3
- "version": "0.1.13",
3
+ "version": "0.1.14",
4
4
  "author": "Primus Labs <dev@primuslabs.org>",
5
5
  "description": "Primus fund js sdk",
6
6
  "repository": {