@dynamic-labs/sdk-react-core 0.16.20 → 0.16.21
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.
- package/CHANGELOG.md +7 -0
- package/package.cjs +1 -1
- package/package.js +1 -1
- package/package.json +4 -4
- package/src/lib/components/UserProfile/parts/UserProfileSocialAccount/UserProfileSocialAccount.cjs +17 -8
- package/src/lib/components/UserProfile/parts/UserProfileSocialAccount/UserProfileSocialAccount.js +17 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
|
|
2
|
+
### [0.16.21](https://github.com/dynamic-labs/DynamicAuth/compare/v0.16.20...v0.16.21) (2023-06-05)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
* disable button on social unlink ([#2247](https://github.com/dynamic-labs/DynamicAuth/issues/2247)) ([e74a53c](https://github.com/dynamic-labs/DynamicAuth/commit/e74a53c947fdbeca66144b65dc6babdd449c9240))
|
|
8
|
+
|
|
2
9
|
### [0.16.20](https://github.com/dynamic-labs/DynamicAuth/compare/v0.16.19...v0.16.20) (2023-06-02)
|
|
3
10
|
|
|
4
11
|
|
package/package.cjs
CHANGED
package/package.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/sdk-react-core",
|
|
3
|
-
"version": "0.16.
|
|
3
|
+
"version": "0.16.21",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/dynamic-labs/DynamicAuth.git",
|
|
@@ -17,9 +17,9 @@
|
|
|
17
17
|
"formik": "^2.2.9",
|
|
18
18
|
"qrcode": "1.5.1",
|
|
19
19
|
"ethers": "^5.7.2",
|
|
20
|
-
"@dynamic-labs/logger": "0.16.
|
|
21
|
-
"@dynamic-labs/multi-wallet": "0.16.
|
|
22
|
-
"@dynamic-labs/wallet-connector-core": "0.16.
|
|
20
|
+
"@dynamic-labs/logger": "0.16.21",
|
|
21
|
+
"@dynamic-labs/multi-wallet": "0.16.21",
|
|
22
|
+
"@dynamic-labs/wallet-connector-core": "0.16.21"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"semver": "^7.3.8"
|
package/src/lib/components/UserProfile/parts/UserProfileSocialAccount/UserProfileSocialAccount.cjs
CHANGED
|
@@ -8,7 +8,7 @@ var React = require('react');
|
|
|
8
8
|
var iconic = require('@dynamic-labs/iconic');
|
|
9
9
|
var Typography = require('../../../Typography/Typography.cjs');
|
|
10
10
|
require('@dynamic-labs/sdk-api');
|
|
11
|
-
require('../../../../shared/logger.cjs');
|
|
11
|
+
var logger = require('../../../../shared/logger.cjs');
|
|
12
12
|
require('@dynamic-labs/multi-wallet');
|
|
13
13
|
require('../../../../context/ViewContext/ViewContext.cjs');
|
|
14
14
|
var add = require('../../../../shared/assets/add.cjs');
|
|
@@ -71,14 +71,23 @@ const UserProfileSocialAccount = ({ provider, authorizationUrl, verifiedCredenti
|
|
|
71
71
|
};
|
|
72
72
|
const disconnectAccount = () => _tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
73
73
|
var _c;
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
74
|
+
try {
|
|
75
|
+
setLoading(true);
|
|
76
|
+
const jwt = yield api.unlinkOAuth({
|
|
77
|
+
environmentId,
|
|
78
|
+
verifiedCrentialId: (_c = verifiedCredential === null || verifiedCredential === void 0 ? void 0 : verifiedCredential.id) !== null && _c !== void 0 ? _c : '',
|
|
79
|
+
}, String(authToken || onboardingOnlyJwt));
|
|
80
|
+
if (!jwt) {
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
updateUserProfileByJWT(jwt);
|
|
84
|
+
}
|
|
85
|
+
catch (err) {
|
|
86
|
+
logger.logger.error(err);
|
|
87
|
+
}
|
|
88
|
+
finally {
|
|
89
|
+
setLoading(false);
|
|
80
90
|
}
|
|
81
|
-
updateUserProfileByJWT(jwt);
|
|
82
91
|
});
|
|
83
92
|
if (!verifiedCredential && !authorizationUrl) {
|
|
84
93
|
return null;
|
package/src/lib/components/UserProfile/parts/UserProfileSocialAccount/UserProfileSocialAccount.js
CHANGED
|
@@ -4,7 +4,7 @@ import { useState } from 'react';
|
|
|
4
4
|
import { SocialIcon } from '@dynamic-labs/iconic';
|
|
5
5
|
import { Typography } from '../../../Typography/Typography.js';
|
|
6
6
|
import '@dynamic-labs/sdk-api';
|
|
7
|
-
import '../../../../shared/logger.js';
|
|
7
|
+
import { logger } from '../../../../shared/logger.js';
|
|
8
8
|
import '@dynamic-labs/multi-wallet';
|
|
9
9
|
import '../../../../context/ViewContext/ViewContext.js';
|
|
10
10
|
import { ReactComponent as SvgAdd } from '../../../../shared/assets/add.js';
|
|
@@ -67,14 +67,23 @@ const UserProfileSocialAccount = ({ provider, authorizationUrl, verifiedCredenti
|
|
|
67
67
|
};
|
|
68
68
|
const disconnectAccount = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
69
69
|
var _c;
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
70
|
+
try {
|
|
71
|
+
setLoading(true);
|
|
72
|
+
const jwt = yield unlinkOAuth({
|
|
73
|
+
environmentId,
|
|
74
|
+
verifiedCrentialId: (_c = verifiedCredential === null || verifiedCredential === void 0 ? void 0 : verifiedCredential.id) !== null && _c !== void 0 ? _c : '',
|
|
75
|
+
}, String(authToken || onboardingOnlyJwt));
|
|
76
|
+
if (!jwt) {
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
updateUserProfileByJWT(jwt);
|
|
80
|
+
}
|
|
81
|
+
catch (err) {
|
|
82
|
+
logger.error(err);
|
|
83
|
+
}
|
|
84
|
+
finally {
|
|
85
|
+
setLoading(false);
|
|
76
86
|
}
|
|
77
|
-
updateUserProfileByJWT(jwt);
|
|
78
87
|
});
|
|
79
88
|
if (!verifiedCredential && !authorizationUrl) {
|
|
80
89
|
return null;
|