@web3auth/no-modal 10.8.2 → 10.9.0

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.
@@ -128,7 +128,7 @@ const getAaAnalyticsProperties = accountAbstractionConfig => {
128
128
  };
129
129
  };
130
130
  const getWalletServicesAnalyticsProperties = walletServicesConfig => {
131
- var _walletServicesConfig, _walletServicesConfig2, _walletServicesConfig3, _walletServicesConfig4, _walletServicesConfig5, _walletServicesConfig6, _walletServicesConfig7, _walletServicesConfig8, _walletServicesConfig9, _walletServicesConfig0, _walletServicesConfig1;
131
+ var _walletServicesConfig, _walletServicesConfig2, _walletServicesConfig3, _walletServicesConfig4, _walletServicesConfig5, _walletServicesConfig6, _walletServicesConfig7, _walletServicesConfig8, _walletServicesConfig9, _walletServicesConfig0, _walletServicesConfig1, _walletServicesConfig10;
132
132
  return {
133
133
  ws_confirmation_strategy: walletServicesConfig === null || walletServicesConfig === void 0 ? void 0 : walletServicesConfig.confirmationStrategy,
134
134
  ws_enable_key_export: walletServicesConfig === null || walletServicesConfig === void 0 ? void 0 : walletServicesConfig.enableKeyExport,
@@ -142,10 +142,11 @@ const getWalletServicesAnalyticsProperties = walletServicesConfig => {
142
142
  ws_hide_swap: walletServicesConfig === null || walletServicesConfig === void 0 || (_walletServicesConfig8 = walletServicesConfig.whiteLabel) === null || _walletServicesConfig8 === void 0 ? void 0 : _walletServicesConfig8.hideSwap,
143
143
  ws_hide_show_all_tokens: walletServicesConfig === null || walletServicesConfig === void 0 || (_walletServicesConfig9 = walletServicesConfig.whiteLabel) === null || _walletServicesConfig9 === void 0 ? void 0 : _walletServicesConfig9.hideShowAllTokens,
144
144
  ws_hide_wallet_connect: walletServicesConfig === null || walletServicesConfig === void 0 || (_walletServicesConfig0 = walletServicesConfig.whiteLabel) === null || _walletServicesConfig0 === void 0 ? void 0 : _walletServicesConfig0.hideWalletConnect,
145
- ws_default_portfolio: walletServicesConfig === null || walletServicesConfig === void 0 || (_walletServicesConfig1 = walletServicesConfig.whiteLabel) === null || _walletServicesConfig1 === void 0 ? void 0 : _walletServicesConfig1.defaultPortfolio
145
+ ws_hide_defi_positions_display: walletServicesConfig === null || walletServicesConfig === void 0 || (_walletServicesConfig1 = walletServicesConfig.whiteLabel) === null || _walletServicesConfig1 === void 0 ? void 0 : _walletServicesConfig1.hideDefiPositionsDisplay,
146
+ ws_default_portfolio: walletServicesConfig === null || walletServicesConfig === void 0 || (_walletServicesConfig10 = walletServicesConfig.whiteLabel) === null || _walletServicesConfig10 === void 0 ? void 0 : _walletServicesConfig10.defaultPortfolio
146
147
  };
147
148
  };
148
- const sdkVersion = "10.8.2";
149
+ const sdkVersion = "10.9.0";
149
150
  const getErrorAnalyticsProperties = error => {
150
151
  try {
151
152
  const code = error instanceof index.Web3AuthError ? error.code : error === null || error === void 0 ? void 0 : error.code;
@@ -506,6 +506,7 @@ class Web3AuthNoModal extends auth.SafeEventEmitter {
506
506
  enableReceiveButton = true,
507
507
  enableShowAllTokensButton = true,
508
508
  enableConfirmationModal = false,
509
+ enableDefiPositionsDisplay = true,
509
510
  portfolioWidgetPosition = baseControllers.BUTTON_POSITION.BOTTOM_LEFT,
510
511
  defaultPortfolio = "token"
511
512
  } = walletUi || {};
@@ -519,6 +520,7 @@ class Web3AuthNoModal extends auth.SafeEventEmitter {
519
520
  hideSwap: !enableSwapButton,
520
521
  hideShowAllTokens: !enableShowAllTokensButton,
521
522
  hideWalletConnect: !enableWalletConnect,
523
+ hideDefiPositionsDisplay: !enableDefiPositionsDisplay,
522
524
  buttonPosition: portfolioWidgetPosition,
523
525
  defaultPortfolio
524
526
  };
@@ -45,8 +45,9 @@ export interface WalletUiConfig {
45
45
  enableSendButton?: boolean;
46
46
  enableSwapButton?: boolean;
47
47
  enableReceiveButton?: boolean;
48
+ enableDefiPositionsDisplay?: boolean;
48
49
  portfolioWidgetPosition?: BUTTON_POSITION_TYPE;
49
- defaultPortfolio?: "token" | "nft";
50
+ defaultPortfolio?: "token" | "nft" | "defi";
50
51
  }
51
52
  export type ModalSignInMethodType = (typeof MODAL_SIGN_IN_METHODS)[keyof typeof MODAL_SIGN_IN_METHODS];
52
53
  export type WidgetType = (typeof WIDGET_TYPE)[keyof typeof WIDGET_TYPE];
@@ -56,7 +56,8 @@ export declare const getWalletServicesAnalyticsProperties: (walletServicesConfig
56
56
  ws_hide_swap: boolean;
57
57
  ws_hide_show_all_tokens: boolean;
58
58
  ws_hide_wallet_connect: boolean;
59
- ws_default_portfolio: "token" | "nft";
59
+ ws_hide_defi_positions_display: boolean;
60
+ ws_default_portfolio: "token" | "nft" | "defi";
60
61
  };
61
62
  export declare const sdkVersion: string;
62
63
  export declare const getErrorAnalyticsProperties: (error: unknown) => {
@@ -128,7 +128,7 @@ const getAaAnalyticsProperties = accountAbstractionConfig => {
128
128
  };
129
129
  };
130
130
  const getWalletServicesAnalyticsProperties = walletServicesConfig => {
131
- var _walletServicesConfig, _walletServicesConfig2, _walletServicesConfig3, _walletServicesConfig4, _walletServicesConfig5, _walletServicesConfig6, _walletServicesConfig7, _walletServicesConfig8, _walletServicesConfig9, _walletServicesConfig0, _walletServicesConfig1;
131
+ var _walletServicesConfig, _walletServicesConfig2, _walletServicesConfig3, _walletServicesConfig4, _walletServicesConfig5, _walletServicesConfig6, _walletServicesConfig7, _walletServicesConfig8, _walletServicesConfig9, _walletServicesConfig0, _walletServicesConfig1, _walletServicesConfig10;
132
132
  return {
133
133
  ws_confirmation_strategy: walletServicesConfig === null || walletServicesConfig === void 0 ? void 0 : walletServicesConfig.confirmationStrategy,
134
134
  ws_enable_key_export: walletServicesConfig === null || walletServicesConfig === void 0 ? void 0 : walletServicesConfig.enableKeyExport,
@@ -142,10 +142,11 @@ const getWalletServicesAnalyticsProperties = walletServicesConfig => {
142
142
  ws_hide_swap: walletServicesConfig === null || walletServicesConfig === void 0 || (_walletServicesConfig8 = walletServicesConfig.whiteLabel) === null || _walletServicesConfig8 === void 0 ? void 0 : _walletServicesConfig8.hideSwap,
143
143
  ws_hide_show_all_tokens: walletServicesConfig === null || walletServicesConfig === void 0 || (_walletServicesConfig9 = walletServicesConfig.whiteLabel) === null || _walletServicesConfig9 === void 0 ? void 0 : _walletServicesConfig9.hideShowAllTokens,
144
144
  ws_hide_wallet_connect: walletServicesConfig === null || walletServicesConfig === void 0 || (_walletServicesConfig0 = walletServicesConfig.whiteLabel) === null || _walletServicesConfig0 === void 0 ? void 0 : _walletServicesConfig0.hideWalletConnect,
145
- ws_default_portfolio: walletServicesConfig === null || walletServicesConfig === void 0 || (_walletServicesConfig1 = walletServicesConfig.whiteLabel) === null || _walletServicesConfig1 === void 0 ? void 0 : _walletServicesConfig1.defaultPortfolio
145
+ ws_hide_defi_positions_display: walletServicesConfig === null || walletServicesConfig === void 0 || (_walletServicesConfig1 = walletServicesConfig.whiteLabel) === null || _walletServicesConfig1 === void 0 ? void 0 : _walletServicesConfig1.hideDefiPositionsDisplay,
146
+ ws_default_portfolio: walletServicesConfig === null || walletServicesConfig === void 0 || (_walletServicesConfig10 = walletServicesConfig.whiteLabel) === null || _walletServicesConfig10 === void 0 ? void 0 : _walletServicesConfig10.defaultPortfolio
146
147
  };
147
148
  };
148
- const sdkVersion = "10.8.2";
149
+ const sdkVersion = "10.9.0";
149
150
  const getErrorAnalyticsProperties = error => {
150
151
  try {
151
152
  const code = error instanceof Web3AuthError ? error.code : error === null || error === void 0 ? void 0 : error.code;
@@ -515,6 +515,7 @@ class Web3AuthNoModal extends SafeEventEmitter {
515
515
  enableReceiveButton = true,
516
516
  enableShowAllTokensButton = true,
517
517
  enableConfirmationModal = false,
518
+ enableDefiPositionsDisplay = true,
518
519
  portfolioWidgetPosition = BUTTON_POSITION.BOTTOM_LEFT,
519
520
  defaultPortfolio = "token"
520
521
  } = walletUi || {};
@@ -528,6 +529,7 @@ class Web3AuthNoModal extends SafeEventEmitter {
528
529
  hideSwap: !enableSwapButton,
529
530
  hideShowAllTokens: !enableShowAllTokensButton,
530
531
  hideWalletConnect: !enableWalletConnect,
532
+ hideDefiPositionsDisplay: !enableDefiPositionsDisplay,
531
533
  buttonPosition: portfolioWidgetPosition,
532
534
  defaultPortfolio
533
535
  };