@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/index.mjs
CHANGED
|
@@ -13,11 +13,11 @@ import {
|
|
|
13
13
|
useTransaction,
|
|
14
14
|
useUserInfo,
|
|
15
15
|
useWallet
|
|
16
|
-
} from "../chunk-
|
|
16
|
+
} from "../chunk-WZQ56L5F.mjs";
|
|
17
|
+
import "../chunk-JX73EY6V.mjs";
|
|
17
18
|
import "../chunk-UA6XHZHX.mjs";
|
|
18
19
|
import "../chunk-IZOOVZAD.mjs";
|
|
19
20
|
import "../chunk-FKXS2XRG.mjs";
|
|
20
|
-
import "../chunk-JX73EY6V.mjs";
|
|
21
21
|
import "../chunk-J5LGTIGS.mjs";
|
|
22
22
|
export {
|
|
23
23
|
useCopyClipboard,
|
package/dist/index.css
CHANGED
|
@@ -1074,7 +1074,7 @@ body {
|
|
|
1074
1074
|
height: 96px;
|
|
1075
1075
|
}
|
|
1076
1076
|
|
|
1077
|
-
.matchid-hashpanel-hash {
|
|
1077
|
+
.matchid-hashpanel-hash,.matchid-hashpanel-text {
|
|
1078
1078
|
width: 100%;
|
|
1079
1079
|
font-size: 14px;
|
|
1080
1080
|
word-break: break-all;
|
|
@@ -1260,10 +1260,9 @@ body {
|
|
|
1260
1260
|
display: flex;
|
|
1261
1261
|
align-items: center;
|
|
1262
1262
|
box-shadow: var(--matchid-shadow-small);
|
|
1263
|
-
|
|
1264
|
-
padding
|
|
1263
|
+
min-height: 40px;
|
|
1264
|
+
padding: 10px 12px;
|
|
1265
1265
|
gap: 4px;
|
|
1266
|
-
height: 40px;
|
|
1267
1266
|
color: black;
|
|
1268
1267
|
background-color: white;
|
|
1269
1268
|
font-size: 14px;
|
package/dist/index.d.mts
CHANGED
|
@@ -8,7 +8,7 @@ import React, { ReactNode } from 'react';
|
|
|
8
8
|
import { I as IMatchEvents, a as IEnvConfigType, L as LocaleType, W as WalletConfigType } from './types-CXzZS0eM.mjs';
|
|
9
9
|
export { i as Hooks, M as ModalProvider, T as ToastProvider } from './index-CqKohtvj.mjs';
|
|
10
10
|
export { i as Components } from './index-a_Qt7NXk.mjs';
|
|
11
|
-
export { i as UI } from './index-
|
|
11
|
+
export { i as UI } from './index-CB6ZNvzn.mjs';
|
|
12
12
|
export { i as Api } from './index-G15A08DI.mjs';
|
|
13
13
|
export { i as Chains } from './index-DXRGMAbv.mjs';
|
|
14
14
|
export { i as Types } from './index-6-oVBXRP.mjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ import React, { ReactNode } from 'react';
|
|
|
8
8
|
import { I as IMatchEvents, a as IEnvConfigType, L as LocaleType, W as WalletConfigType } from './types-CXzZS0eM.js';
|
|
9
9
|
export { i as Hooks, M as ModalProvider, T as ToastProvider } from './index-CPPDmmz8.js';
|
|
10
10
|
export { i as Components } from './index-CNH7a3bx.js';
|
|
11
|
-
export { i as UI } from './index-
|
|
11
|
+
export { i as UI } from './index-6kXyNEXB.js';
|
|
12
12
|
export { i as Api } from './index-Y5WRoqzn.js';
|
|
13
13
|
export { i as Chains } from './index-DXRGMAbv.js';
|
|
14
14
|
export { i as Types } from './index-CMH6Jesl.js';
|
package/dist/index.js
CHANGED
|
@@ -2809,7 +2809,7 @@ function StepVerify(props) {
|
|
|
2809
2809
|
)
|
|
2810
2810
|
}
|
|
2811
2811
|
) }),
|
|
2812
|
-
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Button, { disabled: !canContinue, highlight: true, block: true, size: "lg", onClick: onContinue, children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_react_intl2.FormattedMessage, { id: "continue" }) })
|
|
2812
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Button, { disabled: !canContinue, loading: submitting, highlight: true, block: true, size: "lg", onClick: onContinue, children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_react_intl2.FormattedMessage, { id: "continue" }) })
|
|
2813
2813
|
] });
|
|
2814
2814
|
}
|
|
2815
2815
|
|
|
@@ -5722,7 +5722,8 @@ function HashPanel({
|
|
|
5722
5722
|
chain,
|
|
5723
5723
|
isOpen,
|
|
5724
5724
|
onClose,
|
|
5725
|
-
zIndex
|
|
5725
|
+
zIndex,
|
|
5726
|
+
error
|
|
5726
5727
|
}) {
|
|
5727
5728
|
const [status, setStatus] = (0, import_react28.useState)("confirm");
|
|
5728
5729
|
const statusMaps = {
|
|
@@ -5747,7 +5748,7 @@ function HashPanel({
|
|
|
5747
5748
|
color: "#F14141"
|
|
5748
5749
|
}
|
|
5749
5750
|
};
|
|
5750
|
-
const statusValue = statusMaps[status];
|
|
5751
|
+
const statusValue = error ? statusMaps.fail : statusMaps[status];
|
|
5751
5752
|
const [shouldRefetch, setShouldRefetch] = (0, import_react28.useState)(true);
|
|
5752
5753
|
(0, import_react28.useEffect)(() => {
|
|
5753
5754
|
if (hash) {
|
|
@@ -5801,7 +5802,8 @@ function HashPanel({
|
|
|
5801
5802
|
hash && /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: "matchid-hashpanel-hash", children: [
|
|
5802
5803
|
"Hash:",
|
|
5803
5804
|
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)("a", { href: link, target: "_blank", children: hash })
|
|
5804
|
-
] })
|
|
5805
|
+
] }),
|
|
5806
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: "matchid-hashpanel-text", children: error })
|
|
5805
5807
|
] }),
|
|
5806
5808
|
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)(Button, { onClick: onClose, size: "lg", block: true, children: "Back" })
|
|
5807
5809
|
] })
|
|
@@ -6172,34 +6174,40 @@ function useWallet() {
|
|
|
6172
6174
|
prepareTransactionRequest
|
|
6173
6175
|
}
|
|
6174
6176
|
});
|
|
6175
|
-
|
|
6176
|
-
|
|
6177
|
-
|
|
6178
|
-
|
|
6179
|
-
|
|
6180
|
-
|
|
6181
|
-
info: {
|
|
6182
|
-
from: evmAccount.address,
|
|
6183
|
-
to: restTransaction.to,
|
|
6184
|
-
value: (restTransaction.value || 0).toString(),
|
|
6185
|
-
input: restTransaction.data,
|
|
6186
|
-
timestamp: Math.floor(Date.now() / 1e3).toString(),
|
|
6177
|
+
try {
|
|
6178
|
+
const txHash = await obj.sendRawTransaction({
|
|
6179
|
+
serializedTransaction
|
|
6180
|
+
});
|
|
6181
|
+
addTransaction({
|
|
6182
|
+
chainId,
|
|
6187
6183
|
hash: txHash,
|
|
6188
|
-
|
|
6189
|
-
|
|
6190
|
-
|
|
6191
|
-
|
|
6192
|
-
|
|
6193
|
-
|
|
6194
|
-
|
|
6195
|
-
|
|
6196
|
-
|
|
6197
|
-
|
|
6184
|
+
info: {
|
|
6185
|
+
from: evmAccount.address,
|
|
6186
|
+
to: restTransaction.to,
|
|
6187
|
+
value: (restTransaction.value || 0).toString(),
|
|
6188
|
+
input: restTransaction.data,
|
|
6189
|
+
timestamp: Math.floor(Date.now() / 1e3).toString(),
|
|
6190
|
+
hash: txHash,
|
|
6191
|
+
source: "local"
|
|
6192
|
+
},
|
|
6193
|
+
address: evmAccount.address
|
|
6194
|
+
});
|
|
6195
|
+
modal.show((props) => {
|
|
6196
|
+
return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(HashPanel_default, { isOpen: true, onClose: props.close, zIndex: props.zIndex, hash: txHash, chain: _chain });
|
|
6197
|
+
});
|
|
6198
|
+
return txHash;
|
|
6199
|
+
} catch (error) {
|
|
6200
|
+
modal.show((props) => {
|
|
6201
|
+
return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(HashPanel_default, { isOpen: true, onClose: props.close, zIndex: props.zIndex, error: typeof error == "string" ? error : error.details || error.message, chain: _chain });
|
|
6202
|
+
});
|
|
6203
|
+
throw error;
|
|
6204
|
+
}
|
|
6198
6205
|
} catch (error) {
|
|
6199
|
-
console.error("
|
|
6206
|
+
console.error("matchid-send-error", error);
|
|
6207
|
+
throw error;
|
|
6208
|
+
} finally {
|
|
6200
6209
|
clearInterval(window.matchProvider.transactionMessageIntervalMap[transactionId].interval);
|
|
6201
6210
|
delete window.matchProvider.transactionMessageIntervalMap[transactionId];
|
|
6202
|
-
throw error;
|
|
6203
6211
|
}
|
|
6204
6212
|
};
|
|
6205
6213
|
const deployContract = async (parameters2) => {
|