@matchain/matchid-sdk-react 0.1.55-alpha.0 → 0.1.55-alpha.1
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/{chunk-N7NX7Q7M.mjs → chunk-LTPXS5PV.mjs} +2 -2
- package/dist/{chunk-36M5ROJI.mjs → chunk-SKA35IYC.mjs} +36 -28
- package/dist/chunk-SKA35IYC.mjs.map +1 -0
- package/dist/components/index.js +35 -27
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +1 -1
- package/dist/hooks/api/index.js.map +1 -1
- package/dist/hooks/api/index.mjs +2 -2
- package/dist/hooks/index.js +35 -27
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/index.mjs +1 -1
- package/dist/{index-Es7yJi7T.d.ts → index-6kXyNEXB.d.ts} +1 -0
- package/dist/{index-MsSYZS38.d.mts → index-CB6ZNvzn.d.mts} +1 -0
- package/dist/index.css +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +35 -27
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/ui/index.d.mts +1 -1
- package/dist/ui/index.d.ts +1 -1
- package/dist/ui/index.js +5 -3
- package/dist/ui/index.js.map +1 -1
- package/dist/ui/index.mjs +1 -1
- package/example/src/pages/Wallet/index.tsx +3 -0
- package/package.json +1 -1
- package/dist/chunk-36M5ROJI.mjs.map +0 -1
- /package/dist/{chunk-N7NX7Q7M.mjs.map → chunk-LTPXS5PV.mjs.map} +0 -0
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
useUserInfo,
|
|
12
12
|
verifyPohApi,
|
|
13
13
|
wallet_exports
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-SKA35IYC.mjs";
|
|
15
15
|
import {
|
|
16
16
|
__export
|
|
17
17
|
} from "./chunk-J5LGTIGS.mjs";
|
|
@@ -94,4 +94,4 @@ export {
|
|
|
94
94
|
user_exports,
|
|
95
95
|
api_exports
|
|
96
96
|
};
|
|
97
|
-
//# sourceMappingURL=chunk-
|
|
97
|
+
//# sourceMappingURL=chunk-LTPXS5PV.mjs.map
|
|
@@ -1063,7 +1063,8 @@ function HashPanel({
|
|
|
1063
1063
|
chain,
|
|
1064
1064
|
isOpen,
|
|
1065
1065
|
onClose,
|
|
1066
|
-
zIndex
|
|
1066
|
+
zIndex,
|
|
1067
|
+
error
|
|
1067
1068
|
}) {
|
|
1068
1069
|
const [status, setStatus] = useState5("confirm");
|
|
1069
1070
|
const statusMaps = {
|
|
@@ -1088,7 +1089,7 @@ function HashPanel({
|
|
|
1088
1089
|
color: "#F14141"
|
|
1089
1090
|
}
|
|
1090
1091
|
};
|
|
1091
|
-
const statusValue = statusMaps[status];
|
|
1092
|
+
const statusValue = error ? statusMaps.fail : statusMaps[status];
|
|
1092
1093
|
const [shouldRefetch, setShouldRefetch] = useState5(true);
|
|
1093
1094
|
useEffect6(() => {
|
|
1094
1095
|
if (hash) {
|
|
@@ -1142,7 +1143,8 @@ function HashPanel({
|
|
|
1142
1143
|
hash && /* @__PURE__ */ jsxs6("div", { className: "matchid-hashpanel-hash", children: [
|
|
1143
1144
|
"Hash:",
|
|
1144
1145
|
/* @__PURE__ */ jsx9("a", { href: link, target: "_blank", children: hash })
|
|
1145
|
-
] })
|
|
1146
|
+
] }),
|
|
1147
|
+
error && /* @__PURE__ */ jsx9("div", { className: "matchid-hashpanel-text", children: error })
|
|
1146
1148
|
] }),
|
|
1147
1149
|
/* @__PURE__ */ jsx9(Button, { onClick: onClose, size: "lg", block: true, children: "Back" })
|
|
1148
1150
|
] })
|
|
@@ -1544,34 +1546,40 @@ function useWallet() {
|
|
|
1544
1546
|
prepareTransactionRequest
|
|
1545
1547
|
}
|
|
1546
1548
|
});
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
info: {
|
|
1554
|
-
from: evmAccount.address,
|
|
1555
|
-
to: restTransaction.to,
|
|
1556
|
-
value: (restTransaction.value || 0).toString(),
|
|
1557
|
-
input: restTransaction.data,
|
|
1558
|
-
timestamp: Math.floor(Date.now() / 1e3).toString(),
|
|
1549
|
+
try {
|
|
1550
|
+
const txHash = await obj.sendRawTransaction({
|
|
1551
|
+
serializedTransaction
|
|
1552
|
+
});
|
|
1553
|
+
addTransaction({
|
|
1554
|
+
chainId,
|
|
1559
1555
|
hash: txHash,
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1556
|
+
info: {
|
|
1557
|
+
from: evmAccount.address,
|
|
1558
|
+
to: restTransaction.to,
|
|
1559
|
+
value: (restTransaction.value || 0).toString(),
|
|
1560
|
+
input: restTransaction.data,
|
|
1561
|
+
timestamp: Math.floor(Date.now() / 1e3).toString(),
|
|
1562
|
+
hash: txHash,
|
|
1563
|
+
source: "local"
|
|
1564
|
+
},
|
|
1565
|
+
address: evmAccount.address
|
|
1566
|
+
});
|
|
1567
|
+
modal.show((props) => {
|
|
1568
|
+
return /* @__PURE__ */ jsx17(HashPanel_default, { isOpen: true, onClose: props.close, zIndex: props.zIndex, hash: txHash, chain: _chain });
|
|
1569
|
+
});
|
|
1570
|
+
return txHash;
|
|
1571
|
+
} catch (error) {
|
|
1572
|
+
modal.show((props) => {
|
|
1573
|
+
return /* @__PURE__ */ jsx17(HashPanel_default, { isOpen: true, onClose: props.close, zIndex: props.zIndex, error: typeof error == "string" ? error : error.details || error.message, chain: _chain });
|
|
1574
|
+
});
|
|
1575
|
+
throw error;
|
|
1576
|
+
}
|
|
1570
1577
|
} catch (error) {
|
|
1571
|
-
console.error("
|
|
1578
|
+
console.error("matchid-send-error", error);
|
|
1579
|
+
throw error;
|
|
1580
|
+
} finally {
|
|
1572
1581
|
clearInterval(window.matchProvider.transactionMessageIntervalMap[transactionId].interval);
|
|
1573
1582
|
delete window.matchProvider.transactionMessageIntervalMap[transactionId];
|
|
1574
|
-
throw error;
|
|
1575
1583
|
}
|
|
1576
1584
|
};
|
|
1577
1585
|
const deployContract = async (parameters2) => {
|
|
@@ -7577,4 +7585,4 @@ export {
|
|
|
7577
7585
|
MatchProvider,
|
|
7578
7586
|
useMatch
|
|
7579
7587
|
};
|
|
7580
|
-
//# sourceMappingURL=chunk-
|
|
7588
|
+
//# sourceMappingURL=chunk-SKA35IYC.mjs.map
|