@blocklet/ui-react 2.8.18 → 2.8.20

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.
@@ -8,6 +8,10 @@ export const useWalletHiddenTopbar = () => {
8
8
  useEffect(() => {
9
9
  if (browser.wallet) {
10
10
  import('dsbridge').then(dsbridge => {
11
+ if (!dsbridge.call) {
12
+ // eslint-disable-next-line no-param-reassign
13
+ dsbridge = dsbridge.default;
14
+ }
11
15
  dsbridge.call('arcHideTopBar', '{}');
12
16
  }).catch(err => {
13
17
  console.error('load dsbridge error', err);
@@ -16,6 +16,10 @@ const useWalletHiddenTopbar = () => {
16
16
  (0, _react.useEffect)(() => {
17
17
  if (browser.wallet) {
18
18
  Promise.resolve().then(() => _interopRequireWildcard(require('dsbridge'))).then(dsbridge => {
19
+ if (!dsbridge.call) {
20
+ // eslint-disable-next-line no-param-reassign
21
+ dsbridge = dsbridge.default;
22
+ }
19
23
  dsbridge.call('arcHideTopBar', '{}');
20
24
  }).catch(err => {
21
25
  console.error('load dsbridge error', err);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blocklet/ui-react",
3
- "version": "2.8.18",
3
+ "version": "2.8.20",
4
4
  "description": "Some useful front-end web components that can be used in Blocklets.",
5
5
  "keywords": [
6
6
  "react",
@@ -61,8 +61,8 @@
61
61
  }
62
62
  },
63
63
  "dependencies": {
64
- "@arcblock/did-connect": "^2.8.18",
65
- "@arcblock/ux": "^2.8.18",
64
+ "@arcblock/did-connect": "^2.8.20",
65
+ "@arcblock/ux": "^2.8.20",
66
66
  "@emotion/react": "^11.10.4",
67
67
  "@emotion/styled": "^11.10.4",
68
68
  "@mui/material": "^5.14.8",
@@ -85,5 +85,5 @@
85
85
  "glob": "^10.3.3",
86
86
  "jest": "^28.1.3"
87
87
  },
88
- "gitHead": "850b2abccbe574066e6cdd012052fb91808a80d2"
88
+ "gitHead": "3e08f2c4f31f4bc26d2bf6d2efe62042f46ecd5b"
89
89
  }
@@ -9,6 +9,10 @@ export const useWalletHiddenTopbar = () => {
9
9
  if (browser.wallet) {
10
10
  import('dsbridge')
11
11
  .then((dsbridge) => {
12
+ if (!dsbridge.call) {
13
+ // eslint-disable-next-line no-param-reassign
14
+ dsbridge = dsbridge.default;
15
+ }
12
16
  dsbridge.call('arcHideTopBar', '{}');
13
17
  })
14
18
  .catch((err) => {