@matchain/matchid-sdk-react 0.1.55-alpha.0 → 0.1.55-alpha.2
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-BQERJULN.mjs} +2 -2
- package/dist/{chunk-36M5ROJI.mjs → chunk-WZQ56L5F.mjs} +41 -33
- package/dist/chunk-WZQ56L5F.mjs.map +1 -0
- package/dist/components/index.js +36 -28
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +2 -2
- package/dist/hooks/api/index.js.map +1 -1
- package/dist/hooks/api/index.mjs +3 -3
- package/dist/hooks/index.js +35 -27
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/index.mjs +2 -2
- 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 +3 -4
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +36 -28
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -7
- 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 +2 -2
- 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-BQERJULN.mjs.map} +0 -0
package/dist/hooks/api/index.mjs
CHANGED
|
@@ -2,15 +2,15 @@ import {
|
|
|
2
2
|
bind_exports,
|
|
3
3
|
poh_exports,
|
|
4
4
|
user_exports
|
|
5
|
-
} from "../../chunk-
|
|
5
|
+
} from "../../chunk-BQERJULN.mjs";
|
|
6
6
|
import {
|
|
7
7
|
isSuccess,
|
|
8
8
|
wallet_exports
|
|
9
|
-
} from "../../chunk-
|
|
9
|
+
} from "../../chunk-WZQ56L5F.mjs";
|
|
10
|
+
import "../../chunk-JX73EY6V.mjs";
|
|
10
11
|
import "../../chunk-UA6XHZHX.mjs";
|
|
11
12
|
import "../../chunk-IZOOVZAD.mjs";
|
|
12
13
|
import "../../chunk-FKXS2XRG.mjs";
|
|
13
|
-
import "../../chunk-JX73EY6V.mjs";
|
|
14
14
|
import "../../chunk-J5LGTIGS.mjs";
|
|
15
15
|
export {
|
|
16
16
|
bind_exports as bind,
|
package/dist/hooks/index.js
CHANGED
|
@@ -1111,7 +1111,8 @@ function HashPanel({
|
|
|
1111
1111
|
chain,
|
|
1112
1112
|
isOpen,
|
|
1113
1113
|
onClose,
|
|
1114
|
-
zIndex
|
|
1114
|
+
zIndex,
|
|
1115
|
+
error
|
|
1115
1116
|
}) {
|
|
1116
1117
|
const [status, setStatus] = (0, import_react13.useState)("confirm");
|
|
1117
1118
|
const statusMaps = {
|
|
@@ -1136,7 +1137,7 @@ function HashPanel({
|
|
|
1136
1137
|
color: "#F14141"
|
|
1137
1138
|
}
|
|
1138
1139
|
};
|
|
1139
|
-
const statusValue = statusMaps[status];
|
|
1140
|
+
const statusValue = error ? statusMaps.fail : statusMaps[status];
|
|
1140
1141
|
const [shouldRefetch, setShouldRefetch] = (0, import_react13.useState)(true);
|
|
1141
1142
|
(0, import_react13.useEffect)(() => {
|
|
1142
1143
|
if (hash) {
|
|
@@ -1190,7 +1191,8 @@ function HashPanel({
|
|
|
1190
1191
|
hash && /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("div", { className: "matchid-hashpanel-hash", children: [
|
|
1191
1192
|
"Hash:",
|
|
1192
1193
|
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)("a", { href: link, target: "_blank", children: hash })
|
|
1193
|
-
] })
|
|
1194
|
+
] }),
|
|
1195
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("div", { className: "matchid-hashpanel-text", children: error })
|
|
1194
1196
|
] }),
|
|
1195
1197
|
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)(Button, { onClick: onClose, size: "lg", block: true, children: "Back" })
|
|
1196
1198
|
] })
|
|
@@ -2398,34 +2400,40 @@ function useWallet() {
|
|
|
2398
2400
|
prepareTransactionRequest
|
|
2399
2401
|
}
|
|
2400
2402
|
});
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
info: {
|
|
2408
|
-
from: evmAccount.address,
|
|
2409
|
-
to: restTransaction.to,
|
|
2410
|
-
value: (restTransaction.value || 0).toString(),
|
|
2411
|
-
input: restTransaction.data,
|
|
2412
|
-
timestamp: Math.floor(Date.now() / 1e3).toString(),
|
|
2403
|
+
try {
|
|
2404
|
+
const txHash = await obj.sendRawTransaction({
|
|
2405
|
+
serializedTransaction
|
|
2406
|
+
});
|
|
2407
|
+
addTransaction({
|
|
2408
|
+
chainId,
|
|
2413
2409
|
hash: txHash,
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
|
|
2410
|
+
info: {
|
|
2411
|
+
from: evmAccount.address,
|
|
2412
|
+
to: restTransaction.to,
|
|
2413
|
+
value: (restTransaction.value || 0).toString(),
|
|
2414
|
+
input: restTransaction.data,
|
|
2415
|
+
timestamp: Math.floor(Date.now() / 1e3).toString(),
|
|
2416
|
+
hash: txHash,
|
|
2417
|
+
source: "local"
|
|
2418
|
+
},
|
|
2419
|
+
address: evmAccount.address
|
|
2420
|
+
});
|
|
2421
|
+
modal.show((props) => {
|
|
2422
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(HashPanel_default, { isOpen: true, onClose: props.close, zIndex: props.zIndex, hash: txHash, chain: _chain });
|
|
2423
|
+
});
|
|
2424
|
+
return txHash;
|
|
2425
|
+
} catch (error) {
|
|
2426
|
+
modal.show((props) => {
|
|
2427
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(HashPanel_default, { isOpen: true, onClose: props.close, zIndex: props.zIndex, error: typeof error == "string" ? error : error.details || error.message, chain: _chain });
|
|
2428
|
+
});
|
|
2429
|
+
throw error;
|
|
2430
|
+
}
|
|
2424
2431
|
} catch (error) {
|
|
2425
|
-
console.error("
|
|
2432
|
+
console.error("matchid-send-error", error);
|
|
2433
|
+
throw error;
|
|
2434
|
+
} finally {
|
|
2426
2435
|
clearInterval(window.matchProvider.transactionMessageIntervalMap[transactionId].interval);
|
|
2427
2436
|
delete window.matchProvider.transactionMessageIntervalMap[transactionId];
|
|
2428
|
-
throw error;
|
|
2429
2437
|
}
|
|
2430
2438
|
};
|
|
2431
2439
|
const deployContract = async (parameters2) => {
|