@ututrust/web-components 2.0.12 → 2.0.13
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/dist/index.js +24 -18
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -38888,7 +38888,7 @@
|
|
|
38888
38888
|
var WalletAddressContext = E$1(wallet.address);
|
|
38889
38889
|
|
|
38890
38890
|
var config = {
|
|
38891
|
-
production:
|
|
38891
|
+
production: false,
|
|
38892
38892
|
feedbackDetailsMaxEndorsements: 5
|
|
38893
38893
|
};
|
|
38894
38894
|
window.addEventListener(EVENT_UTU_CONFIG, function (event) {
|
|
@@ -39053,6 +39053,7 @@
|
|
|
39053
39053
|
}
|
|
39054
39054
|
function _addressSignatureVerification() {
|
|
39055
39055
|
_addressSignatureVerification = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
|
|
39056
|
+
var _window, _window$xUtuConfig;
|
|
39056
39057
|
var overrideApiUrl,
|
|
39057
39058
|
walletProvider,
|
|
39058
39059
|
cookies,
|
|
@@ -39072,40 +39073,50 @@
|
|
|
39072
39073
|
overrideApiUrl = _args.length > 0 && _args[0] !== undefined ? _args[0] : null;
|
|
39073
39074
|
walletProvider = _args.length > 1 && _args[1] !== undefined ? _args[1] : null;
|
|
39074
39075
|
cookies = _args.length > 2 && _args[2] !== undefined ? _args[2] : false;
|
|
39076
|
+
// @ts-ignore.
|
|
39077
|
+
if ((_window = window) !== null && _window !== void 0 && (_window$xUtuConfig = _window.xUtuConfig) !== null && _window$xUtuConfig !== void 0 && _window$xUtuConfig.production) {
|
|
39078
|
+
// @ts-ignore
|
|
39079
|
+
config.production = window.xUtuConfig.production;
|
|
39080
|
+
} else {
|
|
39081
|
+
// @ts-ignore
|
|
39082
|
+
window.xUtuConfig = {};
|
|
39083
|
+
// @ts-ignore
|
|
39084
|
+
xUtuConfig.production = true;
|
|
39085
|
+
}
|
|
39075
39086
|
utuApiBase = overrideApiUrl !== null && overrideApiUrl !== void 0 ? overrideApiUrl : config.production ? UTU_API_BASE_URL_PRODUCTION : UTU_API_BASE_URL_TEST;
|
|
39076
39087
|
_provider = getProvider(); // @ts-ignore
|
|
39077
39088
|
if (!(!_provider && !walletProvider)) {
|
|
39078
|
-
_context.next =
|
|
39089
|
+
_context.next = 8;
|
|
39079
39090
|
break;
|
|
39080
39091
|
}
|
|
39081
39092
|
return _context.abrupt("return", null);
|
|
39082
|
-
case
|
|
39093
|
+
case 8:
|
|
39083
39094
|
// @ts-ignore
|
|
39084
39095
|
provider = new Web3Provider(walletProvider || _provider);
|
|
39085
39096
|
signer = provider.getSigner();
|
|
39086
|
-
_context.next =
|
|
39097
|
+
_context.next = 12;
|
|
39087
39098
|
return signer.getAddress();
|
|
39088
|
-
case
|
|
39099
|
+
case 12:
|
|
39089
39100
|
address = _context.sent;
|
|
39090
|
-
_context.next =
|
|
39101
|
+
_context.next = 15;
|
|
39091
39102
|
return signer.signMessage("Sign in at UTU");
|
|
39092
|
-
case
|
|
39103
|
+
case 15:
|
|
39093
39104
|
signature = _context.sent;
|
|
39094
|
-
_context.next =
|
|
39105
|
+
_context.next = 18;
|
|
39095
39106
|
return axios$1.post("".concat(utuApiBase).concat(API_VERIFY_ADDRESS), {
|
|
39096
39107
|
address: address,
|
|
39097
39108
|
signature: signature
|
|
39098
39109
|
}, {
|
|
39099
39110
|
withCredentials: !!cookies
|
|
39100
39111
|
});
|
|
39101
|
-
case
|
|
39112
|
+
case 18:
|
|
39102
39113
|
_yield$axios$post = _context.sent;
|
|
39103
39114
|
data = _yield$axios$post.data;
|
|
39104
|
-
_context.next =
|
|
39115
|
+
_context.next = 22;
|
|
39105
39116
|
return localStorage.setItem(LOCAL_STORAGE_KEY_UTU_IDENTITY_DATA, JSON.stringify(data));
|
|
39106
|
-
case
|
|
39117
|
+
case 22:
|
|
39107
39118
|
return _context.abrupt("return", data);
|
|
39108
|
-
case
|
|
39119
|
+
case 24:
|
|
39109
39120
|
case "end":
|
|
39110
39121
|
return _context.stop();
|
|
39111
39122
|
}
|
|
@@ -39270,7 +39281,6 @@
|
|
|
39270
39281
|
}, withAuthorizationHeader(accessToken)).then(function (result) {
|
|
39271
39282
|
setSubmitStatus(SubmitStatus.success);
|
|
39272
39283
|
resetSubmitStatusDelayed(setSubmitStatus);
|
|
39273
|
-
console.log(result);
|
|
39274
39284
|
return result;
|
|
39275
39285
|
}).catch(function (error) {
|
|
39276
39286
|
setSubmitStatus(SubmitStatus.error);
|
|
@@ -39411,7 +39421,6 @@
|
|
|
39411
39421
|
},
|
|
39412
39422
|
onSuccess: function onSuccess() {
|
|
39413
39423
|
var publishedVideoUrl = getPublishedVideoUrl(apiUrl, upload.url);
|
|
39414
|
-
console.log("success published video url - ", publishedVideoUrl);
|
|
39415
39424
|
|
|
39416
39425
|
// setTimeout(() => {
|
|
39417
39426
|
// axios.head(publishedVideoUrl).then(() => {
|
|
@@ -40490,7 +40499,7 @@
|
|
|
40490
40499
|
_useState2 = _slicedToArray(_useState, 2),
|
|
40491
40500
|
selectedQualifier = _useState2[0],
|
|
40492
40501
|
setSelectedQualifier = _useState2[1];
|
|
40493
|
-
|
|
40502
|
+
|
|
40494
40503
|
// environments
|
|
40495
40504
|
var _useState3 = p(false),
|
|
40496
40505
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
@@ -46222,7 +46231,6 @@
|
|
|
46222
46231
|
|
|
46223
46232
|
h$1(function () {
|
|
46224
46233
|
console.count("sendFeedbackOnce");
|
|
46225
|
-
console.log("publishedVideoURL - ", readyVideoUrl);
|
|
46226
46234
|
if (readyVideoUrl) {
|
|
46227
46235
|
sendFeedback({
|
|
46228
46236
|
video: readyVideoUrl
|
|
@@ -56450,8 +56458,6 @@
|
|
|
56450
56458
|
image = _ref.image,
|
|
56451
56459
|
showVideo = _ref.showVideo,
|
|
56452
56460
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
56453
|
-
console.log("UserImageVideo", url);
|
|
56454
|
-
|
|
56455
56461
|
// environments
|
|
56456
56462
|
var _useState = p(false),
|
|
56457
56463
|
_useState2 = _slicedToArray(_useState, 2),
|