@broxus/evm-connect 1.11.12 → 1.11.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.
@@ -54,7 +54,7 @@ exports.EvmConnector = (0, mobx_react_lite_1.observer)((props) => {
54
54
  const walletService = (0, context_1.useEvmWalletService)();
55
55
  const [, setRecentMeta] = (0, hooks_1.useRecentConnectionMeta)();
56
56
  const drop = React.useRef(null);
57
- const { changeWalletButtonText = intl.formatMessage(intl_1.default.EVM_CONNECT_CHANGE_WALLET_BTN_TEXT), className, connectButtonShape, connectButtonText = intl.formatMessage(intl_1.default.EVM_CONNECT_CONNECT_BTN_TEXT), connectButtonTrigger, connectButtonType, disconnectButtonText = intl.formatMessage(intl_1.default.EVM_CONNECT_DISCONNECT_BTN_TEXT), network, popupType, suffix, showDropMenu = true, showSubIcon = true, standalone = walletService.providers?.length === 1, warnUnsupportedNetwork = true, } = props;
57
+ const { changeWalletButtonText = intl.formatMessage(intl_1.default.EVM_CONNECT_CHANGE_WALLET_BTN_TEXT), className, connectButtonShape, connectButtonText = intl.formatMessage(intl_1.default.EVM_CONNECT_CONNECT_BTN_TEXT), connectButtonTrigger, connectButtonType, disconnectButtonText = intl.formatMessage(intl_1.default.EVM_CONNECT_DISCONNECT_BTN_TEXT), network = walletService.network, popupType, suffix, showDropMenu = true, showSubIcon = true, standalone = walletService.providers?.length === 1, warnUnsupportedNetwork = true, } = props;
58
58
  const changeWallet = () => {
59
59
  drop.current?.close();
60
60
  };
@@ -77,7 +77,7 @@ exports.EvmConnector = (0, mobx_react_lite_1.observer)((props) => {
77
77
  subTitle = React.createElement(react_components_1.Skeleton, { width: 80 });
78
78
  }
79
79
  else if (walletService.isReady) {
80
- subTitle = `${(0, js_utils_1.formattedTokenAmount)(walletService.balance, walletService.currency.decimals)} ${walletService.currency.symbol}`;
80
+ subTitle = `${(0, js_utils_1.formattedTokenAmount)(walletService.balance, network?.currency.decimals ?? walletService.currency.decimals)} ${network?.currency.symbol || walletService.currency.symbol}`;
81
81
  }
82
82
  let networkIcon = React.createElement("div", { className: "evm-connect-connector-icon" }), providerIcon;
83
83
  if (network?.icon) {
@@ -97,8 +97,10 @@ exports.EvmConnector = (0, mobx_react_lite_1.observer)((props) => {
97
97
  React.createElement("div", null,
98
98
  React.createElement(react_components_1.WalletAccount, { address: walletService.address?.toString(), icon: networkIcon, subIcon: !isDisconnected && showSubIcon ? providerIcon : undefined, subTitle: subTitle, title: isDisconnected
99
99
  ? networkName ?? intl.formatMessage(intl_1.default.EVM_CONNECT_CONNECTOR_BLOCKCHAIN_NAME)
100
- : (React.createElement(react_components_1.ExplorerAccountLink, { address: walletService.address?.toString(), baseUrl: walletService.network?.explorer.baseUrl, copyable: true, subPath: walletService.network?.explorer.accountsSubPath, tooltip: intl.formatMessage(intl_1.default.EVM_CONNECT_CONNECTOR_EXPLORER_HINT, {
101
- explorerTitle: walletService.network?.explorer.title ?? '',
100
+ : (React.createElement(react_components_1.ExplorerAccountLink, { address: walletService.address?.toString(), baseUrl: network?.explorer.baseUrl || walletService.network?.explorer.baseUrl, copyable: true,
101
+ /* eslint-disable-next-line max-len */
102
+ subPath: network?.explorer.accountsSubPath || walletService.network?.explorer.accountsSubPath, tooltip: intl.formatMessage(intl_1.default.EVM_CONNECT_CONNECTOR_EXPLORER_HINT, {
103
+ explorerTitle: network?.explorer.title || walletService.network?.explorer.title || '',
102
104
  }) })) })),
103
105
  React.createElement(react_uikit_1.Flex, { alignItems: "center", className: "evm-connect-connector-suffix" },
104
106
  suffix,
@@ -15,7 +15,7 @@ export const EvmConnector = observer((props) => {
15
15
  const walletService = useEvmWalletService();
16
16
  const [, setRecentMeta] = useRecentConnectionMeta();
17
17
  const drop = React.useRef(null);
18
- const { changeWalletButtonText = intl.formatMessage(messages.EVM_CONNECT_CHANGE_WALLET_BTN_TEXT), className, connectButtonShape, connectButtonText = intl.formatMessage(messages.EVM_CONNECT_CONNECT_BTN_TEXT), connectButtonTrigger, connectButtonType, disconnectButtonText = intl.formatMessage(messages.EVM_CONNECT_DISCONNECT_BTN_TEXT), network, popupType, suffix, showDropMenu = true, showSubIcon = true, standalone = walletService.providers?.length === 1, warnUnsupportedNetwork = true, } = props;
18
+ const { changeWalletButtonText = intl.formatMessage(messages.EVM_CONNECT_CHANGE_WALLET_BTN_TEXT), className, connectButtonShape, connectButtonText = intl.formatMessage(messages.EVM_CONNECT_CONNECT_BTN_TEXT), connectButtonTrigger, connectButtonType, disconnectButtonText = intl.formatMessage(messages.EVM_CONNECT_DISCONNECT_BTN_TEXT), network = walletService.network, popupType, suffix, showDropMenu = true, showSubIcon = true, standalone = walletService.providers?.length === 1, warnUnsupportedNetwork = true, } = props;
19
19
  const changeWallet = () => {
20
20
  drop.current?.close();
21
21
  };
@@ -38,7 +38,7 @@ export const EvmConnector = observer((props) => {
38
38
  subTitle = React.createElement(Skeleton, { width: 80 });
39
39
  }
40
40
  else if (walletService.isReady) {
41
- subTitle = `${formattedTokenAmount(walletService.balance, walletService.currency.decimals)} ${walletService.currency.symbol}`;
41
+ subTitle = `${formattedTokenAmount(walletService.balance, network?.currency.decimals ?? walletService.currency.decimals)} ${network?.currency.symbol || walletService.currency.symbol}`;
42
42
  }
43
43
  let networkIcon = React.createElement("div", { className: "evm-connect-connector-icon" }), providerIcon;
44
44
  if (network?.icon) {
@@ -58,8 +58,10 @@ export const EvmConnector = observer((props) => {
58
58
  React.createElement("div", null,
59
59
  React.createElement(WalletAccount, { address: walletService.address?.toString(), icon: networkIcon, subIcon: !isDisconnected && showSubIcon ? providerIcon : undefined, subTitle: subTitle, title: isDisconnected
60
60
  ? networkName ?? intl.formatMessage(messages.EVM_CONNECT_CONNECTOR_BLOCKCHAIN_NAME)
61
- : (React.createElement(ExplorerAccountLink, { address: walletService.address?.toString(), baseUrl: walletService.network?.explorer.baseUrl, copyable: true, subPath: walletService.network?.explorer.accountsSubPath, tooltip: intl.formatMessage(messages.EVM_CONNECT_CONNECTOR_EXPLORER_HINT, {
62
- explorerTitle: walletService.network?.explorer.title ?? '',
61
+ : (React.createElement(ExplorerAccountLink, { address: walletService.address?.toString(), baseUrl: network?.explorer.baseUrl || walletService.network?.explorer.baseUrl, copyable: true,
62
+ /* eslint-disable-next-line max-len */
63
+ subPath: network?.explorer.accountsSubPath || walletService.network?.explorer.accountsSubPath, tooltip: intl.formatMessage(messages.EVM_CONNECT_CONNECTOR_EXPLORER_HINT, {
64
+ explorerTitle: network?.explorer.title || walletService.network?.explorer.title || '',
63
65
  }) })) })),
64
66
  React.createElement(Flex, { alignItems: "center", className: "evm-connect-connector-suffix" },
65
67
  suffix,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@broxus/evm-connect",
3
- "version": "1.11.12",
3
+ "version": "1.11.14",
4
4
  "description": "Ethereum wallets connector.",
5
5
  "license": "MIT",
6
6
  "keywords": [
@@ -76,9 +76,9 @@
76
76
  "prepare": "npx yarn cleanup && npx yarn build"
77
77
  },
78
78
  "dependencies": {
79
- "@broxus/js-core": "^0.30.4",
79
+ "@broxus/js-core": "^0.30.5",
80
80
  "@broxus/js-utils": "^1.3.13",
81
- "@broxus/react-components": "^0.21.10",
81
+ "@broxus/react-components": "^0.21.11",
82
82
  "@broxus/react-uikit": "^0.17.4",
83
83
  "@metamask/detect-provider": "^2.0.0",
84
84
  "@walletconnect/ethereum-provider": "^2.17.2",
@@ -96,5 +96,5 @@
96
96
  "web3-types": "^1.x",
97
97
  "web3-utils": "^4.x"
98
98
  },
99
- "gitHead": "6229efdf10f9974da3fbc0af2d9580bbf3d0ee1b"
99
+ "gitHead": "3353cd7c3ef3cffe3a5e1509f1e9edef83fa3732"
100
100
  }