@trustware/sdk-staging 1.1.8-staging.7 → 1.1.9-staging.1

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.
Files changed (44) hide show
  1. package/README.md +0 -2
  2. package/dist/{blockchain-BONedEsU.d.cts → blockchain-BxAFzp0s.d.cts} +5 -1
  3. package/dist/{blockchain-BONedEsU.d.ts → blockchain-BxAFzp0s.d.ts} +5 -1
  4. package/dist/constants.cjs +1 -1
  5. package/dist/constants.mjs +1 -1
  6. package/dist/{core-DnrIv4h8.d.ts → core-D_jx805U.d.cts} +33 -5
  7. package/dist/{core-BUe031hU.d.cts → core-p_5BLdbE.d.ts} +33 -5
  8. package/dist/core.cjs +549 -80
  9. package/dist/core.cjs.map +1 -1
  10. package/dist/core.d.cts +4 -4
  11. package/dist/core.d.ts +4 -4
  12. package/dist/core.mjs +550 -81
  13. package/dist/core.mjs.map +1 -1
  14. package/dist/{detect-DlbgTrkm.d.cts → detect--pmNlAHv.d.cts} +1 -1
  15. package/dist/{detect-MWKHLhn9.d.ts → detect-qAX6I4JI.d.ts} +1 -1
  16. package/dist/index.cjs +2380 -1674
  17. package/dist/index.cjs.map +1 -1
  18. package/dist/index.d.cts +8 -8
  19. package/dist/index.d.ts +8 -8
  20. package/dist/index.mjs +2090 -1383
  21. package/dist/index.mjs.map +1 -1
  22. package/dist/{manager-aOd3vkF9.d.ts → manager-DFQkemW0.d.ts} +1 -3
  23. package/dist/{manager-DKVW7zeh.d.cts → manager-aMi4_Ss6.d.cts} +1 -3
  24. package/dist/smart-account.cjs +1 -2
  25. package/dist/smart-account.cjs.map +1 -1
  26. package/dist/smart-account.d.cts +24 -24
  27. package/dist/smart-account.d.ts +24 -24
  28. package/dist/smart-account.mjs +1 -2
  29. package/dist/smart-account.mjs.map +1 -1
  30. package/dist/{types-MtdjJgwT.d.ts → types-BJY9r-mz.d.ts} +1 -1
  31. package/dist/{types-B3nKHW6H.d.cts → types-DX3HtFcn.d.cts} +1 -1
  32. package/dist/wallet.cjs +22 -7
  33. package/dist/wallet.cjs.map +1 -1
  34. package/dist/wallet.d.cts +4 -4
  35. package/dist/wallet.d.ts +4 -4
  36. package/dist/wallet.mjs +22 -7
  37. package/dist/wallet.mjs.map +1 -1
  38. package/dist/widget.cjs +2340 -1634
  39. package/dist/widget.cjs.map +1 -1
  40. package/dist/widget.d.cts +2 -2
  41. package/dist/widget.d.ts +2 -2
  42. package/dist/widget.mjs +2050 -1343
  43. package/dist/widget.mjs.map +1 -1
  44. package/package.json +3 -2
@@ -1,4 +1,4 @@
1
- import { C as ChainDef } from './blockchain-BONedEsU.js';
1
+ import { C as ChainDef } from './blockchain-BxAFzp0s.js';
2
2
 
3
3
  interface YourTokenData {
4
4
  chainIconURI: string;
@@ -1,4 +1,4 @@
1
- import { C as ChainDef } from './blockchain-BONedEsU.cjs';
1
+ import { C as ChainDef } from './blockchain-BxAFzp0s.cjs';
2
2
 
3
3
  interface YourTokenData {
4
4
  chainIconURI: string;
package/dist/wallet.cjs CHANGED
@@ -250,7 +250,7 @@ var init_constants = __esm({
250
250
  "src/constants.ts"() {
251
251
  "use strict";
252
252
  SDK_NAME = "@trustware/sdk";
253
- SDK_VERSION = "1.1.8-staging.7";
253
+ SDK_VERSION = "1.1.9-staging.1";
254
254
  API_ROOT = "https://bv-staging-api.trustware.io";
255
255
  API_PREFIX = "/api";
256
256
  WALLETCONNECT_PROJECT_ID = "72ea74c400f5111d43aea638d7d83a24";
@@ -3446,7 +3446,6 @@ function resolveConfig(input) {
3446
3446
  defaultSlippage: normalizeSlippage(
3447
3447
  input.routes.defaultSlippage ?? DEFAULT_SLIPPAGE
3448
3448
  ),
3449
- routeType: input.routes.routeType ?? "swap",
3450
3449
  options: {
3451
3450
  ...input.routes.options
3452
3451
  }
@@ -3911,11 +3910,27 @@ function toSolanaWalletInterface(provider) {
3911
3910
  serializedTransactionBase64
3912
3911
  );
3913
3912
  if (provider.signAndSendTransaction) {
3914
- const result = await provider.signAndSendTransaction(transaction, {
3915
- preflightCommitment: "confirmed"
3916
- });
3917
- if (typeof result === "string") return result;
3918
- if (result?.signature) return result.signature;
3913
+ const MAX_INTERNAL_ERROR_ATTEMPTS = 3;
3914
+ const INTERNAL_ERROR_RETRY_DELAY_MS = 500;
3915
+ for (let attempt = 1; attempt <= MAX_INTERNAL_ERROR_ATTEMPTS; attempt++) {
3916
+ try {
3917
+ const result = await provider.signAndSendTransaction(transaction, {
3918
+ skipPreflight: true
3919
+ });
3920
+ if (typeof result === "string") return result;
3921
+ if (result?.signature) return result.signature;
3922
+ break;
3923
+ } catch (err) {
3924
+ const code = err?.code;
3925
+ if (code === -32603 && attempt < MAX_INTERNAL_ERROR_ATTEMPTS) {
3926
+ await new Promise(
3927
+ (resolve) => setTimeout(resolve, INTERNAL_ERROR_RETRY_DELAY_MS * attempt)
3928
+ );
3929
+ continue;
3930
+ }
3931
+ throw err;
3932
+ }
3933
+ }
3919
3934
  }
3920
3935
  if (!provider.signTransaction) {
3921
3936
  throw new Error("Connected Solana wallet cannot sign transactions");