@primuslabs/fund-js-sdk 0.1.23 → 0.1.25
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 +4 -3
- package/dist/index.mjs +4 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -261,7 +261,7 @@ var Contract = class {
|
|
|
261
261
|
if (isNoPendingWithdrawals) {
|
|
262
262
|
return reject("no pending withdrawals");
|
|
263
263
|
}
|
|
264
|
-
const insufficientBalanceErrStrArr = ["insufficient balance", "INSUFFICIENT_FUNDS", "The caller does not have enough funds for value transfer."];
|
|
264
|
+
const insufficientBalanceErrStrArr = ["insufficient balance", "INSUFFICIENT_FUNDS", "The caller does not have enough funds for value transfer.", "insufficient lamports", "Attempt to debit an account but found no record of a prior credit"];
|
|
265
265
|
const isInsufficientBalance = hasErrorFlagFn(curErrorStrArr, insufficientBalanceErrStrArr);
|
|
266
266
|
if (isInsufficientBalance) {
|
|
267
267
|
return reject("insufficient balance");
|
|
@@ -6206,8 +6206,9 @@ var ZktlsSdk = class {
|
|
|
6206
6206
|
platformDevice = "ios";
|
|
6207
6207
|
}
|
|
6208
6208
|
console.log("init appId", appId, platformDevice);
|
|
6209
|
-
const
|
|
6210
|
-
const
|
|
6209
|
+
const walletNameArr = ["metamask", "phantom", "solflare", "backpack", "okx"];
|
|
6210
|
+
const uaInWalletApp = walletNameArr.some((i) => navigator.userAgent.toLowerCase().includes(i));
|
|
6211
|
+
const openAndroidApp = platformDevice === "android" && uaInWalletApp;
|
|
6211
6212
|
console.log("openAndroidApp", openAndroidApp);
|
|
6212
6213
|
const extensionVersion = await this.zkTlsSdk.init(
|
|
6213
6214
|
appId,
|
package/dist/index.mjs
CHANGED
|
@@ -227,7 +227,7 @@ var Contract = class {
|
|
|
227
227
|
if (isNoPendingWithdrawals) {
|
|
228
228
|
return reject("no pending withdrawals");
|
|
229
229
|
}
|
|
230
|
-
const insufficientBalanceErrStrArr = ["insufficient balance", "INSUFFICIENT_FUNDS", "The caller does not have enough funds for value transfer."];
|
|
230
|
+
const insufficientBalanceErrStrArr = ["insufficient balance", "INSUFFICIENT_FUNDS", "The caller does not have enough funds for value transfer.", "insufficient lamports", "Attempt to debit an account but found no record of a prior credit"];
|
|
231
231
|
const isInsufficientBalance = hasErrorFlagFn(curErrorStrArr, insufficientBalanceErrStrArr);
|
|
232
232
|
if (isInsufficientBalance) {
|
|
233
233
|
return reject("insufficient balance");
|
|
@@ -6179,8 +6179,9 @@ var ZktlsSdk = class {
|
|
|
6179
6179
|
platformDevice = "ios";
|
|
6180
6180
|
}
|
|
6181
6181
|
console.log("init appId", appId, platformDevice);
|
|
6182
|
-
const
|
|
6183
|
-
const
|
|
6182
|
+
const walletNameArr = ["metamask", "phantom", "solflare", "backpack", "okx"];
|
|
6183
|
+
const uaInWalletApp = walletNameArr.some((i) => navigator.userAgent.toLowerCase().includes(i));
|
|
6184
|
+
const openAndroidApp = platformDevice === "android" && uaInWalletApp;
|
|
6184
6185
|
console.log("openAndroidApp", openAndroidApp);
|
|
6185
6186
|
const extensionVersion = await this.zkTlsSdk.init(
|
|
6186
6187
|
appId,
|