@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
package/dist/hooks/index.mjs
CHANGED
package/dist/index.css
CHANGED
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
|
@@ -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) => {
|