@ututrust/web-components 1.1.15 → 1.1.16
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 +12 -11
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -33569,7 +33569,7 @@
|
|
|
33569
33569
|
isDark = _useState2[0],
|
|
33570
33570
|
setIsDark = _useState2[1];
|
|
33571
33571
|
|
|
33572
|
-
var _useState3 = l$1(
|
|
33572
|
+
var _useState3 = l$1(""),
|
|
33573
33573
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
33574
33574
|
txError = _useState4[0],
|
|
33575
33575
|
setTxError = _useState4[1];
|
|
@@ -33584,7 +33584,8 @@
|
|
|
33584
33584
|
var _useForm = useForm(),
|
|
33585
33585
|
register = _useForm.register,
|
|
33586
33586
|
errors = _useForm.errors,
|
|
33587
|
-
handleSubmit = _useForm.handleSubmit; // @ts-
|
|
33587
|
+
handleSubmit = _useForm.handleSubmit; // eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
33588
|
+
// @ts-ignore
|
|
33588
33589
|
|
|
33589
33590
|
|
|
33590
33591
|
if (!((_window = window) !== null && _window !== void 0 && _window.ethereum || (_window2 = window) !== null && _window2 !== void 0 && _window2.web3) || !props[ATTR_TARGET_UUID] || !isAddress(props[ATTR_TARGET_UUID])) return null;
|
|
@@ -33596,6 +33597,7 @@
|
|
|
33596
33597
|
while (1) {
|
|
33597
33598
|
switch (_context.prev = _context.next) {
|
|
33598
33599
|
case 0:
|
|
33600
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
33599
33601
|
// @ts-ignore
|
|
33600
33602
|
provider = window.ethereum;
|
|
33601
33603
|
network = String(props[ATTR_ENDORSEMENT_NETWORK]).toLowerCase().trim() || DEFAULT_NETWORK;
|
|
@@ -33647,6 +33649,7 @@
|
|
|
33647
33649
|
return switchNetwork();
|
|
33648
33650
|
|
|
33649
33651
|
case 2:
|
|
33652
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
33650
33653
|
// @ts-ignore
|
|
33651
33654
|
web3Provider = new Web3Provider(window.ethereum);
|
|
33652
33655
|
signer = web3Provider.getSigner(); // Accounts now exposed
|
|
@@ -33698,23 +33701,21 @@
|
|
|
33698
33701
|
return _context3.abrupt("return");
|
|
33699
33702
|
|
|
33700
33703
|
case 3:
|
|
33701
|
-
setTxError(
|
|
33704
|
+
setTxError("");
|
|
33702
33705
|
_context3.prev = 4;
|
|
33703
33706
|
_context3.next = 7;
|
|
33704
33707
|
return sendTransaction(props[ATTR_TARGET_UUID], amount);
|
|
33705
33708
|
|
|
33706
33709
|
case 7:
|
|
33707
|
-
_context3.next =
|
|
33710
|
+
_context3.next = 12;
|
|
33708
33711
|
break;
|
|
33709
33712
|
|
|
33710
33713
|
case 9:
|
|
33711
33714
|
_context3.prev = 9;
|
|
33712
33715
|
_context3.t0 = _context3["catch"](4);
|
|
33713
|
-
// User denied account access...
|
|
33714
|
-
console.log(_context3.t0);
|
|
33715
33716
|
setTxError(_context3.t0.data ? _context3.t0.data.message : _context3.t0.message);
|
|
33716
33717
|
|
|
33717
|
-
case
|
|
33718
|
+
case 12:
|
|
33718
33719
|
case "end":
|
|
33719
33720
|
return _context3.stop();
|
|
33720
33721
|
}
|
|
@@ -33781,15 +33782,15 @@
|
|
|
33781
33782
|
placeholder: "Your endorsement"
|
|
33782
33783
|
}), v$2("div", {
|
|
33783
33784
|
className: "mt-1 error"
|
|
33784
|
-
}, errors.amount && "* ".concat(showError(errors)))
|
|
33785
|
+
}, errors.amount && "* ".concat(showError(errors))), txError && v$2("div", {
|
|
33786
|
+
className: "mt-1 error"
|
|
33787
|
+
}, txError)), v$2("div", null, v$2("button", {
|
|
33785
33788
|
style: {
|
|
33786
33789
|
backgroundColor: props[ATTR_BTN_COLOR] === undefined ? null : "".concat(props[ATTR_BTN_COLOR])
|
|
33787
33790
|
},
|
|
33788
33791
|
className: "endor-btn btn btn-".concat(envCondition),
|
|
33789
33792
|
type: "submit"
|
|
33790
|
-
}, "Endorse")
|
|
33791
|
-
className: "mt-1 error"
|
|
33792
|
-
}, txError)))));
|
|
33793
|
+
}, "Endorse")))));
|
|
33793
33794
|
}
|
|
33794
33795
|
|
|
33795
33796
|
var preact = createCommonjsModule$1(function (module, exports) {
|