@arcblock/ux 2.6.5 → 2.6.6
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.
@@ -246,7 +246,7 @@ function SessionManager(_ref) {
|
|
246
246
|
user,
|
247
247
|
provider
|
248
248
|
} = session;
|
249
|
-
if (provider
|
249
|
+
if (!isRawWalletAccount && provider !== 'federated') {
|
250
250
|
switchOAuthPassport(user);
|
251
251
|
} else {
|
252
252
|
setUserOpen(false);
|
@@ -257,11 +257,9 @@ function SessionManager(_ref) {
|
|
257
257
|
}
|
258
258
|
}
|
259
259
|
function _onBindWallet() {
|
260
|
-
const {
|
261
|
-
provider
|
262
|
-
} = session;
|
263
260
|
setUserOpen(false);
|
264
|
-
|
261
|
+
// FIXME: @zhanghan 暂时切换回 isRawWalletAccount 的方式来判断,在 did-connect 改版时,简化这里的关系判断
|
262
|
+
if (!isRawWalletAccount) {
|
265
263
|
session.bindWallet(function () {
|
266
264
|
setUserOpen(false);
|
267
265
|
onBindWallet(...arguments);
|
@@ -412,7 +410,7 @@ function SessionManager(_ref) {
|
|
412
410
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_SvgIcon.default, {
|
413
411
|
component: _Link2.default,
|
414
412
|
className: "session-manager-menu-icon"
|
415
|
-
}),
|
413
|
+
}), !isRawWalletAccount ? "".concat(translation.bind, "DID Wallet") : "".concat(translation.bind).concat(translation.thirdParty)]
|
416
414
|
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_MenuItem.default, {
|
417
415
|
className: "session-manager-menu-item",
|
418
416
|
onClick: _onLogout,
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@arcblock/ux",
|
3
|
-
"version": "2.6.
|
3
|
+
"version": "2.6.6",
|
4
4
|
"description": "Common used react components for arcblock products",
|
5
5
|
"keywords": [
|
6
6
|
"react",
|
@@ -47,11 +47,11 @@
|
|
47
47
|
"peerDependencies": {
|
48
48
|
"react": ">=18.1.0"
|
49
49
|
},
|
50
|
-
"gitHead": "
|
50
|
+
"gitHead": "88c400a42296362b453d58766cbf2ae1ca2a1ee3",
|
51
51
|
"dependencies": {
|
52
52
|
"@arcblock/did-motif": "^1.1.13",
|
53
|
-
"@arcblock/icons": "^2.6.
|
54
|
-
"@arcblock/react-hooks": "^2.6.
|
53
|
+
"@arcblock/icons": "^2.6.6",
|
54
|
+
"@arcblock/react-hooks": "^2.6.6",
|
55
55
|
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
|
56
56
|
"@emotion/react": "^11.10.4",
|
57
57
|
"@emotion/styled": "^11.10.4",
|
@@ -199,7 +199,7 @@ function SessionManager({
|
|
199
199
|
}
|
200
200
|
function _onSwitchPassport() {
|
201
201
|
const { user, provider } = session;
|
202
|
-
if (provider
|
202
|
+
if (!isRawWalletAccount && provider !== 'federated') {
|
203
203
|
switchOAuthPassport(user);
|
204
204
|
} else {
|
205
205
|
setUserOpen(false);
|
@@ -211,9 +211,9 @@ function SessionManager({
|
|
211
211
|
}
|
212
212
|
|
213
213
|
function _onBindWallet() {
|
214
|
-
const { provider } = session;
|
215
214
|
setUserOpen(false);
|
216
|
-
|
215
|
+
// FIXME: @zhanghan 暂时切换回 isRawWalletAccount 的方式来判断,在 did-connect 改版时,简化这里的关系判断
|
216
|
+
if (!isRawWalletAccount) {
|
217
217
|
session.bindWallet((...args) => {
|
218
218
|
setUserOpen(false);
|
219
219
|
onBindWallet(...args);
|
@@ -347,9 +347,7 @@ function SessionManager({
|
|
347
347
|
onClick={_onBindWallet}
|
348
348
|
data-cy="sessionManager-bind-trigger">
|
349
349
|
<SvgIcon component={BindWalletIcon} className="session-manager-menu-icon" />
|
350
|
-
{
|
351
|
-
? `${translation.bind}DID Wallet`
|
352
|
-
: `${translation.bind}${translation.thirdParty}`}
|
350
|
+
{!isRawWalletAccount ? `${translation.bind}DID Wallet` : `${translation.bind}${translation.thirdParty}`}
|
353
351
|
</MenuItem>
|
354
352
|
)}
|
355
353
|
|