@matchain/matchid-sdk-react 0.1.48-alpha.21 → 0.1.48-alpha.23
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/assets/icon/index.d.mts +1 -1
- package/dist/assets/icon/index.d.ts +1 -1
- package/dist/{chunk-WXPVHKGJ.mjs → chunk-FB5MHLWX.mjs} +3 -1
- package/dist/{chunk-CHWBALAC.mjs → chunk-FYW4P7HS.mjs} +607 -577
- package/dist/chunk-FYW4P7HS.mjs.map +1 -0
- package/dist/{chunk-IV4F5SHJ.mjs → chunk-SB54XHCJ.mjs} +2 -2
- package/dist/components/index.d.mts +3 -3
- package/dist/components/index.d.ts +3 -3
- package/dist/components/index.js +450 -461
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +3 -3
- package/dist/hooks/api/index.d.mts +2 -2
- package/dist/hooks/api/index.d.ts +2 -2
- package/dist/hooks/api/index.js +38 -29
- package/dist/hooks/api/index.js.map +1 -1
- package/dist/hooks/api/index.mjs +3 -3
- package/dist/hooks/index.d.mts +2 -2
- package/dist/hooks/index.d.ts +2 -2
- package/dist/hooks/index.js +130 -147
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/index.mjs +3 -3
- package/dist/{index-C9qYyRgt.d.mts → index-B4gKj0ro.d.mts} +2 -2
- package/dist/{index-Bpmrd7mh.d.ts → index-BFSCCmlU.d.ts} +1 -1
- package/dist/{index-Cy3K-Yao.d.ts → index-BHXlpUg5.d.ts} +1 -1
- package/dist/{index-Dhtyz0pT.d.mts → index-BObJQar4.d.mts} +2 -1
- package/dist/{index-BcEreCxd.d.ts → index-BOsoQSmx.d.ts} +1 -1
- package/dist/{index-C9F6f2iz.d.mts → index-Bk_dqXKp.d.mts} +2 -2
- package/dist/{index-BMsj8hJv.d.ts → index-CN2jy6bb.d.ts} +2 -2
- package/dist/{index-CFKZWJVt.d.ts → index-CSTyna62.d.ts} +2 -1
- package/dist/{index-BMfaixEx.d.mts → index-Ca30Hgn7.d.mts} +1 -1
- package/dist/{index-Cou96DpL.d.mts → index-CdM22eod.d.mts} +1 -1
- package/dist/{index-D4ju2J_e.d.mts → index-D3GBq1P1.d.mts} +1 -1
- package/dist/{index-Bvc8cjpN.d.ts → index-DTYp8DRd.d.ts} +2 -2
- package/dist/index.css +33 -0
- package/dist/index.d.mts +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/index.js +261 -233
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +10 -10
- package/dist/types/index.d.mts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/{types-DzVVzMYU.d.mts → types-Dc15ure7.d.mts} +1 -1
- package/dist/{types-DzVVzMYU.d.ts → types-Dc15ure7.d.ts} +1 -1
- package/dist/ui/index.d.mts +3 -3
- package/dist/ui/index.d.ts +3 -3
- package/dist/ui/index.mjs +1 -1
- package/package.json +1 -1
- package/dist/chunk-CHWBALAC.mjs.map +0 -1
- /package/dist/{chunk-WXPVHKGJ.mjs.map → chunk-FB5MHLWX.mjs.map} +0 -0
- /package/dist/{chunk-IV4F5SHJ.mjs.map → chunk-SB54XHCJ.mjs.map} +0 -0
package/dist/index.js
CHANGED
|
@@ -42,7 +42,7 @@ __export(src_exports, {
|
|
|
42
42
|
module.exports = __toCommonJS(src_exports);
|
|
43
43
|
|
|
44
44
|
// src/MatchContext.tsx
|
|
45
|
-
var
|
|
45
|
+
var import_react40 = require("react");
|
|
46
46
|
|
|
47
47
|
// src/hooks/index.tsx
|
|
48
48
|
var hooks_exports = {};
|
|
@@ -2754,7 +2754,6 @@ var import_middleware2 = require("zustand/middleware");
|
|
|
2754
2754
|
var persistedState2 = (0, import_middleware2.persist)(
|
|
2755
2755
|
(set, get) => ({
|
|
2756
2756
|
transactions: {},
|
|
2757
|
-
getTransactions: (chainId, address) => get().transactions[`${chainId}-${address}`] || [],
|
|
2758
2757
|
addTransaction: (data) => {
|
|
2759
2758
|
set((state) => {
|
|
2760
2759
|
const updatedTransactions = {
|
|
@@ -5706,6 +5705,7 @@ var useContractStore = (0, import_zustand5.create)((0, import_middleware3.devtoo
|
|
|
5706
5705
|
var useContractStore_default = useContractStore;
|
|
5707
5706
|
|
|
5708
5707
|
// src/components/TransactionList/index.tsx
|
|
5708
|
+
var import_react_intl17 = require("react-intl");
|
|
5709
5709
|
var import_jsx_runtime88 = require("react/jsx-runtime");
|
|
5710
5710
|
var Item = ({ data }) => {
|
|
5711
5711
|
const { address } = useWallet();
|
|
@@ -5837,7 +5837,7 @@ function TransactionList({
|
|
|
5837
5837
|
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)(LoadingIcon_default, { rotate: true, size: 16, color: "black" }),
|
|
5838
5838
|
"Loading..."
|
|
5839
5839
|
] }),
|
|
5840
|
-
endMessage: items.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { className: `matchid-list-nomore`, children:
|
|
5840
|
+
endMessage: items.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { className: `matchid-list-nomore`, children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(import_react_intl17.FormattedMessage, { id: "noMoreRecords" }) }) : /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { className: `matchid-list-nomore`, children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(import_react_intl17.FormattedMessage, { id: "noRecords" }) }),
|
|
5841
5841
|
children: items.length == 0 && !hasMore ? /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { className: "mt-[150px]" }) : /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { className: `matchid-transaction-list`, children: items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(Item, { data: item }, index)) })
|
|
5842
5842
|
}
|
|
5843
5843
|
);
|
|
@@ -5845,54 +5845,19 @@ function TransactionList({
|
|
|
5845
5845
|
|
|
5846
5846
|
// src/hooks/useMatchWallet.tsx
|
|
5847
5847
|
var import_react_qrcode = require("react-qrcode");
|
|
5848
|
+
var import_react34 = require("react");
|
|
5849
|
+
var import_react_query5 = require("@tanstack/react-query");
|
|
5850
|
+
var import_viem10 = require("viem");
|
|
5851
|
+
var import_react_intl19 = require("react-intl");
|
|
5852
|
+
|
|
5853
|
+
// src/components/ImportToken/index.tsx
|
|
5848
5854
|
var import_react33 = require("react");
|
|
5855
|
+
var import_react_intl18 = require("react-intl");
|
|
5849
5856
|
var import_react_query4 = require("@tanstack/react-query");
|
|
5850
5857
|
var import_viem9 = require("viem");
|
|
5851
|
-
var import_react_intl17 = require("react-intl");
|
|
5852
5858
|
var import_jsx_runtime89 = require("react/jsx-runtime");
|
|
5853
|
-
|
|
5854
|
-
const
|
|
5855
|
-
const { address } = useWallet();
|
|
5856
|
-
const [copied, setCopied] = useCopyClipboard();
|
|
5857
|
-
const toast = useToast();
|
|
5858
|
-
const intl = (0, import_react_intl17.useIntl)();
|
|
5859
|
-
const onCopy = () => {
|
|
5860
|
-
setCopied(address);
|
|
5861
|
-
toast.success(intl.formatMessage({
|
|
5862
|
-
id: "copied"
|
|
5863
|
-
}));
|
|
5864
|
-
};
|
|
5865
|
-
const chainLink = chain.explorerLink("address/" + address);
|
|
5866
|
-
return /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { className: `matchid-receive-modal`, children: [
|
|
5867
|
-
/* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { className: "matchid-receive-container", children: [
|
|
5868
|
-
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)("div", { className: `matchid-receive-text`, children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_react_intl17.FormattedMessage, { id: "receiveQrcode" }) }),
|
|
5869
|
-
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)("div", { className: `matchid-qr-container`, children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
5870
|
-
import_react_qrcode.QRCode,
|
|
5871
|
-
{
|
|
5872
|
-
margin: "0",
|
|
5873
|
-
className: `matchid-qr-code`,
|
|
5874
|
-
value: address
|
|
5875
|
-
}
|
|
5876
|
-
) }),
|
|
5877
|
-
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
5878
|
-
"a",
|
|
5879
|
-
{
|
|
5880
|
-
href: chainLink,
|
|
5881
|
-
target: "_blank",
|
|
5882
|
-
className: `matchid-receive-link`,
|
|
5883
|
-
children: address
|
|
5884
|
-
}
|
|
5885
|
-
)
|
|
5886
|
-
] }),
|
|
5887
|
-
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)(Button, { size: "lg", onClick: onCopy, block: true, highlight: true, disabled: copied, children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
5888
|
-
import_react_intl17.FormattedMessage,
|
|
5889
|
-
{
|
|
5890
|
-
id: "copyAddress"
|
|
5891
|
-
}
|
|
5892
|
-
) })
|
|
5893
|
-
] });
|
|
5894
|
-
};
|
|
5895
|
-
var ImportTokenModal = ({ close }) => {
|
|
5859
|
+
function ImportToken({ close }) {
|
|
5860
|
+
const [status, setStatus] = (0, import_react33.useState)("");
|
|
5896
5861
|
const { token } = useUserInfo();
|
|
5897
5862
|
const [address, setAddress] = (0, import_react33.useState)("");
|
|
5898
5863
|
const [symbol, setSymbol] = (0, import_react33.useState)("");
|
|
@@ -5901,32 +5866,16 @@ var ImportTokenModal = ({ close }) => {
|
|
|
5901
5866
|
const { publicClient, chainId } = useMatchChain();
|
|
5902
5867
|
const getContractInfo = async () => {
|
|
5903
5868
|
if (!publicClient) return;
|
|
5904
|
-
const erc20Abi3 = [
|
|
5905
|
-
{
|
|
5906
|
-
name: "decimals",
|
|
5907
|
-
type: "function",
|
|
5908
|
-
stateMutability: "view",
|
|
5909
|
-
inputs: [],
|
|
5910
|
-
outputs: [{ name: "decimals", type: "uint8" }]
|
|
5911
|
-
},
|
|
5912
|
-
{
|
|
5913
|
-
name: "symbol",
|
|
5914
|
-
type: "function",
|
|
5915
|
-
stateMutability: "view",
|
|
5916
|
-
inputs: [],
|
|
5917
|
-
outputs: [{ name: "symbol", type: "string" }]
|
|
5918
|
-
}
|
|
5919
|
-
];
|
|
5920
5869
|
const calls = [
|
|
5921
5870
|
{
|
|
5922
5871
|
address,
|
|
5923
|
-
abi:
|
|
5872
|
+
abi: import_viem9.erc20Abi,
|
|
5924
5873
|
functionName: "symbol",
|
|
5925
5874
|
args: []
|
|
5926
5875
|
},
|
|
5927
5876
|
{
|
|
5928
5877
|
address,
|
|
5929
|
-
abi:
|
|
5878
|
+
abi: import_viem9.erc20Abi,
|
|
5930
5879
|
functionName: "decimals",
|
|
5931
5880
|
args: []
|
|
5932
5881
|
}
|
|
@@ -5946,7 +5895,7 @@ var ImportTokenModal = ({ close }) => {
|
|
|
5946
5895
|
});
|
|
5947
5896
|
}
|
|
5948
5897
|
};
|
|
5949
|
-
const intl = (0,
|
|
5898
|
+
const intl = (0, import_react_intl18.useIntl)();
|
|
5950
5899
|
(0, import_react33.useEffect)(() => {
|
|
5951
5900
|
if (address.length === 42) {
|
|
5952
5901
|
const reg = /^0x[0-9a-fA-F]{40}$/;
|
|
@@ -5979,17 +5928,16 @@ var ImportTokenModal = ({ close }) => {
|
|
|
5979
5928
|
decimals
|
|
5980
5929
|
});
|
|
5981
5930
|
if (isSuccess(res)) {
|
|
5982
|
-
|
|
5983
|
-
id: "importSuccess"
|
|
5984
|
-
}));
|
|
5931
|
+
setStatus("success");
|
|
5985
5932
|
queryClient2.invalidateQueries({
|
|
5986
5933
|
queryKey: [USER_IMPORT_TOKEN_LIST_KEY, token, chainId]
|
|
5987
5934
|
});
|
|
5988
|
-
close();
|
|
5989
5935
|
} else {
|
|
5936
|
+
setStatus("fail");
|
|
5990
5937
|
toast.error(res.message);
|
|
5991
5938
|
}
|
|
5992
5939
|
} catch (error2) {
|
|
5940
|
+
setStatus("fail");
|
|
5993
5941
|
toast.error(error2.message);
|
|
5994
5942
|
} finally {
|
|
5995
5943
|
setLoading(false);
|
|
@@ -6011,6 +5959,16 @@ var ImportTokenModal = ({ close }) => {
|
|
|
6011
5959
|
}
|
|
6012
5960
|
return true;
|
|
6013
5961
|
}, [error, address, symbol, decimals]);
|
|
5962
|
+
console.log("status", status);
|
|
5963
|
+
if (status == "success" || status == "fail") {
|
|
5964
|
+
return /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { className: `matchid-import-token-result matchid-flex`, children: [
|
|
5965
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { className: `matchid-import-token-result-box matchid-flex`, children: [
|
|
5966
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)("img", { src: status == "success" ? success_default : fail_default, alt: status == "success" ? "success" : "fail", className: `matchid-import-token-result-img` }),
|
|
5967
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)("div", { className: `matchid-import-token-result-text matchid-import-token-result-text-${status}`, children: status == "success" ? /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_react_intl18.FormattedMessage, { id: "importSuccess" }) : /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_react_intl18.FormattedMessage, { id: "importFail" }) })
|
|
5968
|
+
] }),
|
|
5969
|
+
status == "success" ? /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(Button, { size: "lg", onClick: close, block: true, highlight: true, children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_react_intl18.FormattedMessage, { id: "close" }) }) : /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(Button, { size: "lg", onClick: () => setStatus(""), block: true, highlight: true, children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_react_intl18.FormattedMessage, { id: "back" }) })
|
|
5970
|
+
] });
|
|
5971
|
+
}
|
|
6014
5972
|
return /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { className: `matchid-import-token`, children: [
|
|
6015
5973
|
/* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { className: "matchid-import-token-form", children: [
|
|
6016
5974
|
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)(Field, { label: intl.formatMessage({
|
|
@@ -6062,14 +6020,59 @@ var ImportTokenModal = ({ close }) => {
|
|
|
6062
6020
|
loading,
|
|
6063
6021
|
disabled: !canImport,
|
|
6064
6022
|
highlight: true,
|
|
6065
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
6023
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_react_intl18.FormattedMessage, { id: "import" })
|
|
6066
6024
|
}
|
|
6067
6025
|
)
|
|
6068
6026
|
] });
|
|
6027
|
+
}
|
|
6028
|
+
|
|
6029
|
+
// src/hooks/useMatchWallet.tsx
|
|
6030
|
+
var import_jsx_runtime90 = require("react/jsx-runtime");
|
|
6031
|
+
var ReceiveModal = () => {
|
|
6032
|
+
const chain = useMatchChain();
|
|
6033
|
+
const { address } = useWallet();
|
|
6034
|
+
const [copied, setCopied] = useCopyClipboard();
|
|
6035
|
+
const toast = useToast();
|
|
6036
|
+
const intl = (0, import_react_intl19.useIntl)();
|
|
6037
|
+
const onCopy = () => {
|
|
6038
|
+
setCopied(address);
|
|
6039
|
+
toast.success(intl.formatMessage({
|
|
6040
|
+
id: "copied"
|
|
6041
|
+
}));
|
|
6042
|
+
};
|
|
6043
|
+
const chainLink = chain.explorerLink("address/" + address);
|
|
6044
|
+
return /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { className: `matchid-receive-modal`, children: [
|
|
6045
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { className: "matchid-receive-container", children: [
|
|
6046
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)("div", { className: `matchid-receive-text`, children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(import_react_intl19.FormattedMessage, { id: "receiveQrcode" }) }),
|
|
6047
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)("div", { className: `matchid-qr-container`, children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
6048
|
+
import_react_qrcode.QRCode,
|
|
6049
|
+
{
|
|
6050
|
+
margin: "0",
|
|
6051
|
+
className: `matchid-qr-code`,
|
|
6052
|
+
value: address
|
|
6053
|
+
}
|
|
6054
|
+
) }),
|
|
6055
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
6056
|
+
"a",
|
|
6057
|
+
{
|
|
6058
|
+
href: chainLink,
|
|
6059
|
+
target: "_blank",
|
|
6060
|
+
className: `matchid-receive-link`,
|
|
6061
|
+
children: address
|
|
6062
|
+
}
|
|
6063
|
+
)
|
|
6064
|
+
] }),
|
|
6065
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)(Button, { size: "lg", onClick: onCopy, block: true, highlight: true, disabled: copied, children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
6066
|
+
import_react_intl19.FormattedMessage,
|
|
6067
|
+
{
|
|
6068
|
+
id: "copyAddress"
|
|
6069
|
+
}
|
|
6070
|
+
) })
|
|
6071
|
+
] });
|
|
6069
6072
|
};
|
|
6070
6073
|
function useMatchWallet() {
|
|
6071
6074
|
const modal = useModal();
|
|
6072
|
-
const intl = (0,
|
|
6075
|
+
const intl = (0, import_react_intl19.useIntl)();
|
|
6073
6076
|
const showReceiveModal = () => {
|
|
6074
6077
|
modal.open({
|
|
6075
6078
|
title: intl.formatMessage({
|
|
@@ -6081,9 +6084,9 @@ function useMatchWallet() {
|
|
|
6081
6084
|
const showImportTokenModal = () => {
|
|
6082
6085
|
modal.open({
|
|
6083
6086
|
title: intl.formatMessage({
|
|
6084
|
-
id: "
|
|
6087
|
+
id: "customizedToken"
|
|
6085
6088
|
}),
|
|
6086
|
-
content:
|
|
6089
|
+
content: ImportToken
|
|
6087
6090
|
});
|
|
6088
6091
|
};
|
|
6089
6092
|
const showSendListModal = () => {
|
|
@@ -6101,12 +6104,12 @@ function useMatchWallet() {
|
|
|
6101
6104
|
};
|
|
6102
6105
|
}
|
|
6103
6106
|
function useMatchWalletRecords() {
|
|
6104
|
-
const [hasMore, setHasMore] = (0,
|
|
6105
|
-
const [items, setItems] = (0,
|
|
6107
|
+
const [hasMore, setHasMore] = (0, import_react34.useState)(true);
|
|
6108
|
+
const [items, setItems] = (0, import_react34.useState)([]);
|
|
6106
6109
|
const { chainId, publicClient } = useMatchChain();
|
|
6107
6110
|
const { address } = useWallet();
|
|
6108
|
-
const hasMoreRef = (0,
|
|
6109
|
-
const nextPageParamsRef = (0,
|
|
6111
|
+
const hasMoreRef = (0, import_react34.useRef)(hasMore);
|
|
6112
|
+
const nextPageParamsRef = (0, import_react34.useRef)(void 0);
|
|
6110
6113
|
const { getContract, setContracts } = useContractStore_default();
|
|
6111
6114
|
const fetchMoreData = async () => {
|
|
6112
6115
|
const chainIdStr = chainId ? chainId.toString() : "";
|
|
@@ -6137,13 +6140,13 @@ function useMatchWalletRecords() {
|
|
|
6137
6140
|
for (const contract of contractUnique) {
|
|
6138
6141
|
calls.push({
|
|
6139
6142
|
address: contract,
|
|
6140
|
-
abi:
|
|
6143
|
+
abi: import_viem10.erc20Abi,
|
|
6141
6144
|
functionName: "symbol",
|
|
6142
6145
|
args: []
|
|
6143
6146
|
});
|
|
6144
6147
|
calls.push({
|
|
6145
6148
|
address: contract,
|
|
6146
|
-
abi:
|
|
6149
|
+
abi: import_viem10.erc20Abi,
|
|
6147
6150
|
functionName: "decimals",
|
|
6148
6151
|
args: []
|
|
6149
6152
|
});
|
|
@@ -6182,14 +6185,14 @@ function useMatchWalletRecords() {
|
|
|
6182
6185
|
hasMoreRef.current = true;
|
|
6183
6186
|
fetchMoreData();
|
|
6184
6187
|
};
|
|
6185
|
-
(0,
|
|
6188
|
+
(0, import_react34.useEffect)(() => {
|
|
6186
6189
|
if (chainId && address) {
|
|
6187
6190
|
onInit();
|
|
6188
6191
|
}
|
|
6189
6192
|
}, [chainId, address]);
|
|
6190
|
-
const {
|
|
6191
|
-
const list = (0,
|
|
6192
|
-
const localTransactions =
|
|
6193
|
+
const { transactions, removeTransaction } = useTransactionStore_default();
|
|
6194
|
+
const list = (0, import_react34.useMemo)(() => {
|
|
6195
|
+
const localTransactions = transactions[`${chainId}-${address}`] || [];
|
|
6193
6196
|
const removeList = localTransactions.filter((n) => items.findIndex((m) => m.hash == n.hash) >= 0);
|
|
6194
6197
|
removeList.forEach((item) => {
|
|
6195
6198
|
removeTransaction({
|
|
@@ -6207,7 +6210,7 @@ function useMatchWalletRecords() {
|
|
|
6207
6210
|
const atimestamp = typeof a.timestamp === "string" ? parseInt(a.timestamp) : a.timestamp;
|
|
6208
6211
|
return btimestamp - atimestamp;
|
|
6209
6212
|
});
|
|
6210
|
-
}, [
|
|
6213
|
+
}, [transactions, chainId, items, address]);
|
|
6211
6214
|
return {
|
|
6212
6215
|
items: list,
|
|
6213
6216
|
fetchMoreData,
|
|
@@ -6227,7 +6230,7 @@ function useMatchWalletAssets({
|
|
|
6227
6230
|
chainId: chainId || 0,
|
|
6228
6231
|
...assetListOptions
|
|
6229
6232
|
});
|
|
6230
|
-
const mergedAssets = (0,
|
|
6233
|
+
const mergedAssets = (0, import_react34.useMemo)(() => {
|
|
6231
6234
|
if (!assetListQuery.data && !importTokenQuery.data) return [];
|
|
6232
6235
|
const assetList = (assetListQuery.data || []).map((asset) => ({
|
|
6233
6236
|
...asset,
|
|
@@ -6295,7 +6298,7 @@ function useMatchWalletAssetList({
|
|
|
6295
6298
|
name: chain?.nativeCurrency.name,
|
|
6296
6299
|
balance: 0
|
|
6297
6300
|
};
|
|
6298
|
-
const nativeBalanceQuery = (0,
|
|
6301
|
+
const nativeBalanceQuery = (0, import_react_query5.useQuery)({
|
|
6299
6302
|
queryKey: ["nativeBalance", nativeToken?.chain_id],
|
|
6300
6303
|
queryFn: async () => {
|
|
6301
6304
|
if (!nativeToken || !publicClient) return null;
|
|
@@ -6314,35 +6317,14 @@ function useMatchWalletAssetList({
|
|
|
6314
6317
|
retry: 3
|
|
6315
6318
|
// Retry up to 3 times if failed
|
|
6316
6319
|
});
|
|
6317
|
-
const erc20Tokens = (0,
|
|
6318
|
-
const
|
|
6319
|
-
{
|
|
6320
|
-
"constant": true,
|
|
6321
|
-
"inputs": [
|
|
6322
|
-
{
|
|
6323
|
-
"name": "_owner",
|
|
6324
|
-
"type": "address"
|
|
6325
|
-
}
|
|
6326
|
-
],
|
|
6327
|
-
"name": "balanceOf",
|
|
6328
|
-
"outputs": [
|
|
6329
|
-
{
|
|
6330
|
-
"name": "balance",
|
|
6331
|
-
"type": "uint256"
|
|
6332
|
-
}
|
|
6333
|
-
],
|
|
6334
|
-
"payable": false,
|
|
6335
|
-
"stateMutability": "view",
|
|
6336
|
-
"type": "function"
|
|
6337
|
-
}
|
|
6338
|
-
];
|
|
6339
|
-
const erc20BalanceQuery = (0, import_react_query4.useQuery)({
|
|
6320
|
+
const erc20Tokens = (0, import_react34.useMemo)(() => list.filter((asset) => asset.address !== NATIVE_TOKEN_ADDRESS), [list]);
|
|
6321
|
+
const erc20BalanceQuery = (0, import_react_query5.useQuery)({
|
|
6340
6322
|
queryKey: ["erc20Balances", erc20Tokens.map((token) => token.address)],
|
|
6341
6323
|
queryFn: async () => {
|
|
6342
6324
|
if (!erc20Tokens.length || !publicClient) return [];
|
|
6343
6325
|
const calls = erc20Tokens.map((token) => ({
|
|
6344
6326
|
address: token.address,
|
|
6345
|
-
abi:
|
|
6327
|
+
abi: import_viem10.erc20Abi,
|
|
6346
6328
|
functionName: "balanceOf",
|
|
6347
6329
|
args: [address]
|
|
6348
6330
|
}));
|
|
@@ -6363,7 +6345,7 @@ function useMatchWalletAssetList({
|
|
|
6363
6345
|
// Refresh every 15 seconds
|
|
6364
6346
|
retry: 3
|
|
6365
6347
|
});
|
|
6366
|
-
const enrichedAssets = (0,
|
|
6348
|
+
const enrichedAssets = (0, import_react34.useMemo)(() => {
|
|
6367
6349
|
if (!list) return [];
|
|
6368
6350
|
const erc20Balances = erc20BalanceQuery.data || [];
|
|
6369
6351
|
return list.map((asset) => {
|
|
@@ -6372,11 +6354,11 @@ function useMatchWalletAssetList({
|
|
|
6372
6354
|
const decimals = typeof asset.decimals === "string" ? parseInt(asset.decimals) : asset.decimals;
|
|
6373
6355
|
if (asset.address === NATIVE_TOKEN_ADDRESS) {
|
|
6374
6356
|
balanceValue = nativeBalanceQuery.data?.toString() || "0";
|
|
6375
|
-
balance = nativeBalanceQuery.data ? Number((0,
|
|
6357
|
+
balance = nativeBalanceQuery.data ? Number((0, import_viem10.formatUnits)(nativeBalanceQuery.data, decimals)) : 0;
|
|
6376
6358
|
} else {
|
|
6377
6359
|
const index = erc20Tokens.findIndex((t) => t.address === asset.address);
|
|
6378
6360
|
if (index !== -1 && erc20Balances[index] && erc20Balances[index].status === "success") {
|
|
6379
|
-
balance = Number((0,
|
|
6361
|
+
balance = Number((0, import_viem10.formatUnits)(erc20Balances[index].result, decimals));
|
|
6380
6362
|
balanceValue = erc20Balances[index].result?.toString() || "0";
|
|
6381
6363
|
}
|
|
6382
6364
|
}
|
|
@@ -6384,7 +6366,7 @@ function useMatchWalletAssetList({
|
|
|
6384
6366
|
return { ...asset, balance, value, balanceValue };
|
|
6385
6367
|
});
|
|
6386
6368
|
}, [list, nativeBalanceQuery.data, erc20BalanceQuery.data]);
|
|
6387
|
-
(0,
|
|
6369
|
+
(0, import_react34.useEffect)(() => {
|
|
6388
6370
|
const list2 = enrichedAssets.sort((a, b) => {
|
|
6389
6371
|
if (a.address === NATIVE_TOKEN_ADDRESS) return -1;
|
|
6390
6372
|
if (b.address === NATIVE_TOKEN_ADDRESS) return 1;
|
|
@@ -6400,20 +6382,21 @@ function useMatchWalletAssetList({
|
|
|
6400
6382
|
return {
|
|
6401
6383
|
list: assets,
|
|
6402
6384
|
isLoading: nativeBalanceQuery.isLoading || erc20BalanceQuery.isLoading,
|
|
6385
|
+
isFetched: nativeBalanceQuery.isFetched && erc20BalanceQuery.isFetched,
|
|
6403
6386
|
nativeBalance: nativeBalanceQuery.data,
|
|
6404
6387
|
erc20Balances: erc20BalanceQuery.data
|
|
6405
6388
|
};
|
|
6406
6389
|
}
|
|
6407
6390
|
|
|
6408
6391
|
// src/hooks/useReceipt.tsx
|
|
6409
|
-
var
|
|
6410
|
-
var
|
|
6411
|
-
var
|
|
6392
|
+
var import_react35 = require("react");
|
|
6393
|
+
var import_react_query6 = require("@tanstack/react-query");
|
|
6394
|
+
var import_viem11 = require("viem");
|
|
6412
6395
|
var CACHE_TTL = 86400 * 30 * 1e3;
|
|
6413
6396
|
var MAX_CACHE_SIZE = 500;
|
|
6414
6397
|
var STORAGE_KEY = "match_receipt_logs";
|
|
6415
6398
|
function useReceiptCache() {
|
|
6416
|
-
const [cache, setCache] = (0,
|
|
6399
|
+
const [cache, setCache] = (0, import_react35.useState)(/* @__PURE__ */ new Map());
|
|
6417
6400
|
const isLocalStorageAvailable = (() => {
|
|
6418
6401
|
try {
|
|
6419
6402
|
const testKey = "__test__";
|
|
@@ -6424,7 +6407,7 @@ function useReceiptCache() {
|
|
|
6424
6407
|
return false;
|
|
6425
6408
|
}
|
|
6426
6409
|
})();
|
|
6427
|
-
(0,
|
|
6410
|
+
(0, import_react35.useEffect)(() => {
|
|
6428
6411
|
if (isLocalStorageAvailable) {
|
|
6429
6412
|
try {
|
|
6430
6413
|
const storedData = localStorage.getItem(STORAGE_KEY);
|
|
@@ -6443,7 +6426,7 @@ function useReceiptCache() {
|
|
|
6443
6426
|
}
|
|
6444
6427
|
}
|
|
6445
6428
|
}, []);
|
|
6446
|
-
const updateLocalStorage = (0,
|
|
6429
|
+
const updateLocalStorage = (0, import_react35.useCallback)((updatedCache) => {
|
|
6447
6430
|
if (isLocalStorageAvailable) {
|
|
6448
6431
|
try {
|
|
6449
6432
|
const storedData = localStorage.getItem(STORAGE_KEY);
|
|
@@ -6460,7 +6443,7 @@ function useReceiptCache() {
|
|
|
6460
6443
|
}
|
|
6461
6444
|
}
|
|
6462
6445
|
}, []);
|
|
6463
|
-
const set = (0,
|
|
6446
|
+
const set = (0, import_react35.useCallback)((key, value) => {
|
|
6464
6447
|
const now = Date.now();
|
|
6465
6448
|
const newCache = new Map(cache);
|
|
6466
6449
|
newCache.forEach((entry, k) => {
|
|
@@ -6478,7 +6461,7 @@ function useReceiptCache() {
|
|
|
6478
6461
|
setCache(newCache);
|
|
6479
6462
|
updateLocalStorage(newCache);
|
|
6480
6463
|
}, [cache, updateLocalStorage]);
|
|
6481
|
-
const get = (0,
|
|
6464
|
+
const get = (0, import_react35.useCallback)((key) => {
|
|
6482
6465
|
const entry = cache.get(key);
|
|
6483
6466
|
if (entry) {
|
|
6484
6467
|
if (Date.now() - entry.timestamp > CACHE_TTL) {
|
|
@@ -6492,7 +6475,7 @@ function useReceiptCache() {
|
|
|
6492
6475
|
}
|
|
6493
6476
|
return void 0;
|
|
6494
6477
|
}, [cache, updateLocalStorage]);
|
|
6495
|
-
const del = (0,
|
|
6478
|
+
const del = (0, import_react35.useCallback)((key) => {
|
|
6496
6479
|
if (cache.has(key)) {
|
|
6497
6480
|
const newCache = new Map(cache);
|
|
6498
6481
|
newCache.delete(key);
|
|
@@ -6500,7 +6483,7 @@ function useReceiptCache() {
|
|
|
6500
6483
|
updateLocalStorage(newCache);
|
|
6501
6484
|
}
|
|
6502
6485
|
}, [cache, updateLocalStorage]);
|
|
6503
|
-
const clear = (0,
|
|
6486
|
+
const clear = (0, import_react35.useCallback)(() => {
|
|
6504
6487
|
setCache(/* @__PURE__ */ new Map());
|
|
6505
6488
|
if (isLocalStorageAvailable) {
|
|
6506
6489
|
localStorage.removeItem(STORAGE_KEY);
|
|
@@ -6515,8 +6498,8 @@ function useReceipt2({
|
|
|
6515
6498
|
const { list } = useMatchChain();
|
|
6516
6499
|
const cache = useReceiptCache();
|
|
6517
6500
|
const chain = list?.find((item) => item.id === chainId);
|
|
6518
|
-
const [shouldRefetch, setShouldRefetch] = (0,
|
|
6519
|
-
const query = (0,
|
|
6501
|
+
const [shouldRefetch, setShouldRefetch] = (0, import_react35.useState)(true);
|
|
6502
|
+
const query = (0, import_react_query6.useQuery)({
|
|
6520
6503
|
queryKey: ["match-tx-receipt", hash, chain],
|
|
6521
6504
|
queryFn: async () => {
|
|
6522
6505
|
if (!chain || !hash) return false;
|
|
@@ -6525,9 +6508,9 @@ function useReceipt2({
|
|
|
6525
6508
|
return cache.get(cacheKey);
|
|
6526
6509
|
}
|
|
6527
6510
|
try {
|
|
6528
|
-
const publicClient = (0,
|
|
6529
|
-
chain: (0,
|
|
6530
|
-
transport: (0,
|
|
6511
|
+
const publicClient = (0, import_viem11.createPublicClient)({
|
|
6512
|
+
chain: (0, import_viem11.defineChain)(chain),
|
|
6513
|
+
transport: (0, import_viem11.http)()
|
|
6531
6514
|
});
|
|
6532
6515
|
const receipt = await publicClient.getTransactionReceipt({ hash });
|
|
6533
6516
|
if (!receipt) {
|
|
@@ -6541,7 +6524,7 @@ function useReceipt2({
|
|
|
6541
6524
|
},
|
|
6542
6525
|
refetchInterval: shouldRefetch ? 1e4 : false
|
|
6543
6526
|
});
|
|
6544
|
-
(0,
|
|
6527
|
+
(0, import_react35.useEffect)(() => {
|
|
6545
6528
|
if (query.data) {
|
|
6546
6529
|
setShouldRefetch(false);
|
|
6547
6530
|
}
|
|
@@ -6550,14 +6533,14 @@ function useReceipt2({
|
|
|
6550
6533
|
}
|
|
6551
6534
|
|
|
6552
6535
|
// src/hooks/useTransaction.tsx
|
|
6553
|
-
var
|
|
6554
|
-
var
|
|
6555
|
-
var
|
|
6536
|
+
var import_react36 = require("react");
|
|
6537
|
+
var import_react_query7 = require("@tanstack/react-query");
|
|
6538
|
+
var import_viem12 = require("viem");
|
|
6556
6539
|
var CACHE_TTL2 = 86400 * 30 * 1e3;
|
|
6557
6540
|
var MAX_CACHE_SIZE2 = 500;
|
|
6558
6541
|
var STORAGE_KEY2 = "match_transaction_logs";
|
|
6559
6542
|
function useTransactionCache() {
|
|
6560
|
-
const [cache, setCache] = (0,
|
|
6543
|
+
const [cache, setCache] = (0, import_react36.useState)(/* @__PURE__ */ new Map());
|
|
6561
6544
|
const isLocalStorageAvailable = (() => {
|
|
6562
6545
|
try {
|
|
6563
6546
|
const testKey = "__test__";
|
|
@@ -6568,7 +6551,7 @@ function useTransactionCache() {
|
|
|
6568
6551
|
return false;
|
|
6569
6552
|
}
|
|
6570
6553
|
})();
|
|
6571
|
-
(0,
|
|
6554
|
+
(0, import_react36.useEffect)(() => {
|
|
6572
6555
|
if (isLocalStorageAvailable) {
|
|
6573
6556
|
try {
|
|
6574
6557
|
const storedData = localStorage.getItem(STORAGE_KEY2);
|
|
@@ -6587,7 +6570,7 @@ function useTransactionCache() {
|
|
|
6587
6570
|
}
|
|
6588
6571
|
}
|
|
6589
6572
|
}, []);
|
|
6590
|
-
const updateLocalStorage = (0,
|
|
6573
|
+
const updateLocalStorage = (0, import_react36.useCallback)((updatedCache) => {
|
|
6591
6574
|
if (isLocalStorageAvailable) {
|
|
6592
6575
|
try {
|
|
6593
6576
|
const storedData = localStorage.getItem(STORAGE_KEY2);
|
|
@@ -6604,7 +6587,7 @@ function useTransactionCache() {
|
|
|
6604
6587
|
}
|
|
6605
6588
|
}
|
|
6606
6589
|
}, []);
|
|
6607
|
-
const set = (0,
|
|
6590
|
+
const set = (0, import_react36.useCallback)((key, value) => {
|
|
6608
6591
|
const now = Date.now();
|
|
6609
6592
|
const newCache = new Map(cache);
|
|
6610
6593
|
newCache.forEach((entry, k) => {
|
|
@@ -6622,7 +6605,7 @@ function useTransactionCache() {
|
|
|
6622
6605
|
setCache(newCache);
|
|
6623
6606
|
updateLocalStorage(newCache);
|
|
6624
6607
|
}, [cache, updateLocalStorage]);
|
|
6625
|
-
const get = (0,
|
|
6608
|
+
const get = (0, import_react36.useCallback)((key) => {
|
|
6626
6609
|
const entry = cache.get(key);
|
|
6627
6610
|
if (entry) {
|
|
6628
6611
|
if (Date.now() - entry.timestamp > CACHE_TTL2) {
|
|
@@ -6636,7 +6619,7 @@ function useTransactionCache() {
|
|
|
6636
6619
|
}
|
|
6637
6620
|
return void 0;
|
|
6638
6621
|
}, [cache, updateLocalStorage]);
|
|
6639
|
-
const del = (0,
|
|
6622
|
+
const del = (0, import_react36.useCallback)((key) => {
|
|
6640
6623
|
if (cache.has(key)) {
|
|
6641
6624
|
const newCache = new Map(cache);
|
|
6642
6625
|
newCache.delete(key);
|
|
@@ -6644,7 +6627,7 @@ function useTransactionCache() {
|
|
|
6644
6627
|
updateLocalStorage(newCache);
|
|
6645
6628
|
}
|
|
6646
6629
|
}, [cache, updateLocalStorage]);
|
|
6647
|
-
const clear = (0,
|
|
6630
|
+
const clear = (0, import_react36.useCallback)(() => {
|
|
6648
6631
|
setCache(/* @__PURE__ */ new Map());
|
|
6649
6632
|
if (isLocalStorageAvailable) {
|
|
6650
6633
|
localStorage.removeItem(STORAGE_KEY2);
|
|
@@ -6659,8 +6642,8 @@ function useTransaction({
|
|
|
6659
6642
|
const { list } = useMatchChain();
|
|
6660
6643
|
const cache = useTransactionCache();
|
|
6661
6644
|
const chain = list?.find((item) => item.id === chainId);
|
|
6662
|
-
const [shouldRefetch, setShouldRefetch] = (0,
|
|
6663
|
-
const query = (0,
|
|
6645
|
+
const [shouldRefetch, setShouldRefetch] = (0, import_react36.useState)(true);
|
|
6646
|
+
const query = (0, import_react_query7.useQuery)({
|
|
6664
6647
|
queryKey: ["match-tx-transaction", hash, chain],
|
|
6665
6648
|
queryFn: async () => {
|
|
6666
6649
|
if (!chain || !hash) return false;
|
|
@@ -6669,9 +6652,9 @@ function useTransaction({
|
|
|
6669
6652
|
return cache.get(cacheKey);
|
|
6670
6653
|
}
|
|
6671
6654
|
try {
|
|
6672
|
-
const publicClient = (0,
|
|
6673
|
-
chain: (0,
|
|
6674
|
-
transport: (0,
|
|
6655
|
+
const publicClient = (0, import_viem12.createPublicClient)({
|
|
6656
|
+
chain: (0, import_viem12.defineChain)(chain),
|
|
6657
|
+
transport: (0, import_viem12.http)()
|
|
6675
6658
|
});
|
|
6676
6659
|
const transaction = await publicClient.getTransaction({ hash });
|
|
6677
6660
|
if (!transaction) {
|
|
@@ -6685,7 +6668,7 @@ function useTransaction({
|
|
|
6685
6668
|
},
|
|
6686
6669
|
refetchInterval: shouldRefetch ? 1e4 : false
|
|
6687
6670
|
});
|
|
6688
|
-
(0,
|
|
6671
|
+
(0, import_react36.useEffect)(() => {
|
|
6689
6672
|
if (query.data) {
|
|
6690
6673
|
setShouldRefetch(false);
|
|
6691
6674
|
}
|
|
@@ -6694,27 +6677,27 @@ function useTransaction({
|
|
|
6694
6677
|
}
|
|
6695
6678
|
|
|
6696
6679
|
// src/components/CEXBindModal/index.tsx
|
|
6697
|
-
var
|
|
6698
|
-
var
|
|
6699
|
-
var
|
|
6680
|
+
var import_react37 = require("react");
|
|
6681
|
+
var import_react_intl20 = require("react-intl");
|
|
6682
|
+
var import_jsx_runtime91 = require("react/jsx-runtime");
|
|
6700
6683
|
function CEXBindModal({
|
|
6701
6684
|
onClose,
|
|
6702
6685
|
type,
|
|
6703
6686
|
isOpen = false,
|
|
6704
6687
|
...props
|
|
6705
6688
|
}) {
|
|
6706
|
-
const intl = (0,
|
|
6689
|
+
const intl = (0, import_react_intl20.useIntl)();
|
|
6707
6690
|
const { events } = useMatch();
|
|
6708
|
-
const [APIPassphrase, setAPIPassphrase] = (0,
|
|
6691
|
+
const [APIPassphrase, setAPIPassphrase] = (0, import_react37.useState)("");
|
|
6709
6692
|
const { refreshOverview } = useUserInfo();
|
|
6710
|
-
const [loading, setLoading] = (0,
|
|
6711
|
-
const [key, setKey] = (0,
|
|
6712
|
-
const [secret, setSecret] = (0,
|
|
6713
|
-
const [error, setError] = (0,
|
|
6714
|
-
const needPassphrase = (0,
|
|
6693
|
+
const [loading, setLoading] = (0, import_react37.useState)(false);
|
|
6694
|
+
const [key, setKey] = (0, import_react37.useState)("");
|
|
6695
|
+
const [secret, setSecret] = (0, import_react37.useState)("");
|
|
6696
|
+
const [error, setError] = (0, import_react37.useState)("");
|
|
6697
|
+
const needPassphrase = (0, import_react37.useMemo)(() => {
|
|
6715
6698
|
return ["bitget", "okx"].includes(type.toLowerCase());
|
|
6716
6699
|
}, [type]);
|
|
6717
|
-
(0,
|
|
6700
|
+
(0, import_react37.useEffect)(() => {
|
|
6718
6701
|
if (isOpen) {
|
|
6719
6702
|
setSecret("");
|
|
6720
6703
|
setKey("");
|
|
@@ -6751,20 +6734,20 @@ function CEXBindModal({
|
|
|
6751
6734
|
setLoading(false);
|
|
6752
6735
|
}
|
|
6753
6736
|
};
|
|
6754
|
-
return /* @__PURE__ */ (0,
|
|
6737
|
+
return /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(ModalWithHeader, { showClose: true, isOpen, onClose, title: intl.formatMessage({
|
|
6755
6738
|
id: "CEXBindTitle"
|
|
6756
6739
|
}, {
|
|
6757
6740
|
type
|
|
6758
|
-
}), ...props, children: /* @__PURE__ */ (0,
|
|
6759
|
-
/* @__PURE__ */ (0,
|
|
6760
|
-
/* @__PURE__ */ (0,
|
|
6761
|
-
/* @__PURE__ */ (0,
|
|
6762
|
-
/* @__PURE__ */ (0,
|
|
6763
|
-
/* @__PURE__ */ (0,
|
|
6741
|
+
}), ...props, children: /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "matchid-cex-modal", children: [
|
|
6742
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { children: [
|
|
6743
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("p", { children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(import_react_intl20.FormattedMessage, { id: "CEXBindAttention" }) }),
|
|
6744
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("p", { children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(import_react_intl20.FormattedMessage, { id: "CEXBindTips1" }) }),
|
|
6745
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("p", { children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(import_react_intl20.FormattedMessage, { id: "CEXBindTips2" }) }),
|
|
6746
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("p", { children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(import_react_intl20.FormattedMessage, { id: "CEXBindTips3" }) })
|
|
6764
6747
|
] }),
|
|
6765
|
-
/* @__PURE__ */ (0,
|
|
6748
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(Field, { label: intl.formatMessage({
|
|
6766
6749
|
id: "CEXBindApiKey"
|
|
6767
|
-
}), children: /* @__PURE__ */ (0,
|
|
6750
|
+
}), children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
6768
6751
|
Input,
|
|
6769
6752
|
{
|
|
6770
6753
|
value: key,
|
|
@@ -6772,9 +6755,9 @@ function CEXBindModal({
|
|
|
6772
6755
|
placeholder: "**** **** ****"
|
|
6773
6756
|
}
|
|
6774
6757
|
) }),
|
|
6775
|
-
/* @__PURE__ */ (0,
|
|
6758
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(Field, { label: intl.formatMessage({
|
|
6776
6759
|
id: "CEXBindApiSecretKey"
|
|
6777
|
-
}), error: !needPassphrase && error, children: /* @__PURE__ */ (0,
|
|
6760
|
+
}), error: !needPassphrase && error, children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
6778
6761
|
Input,
|
|
6779
6762
|
{
|
|
6780
6763
|
value: secret,
|
|
@@ -6782,9 +6765,9 @@ function CEXBindModal({
|
|
|
6782
6765
|
placeholder: "**** **** ****"
|
|
6783
6766
|
}
|
|
6784
6767
|
) }),
|
|
6785
|
-
needPassphrase && /* @__PURE__ */ (0,
|
|
6768
|
+
needPassphrase && /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(Field, { error, label: intl.formatMessage({
|
|
6786
6769
|
id: "CEXBindApiPassphrase"
|
|
6787
|
-
}), children: /* @__PURE__ */ (0,
|
|
6770
|
+
}), children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
6788
6771
|
Input,
|
|
6789
6772
|
{
|
|
6790
6773
|
value: APIPassphrase,
|
|
@@ -6792,7 +6775,7 @@ function CEXBindModal({
|
|
|
6792
6775
|
placeholder: "**** **** ****"
|
|
6793
6776
|
}
|
|
6794
6777
|
) }),
|
|
6795
|
-
/* @__PURE__ */ (0,
|
|
6778
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
6796
6779
|
Button,
|
|
6797
6780
|
{
|
|
6798
6781
|
onClick: SubmitApi,
|
|
@@ -6800,14 +6783,14 @@ function CEXBindModal({
|
|
|
6800
6783
|
block: true,
|
|
6801
6784
|
loading,
|
|
6802
6785
|
disabled: !key || !secret,
|
|
6803
|
-
children: /* @__PURE__ */ (0,
|
|
6786
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(import_react_intl20.FormattedMessage, { id: "continue" })
|
|
6804
6787
|
}
|
|
6805
6788
|
)
|
|
6806
6789
|
] }) });
|
|
6807
6790
|
}
|
|
6808
6791
|
|
|
6809
6792
|
// src/context/BusinessProvider.tsx
|
|
6810
|
-
var
|
|
6793
|
+
var import_jsx_runtime92 = require("react/jsx-runtime");
|
|
6811
6794
|
function BusinessProvider({ children }) {
|
|
6812
6795
|
const { overview, token } = useUserInfo();
|
|
6813
6796
|
const { type: SOLType, isOpen: SOLIsOpen, close: SOLClose } = useSOLModalStore();
|
|
@@ -6820,8 +6803,8 @@ function BusinessProvider({ children }) {
|
|
|
6820
6803
|
WalletModalStore.close();
|
|
6821
6804
|
func();
|
|
6822
6805
|
};
|
|
6823
|
-
return /* @__PURE__ */ (0,
|
|
6824
|
-
/* @__PURE__ */ (0,
|
|
6806
|
+
return /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(import_jsx_runtime92.Fragment, { children: [
|
|
6807
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
6825
6808
|
SOLModal,
|
|
6826
6809
|
{
|
|
6827
6810
|
isOpen: SOLIsOpen && (SOLType == "login" && !overview && !token || SOLType == "bind" && !!token && !!overview),
|
|
@@ -6831,7 +6814,7 @@ function BusinessProvider({ children }) {
|
|
|
6831
6814
|
zIndex: 199
|
|
6832
6815
|
}
|
|
6833
6816
|
),
|
|
6834
|
-
/* @__PURE__ */ (0,
|
|
6817
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
6835
6818
|
TRONModal,
|
|
6836
6819
|
{
|
|
6837
6820
|
isOpen: TRONIsOpen && (TRONType == "login" && !overview && !token || TRONType == "bind" && !!token && !!overview),
|
|
@@ -6841,7 +6824,7 @@ function BusinessProvider({ children }) {
|
|
|
6841
6824
|
zIndex: 199
|
|
6842
6825
|
}
|
|
6843
6826
|
),
|
|
6844
|
-
/* @__PURE__ */ (0,
|
|
6827
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
6845
6828
|
TONModal,
|
|
6846
6829
|
{
|
|
6847
6830
|
isOpen: TONIsOpen && (TONType == "login" && !overview && !token || TONType == "bind" && !!token && !!overview),
|
|
@@ -6851,7 +6834,7 @@ function BusinessProvider({ children }) {
|
|
|
6851
6834
|
zIndex: 199
|
|
6852
6835
|
}
|
|
6853
6836
|
),
|
|
6854
|
-
/* @__PURE__ */ (0,
|
|
6837
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
6855
6838
|
BTCModal,
|
|
6856
6839
|
{
|
|
6857
6840
|
isOpen: BTCIsOpen && (BTCType == "login" && !overview && !token || BTCType == "bind" && !!token && !!overview),
|
|
@@ -6861,7 +6844,7 @@ function BusinessProvider({ children }) {
|
|
|
6861
6844
|
zIndex: 199
|
|
6862
6845
|
}
|
|
6863
6846
|
),
|
|
6864
|
-
/* @__PURE__ */ (0,
|
|
6847
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
6865
6848
|
CEXBindModal,
|
|
6866
6849
|
{
|
|
6867
6850
|
isOpen: CEXIsOpen && (!!token && !!overview),
|
|
@@ -6870,7 +6853,7 @@ function BusinessProvider({ children }) {
|
|
|
6870
6853
|
zIndex: 199
|
|
6871
6854
|
}
|
|
6872
6855
|
),
|
|
6873
|
-
/* @__PURE__ */ (0,
|
|
6856
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
6874
6857
|
WalletModal,
|
|
6875
6858
|
{
|
|
6876
6859
|
isOpen: WalletModalStore.isOpen && (WalletModalStore.type == "login" && !overview && !token || WalletModalStore.type == "bind" && !!token && !!overview),
|
|
@@ -6885,14 +6868,14 @@ function BusinessProvider({ children }) {
|
|
|
6885
6868
|
}
|
|
6886
6869
|
|
|
6887
6870
|
// src/context/index.tsx
|
|
6888
|
-
var
|
|
6871
|
+
var import_jsx_runtime93 = require("react/jsx-runtime");
|
|
6889
6872
|
var Providers = ({ children }) => {
|
|
6890
|
-
return /* @__PURE__ */ (0,
|
|
6873
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(ToastProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(ModalProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(BusinessProvider, { children }) }) });
|
|
6891
6874
|
};
|
|
6892
6875
|
var context_default = Providers;
|
|
6893
6876
|
|
|
6894
6877
|
// src/hooks/useWalletInit.ts
|
|
6895
|
-
var
|
|
6878
|
+
var import_react38 = require("react");
|
|
6896
6879
|
|
|
6897
6880
|
// src/utils/wallet.ts
|
|
6898
6881
|
var sendMessage = ({ method, data, resolve, reject, timeout }) => {
|
|
@@ -6925,11 +6908,11 @@ function useWalletInit({
|
|
|
6925
6908
|
}) {
|
|
6926
6909
|
const { endpoints, token, overview, setWallet, wallet, appid, locale, refreshOverview } = useLocalStore_default();
|
|
6927
6910
|
const { setWalletReady, walletReady } = useStore_default();
|
|
6928
|
-
const iframeReadyRef = (0,
|
|
6929
|
-
(0,
|
|
6911
|
+
const iframeReadyRef = (0, import_react38.useRef)(walletReady);
|
|
6912
|
+
(0, import_react38.useEffect)(() => {
|
|
6930
6913
|
setWallet(config);
|
|
6931
6914
|
}, [config]);
|
|
6932
|
-
(0,
|
|
6915
|
+
(0, import_react38.useEffect)(() => {
|
|
6933
6916
|
matchlog_default.log("sdk.mpc.status", walletReady, iframeReadyRef.current);
|
|
6934
6917
|
iframeReadyRef.current = walletReady;
|
|
6935
6918
|
if (iframeReadyRef.current) {
|
|
@@ -6946,7 +6929,7 @@ function useWalletInit({
|
|
|
6946
6929
|
onReady();
|
|
6947
6930
|
}
|
|
6948
6931
|
}, [walletReady]);
|
|
6949
|
-
(0,
|
|
6932
|
+
(0, import_react38.useEffect)(() => {
|
|
6950
6933
|
if (!endpoints.auth || !appid || !token || !config) {
|
|
6951
6934
|
const existingIframe = getWalletIframe();
|
|
6952
6935
|
if (existingIframe) {
|
|
@@ -7046,7 +7029,7 @@ function useWalletInit({
|
|
|
7046
7029
|
}
|
|
7047
7030
|
}
|
|
7048
7031
|
}, [endpoints.auth, appid, token, config]);
|
|
7049
|
-
(0,
|
|
7032
|
+
(0, import_react38.useEffect)(() => {
|
|
7050
7033
|
const messageHandle = async (e) => {
|
|
7051
7034
|
if (e.origin !== endpoints.auth.substring(0, endpoints.auth.length - 1)) {
|
|
7052
7035
|
return;
|
|
@@ -7127,7 +7110,7 @@ function useWalletInit({
|
|
|
7127
7110
|
}
|
|
7128
7111
|
|
|
7129
7112
|
// src/hooks/useInit.tsx
|
|
7130
|
-
var
|
|
7113
|
+
var import_react39 = require("react");
|
|
7131
7114
|
function useInit({
|
|
7132
7115
|
theme,
|
|
7133
7116
|
appid,
|
|
@@ -7147,23 +7130,23 @@ function useInit({
|
|
|
7147
7130
|
locale: realLocale
|
|
7148
7131
|
} = useLocalStore_default();
|
|
7149
7132
|
const walletModalStore = useWalletModalStore();
|
|
7150
|
-
const overviewLoadingRef = (0,
|
|
7133
|
+
const overviewLoadingRef = (0, import_react39.useRef)(false);
|
|
7151
7134
|
const searchParams = new URLSearchParams(window.location.search);
|
|
7152
7135
|
const matchToken = searchParams.get("matchToken");
|
|
7153
7136
|
const realEndpoints = endpoints || env_default.endpoints;
|
|
7154
|
-
(0,
|
|
7137
|
+
(0, import_react39.useEffect)(() => {
|
|
7155
7138
|
setTheme(theme);
|
|
7156
7139
|
}, [theme]);
|
|
7157
|
-
(0,
|
|
7140
|
+
(0, import_react39.useEffect)(() => {
|
|
7158
7141
|
setAppid(appid);
|
|
7159
7142
|
}, [appid]);
|
|
7160
|
-
(0,
|
|
7143
|
+
(0, import_react39.useEffect)(() => {
|
|
7161
7144
|
setEndpoints(realEndpoints);
|
|
7162
7145
|
}, [realEndpoints]);
|
|
7163
|
-
(0,
|
|
7146
|
+
(0, import_react39.useEffect)(() => {
|
|
7164
7147
|
setLocale(locale || "en");
|
|
7165
7148
|
}, [locale]);
|
|
7166
|
-
(0,
|
|
7149
|
+
(0, import_react39.useEffect)(() => {
|
|
7167
7150
|
if (matchToken) {
|
|
7168
7151
|
const tokenData = JSON.parse(atob(matchToken));
|
|
7169
7152
|
if (tokenData && tokenData.mid && tokenData.token) {
|
|
@@ -7174,7 +7157,7 @@ function useInit({
|
|
|
7174
7157
|
}
|
|
7175
7158
|
}
|
|
7176
7159
|
}, [matchToken]);
|
|
7177
|
-
(0,
|
|
7160
|
+
(0, import_react39.useEffect)(() => {
|
|
7178
7161
|
const onLoginMessage = (event) => {
|
|
7179
7162
|
const res = event.data;
|
|
7180
7163
|
if (res.event === "login" && res.data && (res.data.token || res.data.token_type && res.data.access_token)) {
|
|
@@ -7211,7 +7194,7 @@ function useInit({
|
|
|
7211
7194
|
overviewLoadingRef.current = false;
|
|
7212
7195
|
}
|
|
7213
7196
|
};
|
|
7214
|
-
(0,
|
|
7197
|
+
(0, import_react39.useEffect)(() => {
|
|
7215
7198
|
if (token) {
|
|
7216
7199
|
loadOverview();
|
|
7217
7200
|
}
|
|
@@ -7242,8 +7225,8 @@ function useInit({
|
|
|
7242
7225
|
}
|
|
7243
7226
|
|
|
7244
7227
|
// src/MatchContext.tsx
|
|
7245
|
-
var
|
|
7246
|
-
var
|
|
7228
|
+
var import_react_query8 = require("@tanstack/react-query");
|
|
7229
|
+
var import_react_intl21 = require("react-intl");
|
|
7247
7230
|
|
|
7248
7231
|
// src/i18n/en.json
|
|
7249
7232
|
var en_default = {
|
|
@@ -7308,7 +7291,6 @@ var en_default = {
|
|
|
7308
7291
|
copied: "Copied",
|
|
7309
7292
|
receiveQrcode: "Receive by scanning the QR code",
|
|
7310
7293
|
copyAddress: "Copy Address",
|
|
7311
|
-
importSuccess: "Imported successfully",
|
|
7312
7294
|
tokenSmartContract: "Token Smart Contract",
|
|
7313
7295
|
tokenSmartContractPlaceholder: "Enter the Token Smart Contract.",
|
|
7314
7296
|
tokenSymbol: "Token Symbol",
|
|
@@ -7317,7 +7299,13 @@ var en_default = {
|
|
|
7317
7299
|
tokenDecimalsPlaceholder: "Enter the Decimals.",
|
|
7318
7300
|
import: "Import",
|
|
7319
7301
|
receive: "Receive",
|
|
7320
|
-
customizedToken: "Customized Token"
|
|
7302
|
+
customizedToken: "Customized Token",
|
|
7303
|
+
noMoreRecords: "There is no more Records here!",
|
|
7304
|
+
noRecords: "No Records here!",
|
|
7305
|
+
close: "Close",
|
|
7306
|
+
back: "Back",
|
|
7307
|
+
importSuccess: "Import Token Successfully",
|
|
7308
|
+
importFail: "Failed to import Token"
|
|
7321
7309
|
};
|
|
7322
7310
|
|
|
7323
7311
|
// src/i18n/zh.json
|
|
@@ -7383,7 +7371,6 @@ var zh_default = {
|
|
|
7383
7371
|
copied: "\u5DF2\u590D\u5236",
|
|
7384
7372
|
receiveQrcode: "\u626B\u63CF QR \u7801\u63A5\u6536",
|
|
7385
7373
|
copyAddress: "\u590D\u5236\u5730\u5740",
|
|
7386
|
-
importSuccess: "\u5BFC\u5165\u6210\u529F",
|
|
7387
7374
|
tokenSmartContract: "\u4EE3\u5E01\u667A\u80FD\u5408\u7EA6",
|
|
7388
7375
|
tokenSmartContractPlaceholder: "\u8BF7\u8F93\u5165\u4EE3\u5E01\u667A\u80FD\u5408\u7EA6\u3002",
|
|
7389
7376
|
tokenSymbol: "\u4EE3\u5E01\u7B26\u53F7",
|
|
@@ -7392,7 +7379,13 @@ var zh_default = {
|
|
|
7392
7379
|
tokenDecimalsPlaceholder: "\u8BF7\u8F93\u5165\u5C0F\u6570\u4F4D\u6570\u3002",
|
|
7393
7380
|
import: "\u5BFC\u5165",
|
|
7394
7381
|
receive: "\u63A5\u6536",
|
|
7395
|
-
customizedToken: "\u81EA\u5B9A\u4E49\u4EE3\u5E01"
|
|
7382
|
+
customizedToken: "\u81EA\u5B9A\u4E49\u4EE3\u5E01",
|
|
7383
|
+
noMoreRecords: "\u6CA1\u6709\u66F4\u591A\u4EA4\u6613\u8BB0\u5F55\u4E86\uFF01",
|
|
7384
|
+
noRecords: "\u6682\u65E0\u4EA4\u6613\u8BB0\u5F55\uFF01",
|
|
7385
|
+
close: "\u5173\u95ED",
|
|
7386
|
+
back: "\u8FD4\u56DE",
|
|
7387
|
+
importSuccess: "\u6210\u529F\u5BFC\u5165\u4EE3\u5E01",
|
|
7388
|
+
importFail: "\u5BFC\u5165\u4EE3\u5E01\u5931\u8D25"
|
|
7396
7389
|
};
|
|
7397
7390
|
|
|
7398
7391
|
// src/i18n/tw.json
|
|
@@ -7458,7 +7451,6 @@ var tw_default = {
|
|
|
7458
7451
|
copied: "\u5DF2\u8907\u88FD",
|
|
7459
7452
|
receiveQrcode: "\u6383\u63CF QR \u78BC\u63A5\u6536",
|
|
7460
7453
|
copyAddress: "\u8907\u88FD\u5730\u5740",
|
|
7461
|
-
importSuccess: "\u5C0E\u5165\u6210\u529F",
|
|
7462
7454
|
tokenSmartContract: "\u4EE3\u5E63\u667A\u80FD\u5408\u7D04",
|
|
7463
7455
|
tokenSmartContractPlaceholder: "\u8ACB\u8F38\u5165\u4EE3\u5E63\u667A\u80FD\u5408\u7D04\u3002",
|
|
7464
7456
|
tokenSymbol: "\u4EE3\u5E63\u7B26\u865F",
|
|
@@ -7467,7 +7459,13 @@ var tw_default = {
|
|
|
7467
7459
|
tokenDecimalsPlaceholder: "\u8ACB\u8F38\u5165\u5C0F\u6578\u4F4D\u6578\u3002",
|
|
7468
7460
|
import: "\u5C0E\u5165",
|
|
7469
7461
|
receive: "\u63A5\u6536",
|
|
7470
|
-
customizedToken: "\u81EA\u5B9A\u7FA9\u4EE3\u5E63"
|
|
7462
|
+
customizedToken: "\u81EA\u5B9A\u7FA9\u4EE3\u5E63",
|
|
7463
|
+
noMoreRecords: "\u6C92\u6709\u66F4\u591A\u4EA4\u6613\u8A18\u9304\u4E86\uFF01",
|
|
7464
|
+
noRecords: "\u66AB\u7121\u4EA4\u6613\u8A18\u9304\uFF01",
|
|
7465
|
+
close: "\u95DC\u9589",
|
|
7466
|
+
back: "\u8FD4\u56DE",
|
|
7467
|
+
importSuccess: "\u6210\u529F\u532F\u5165\u4EE3\u5E63",
|
|
7468
|
+
importFail: "\u532F\u5165\u4EE3\u5E63\u5931\u6557"
|
|
7471
7469
|
};
|
|
7472
7470
|
|
|
7473
7471
|
// src/i18n/fr.json
|
|
@@ -7533,7 +7531,6 @@ var fr_default = {
|
|
|
7533
7531
|
copied: "Copi\xE9",
|
|
7534
7532
|
receiveQrcode: "Recevoir en scannant le code QR",
|
|
7535
7533
|
copyAddress: "Copier l'adresse",
|
|
7536
|
-
importSuccess: "Import\xE9 avec succ\xE8s",
|
|
7537
7534
|
tokenSmartContract: "Contrat intelligent du Token",
|
|
7538
7535
|
tokenSmartContractPlaceholder: "Entrez le contrat intelligent du Token.",
|
|
7539
7536
|
tokenSymbol: "Symbole du Token",
|
|
@@ -7542,7 +7539,13 @@ var fr_default = {
|
|
|
7542
7539
|
tokenDecimalsPlaceholder: "Entrez les d\xE9cimales.",
|
|
7543
7540
|
import: "Importer",
|
|
7544
7541
|
receive: "Recevoir",
|
|
7545
|
-
customizedToken: "Token personnalis\xE9"
|
|
7542
|
+
customizedToken: "Token personnalis\xE9",
|
|
7543
|
+
noMoreRecords: "Il n'y a plus d'enregistrements ici !",
|
|
7544
|
+
noRecords: "Il n'y a aucun enregistrement ici !",
|
|
7545
|
+
close: "Fermer",
|
|
7546
|
+
back: "Retour",
|
|
7547
|
+
importSuccess: "Importation du jeton r\xE9ussie",
|
|
7548
|
+
importFail: "\xC9chec de l'importation du jeton"
|
|
7546
7549
|
};
|
|
7547
7550
|
|
|
7548
7551
|
// src/i18n/ja.json
|
|
@@ -7608,7 +7611,6 @@ var ja_default = {
|
|
|
7608
7611
|
copied: "\u30B3\u30D4\u30FC\u3057\u307E\u3057\u305F",
|
|
7609
7612
|
receiveQrcode: "QR\u30B3\u30FC\u30C9\u3092\u30B9\u30AD\u30E3\u30F3\u3057\u3066\u53D7\u3051\u53D6\u308B",
|
|
7610
7613
|
copyAddress: "\u30A2\u30C9\u30EC\u30B9\u3092\u30B3\u30D4\u30FC",
|
|
7611
|
-
importSuccess: "\u30A4\u30F3\u30DD\u30FC\u30C8\u306B\u6210\u529F\u3057\u307E\u3057\u305F",
|
|
7612
7614
|
tokenSmartContract: "\u30C8\u30FC\u30AF\u30F3\u306E\u30B9\u30DE\u30FC\u30C8\u30B3\u30F3\u30C8\u30E9\u30AF\u30C8",
|
|
7613
7615
|
tokenSmartContractPlaceholder: "\u30C8\u30FC\u30AF\u30F3\u306E\u30B9\u30DE\u30FC\u30C8\u30B3\u30F3\u30C8\u30E9\u30AF\u30C8\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044\u3002",
|
|
7614
7616
|
tokenSymbol: "\u30C8\u30FC\u30AF\u30F3\u30B7\u30F3\u30DC\u30EB",
|
|
@@ -7617,7 +7619,13 @@ var ja_default = {
|
|
|
7617
7619
|
tokenDecimalsPlaceholder: "\u5C0F\u6570\u70B9\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044\u3002",
|
|
7618
7620
|
import: "\u30A4\u30F3\u30DD\u30FC\u30C8",
|
|
7619
7621
|
receive: "\u53D7\u3051\u53D6\u308B",
|
|
7620
|
-
customizedToken: "\u30AB\u30B9\u30BF\u30DE\u30A4\u30BA\u30C8\u30FC\u30AF\u30F3"
|
|
7622
|
+
customizedToken: "\u30AB\u30B9\u30BF\u30DE\u30A4\u30BA\u30C8\u30FC\u30AF\u30F3",
|
|
7623
|
+
noMoreRecords: "\u3053\u308C\u4EE5\u4E0A\u306E\u8A18\u9332\u306F\u3042\u308A\u307E\u305B\u3093\uFF01",
|
|
7624
|
+
noRecords: "\u8A18\u9332\u304C\u3042\u308A\u307E\u305B\u3093\uFF01",
|
|
7625
|
+
close: "\u9589\u3058\u308B",
|
|
7626
|
+
back: "\u623B\u308B",
|
|
7627
|
+
importSuccess: "\u30C8\u30FC\u30AF\u30F3\u306E\u30A4\u30F3\u30DD\u30FC\u30C8\u306B\u6210\u529F\u3057\u307E\u3057\u305F",
|
|
7628
|
+
importFail: "\u30C8\u30FC\u30AF\u30F3\u306E\u30A4\u30F3\u30DD\u30FC\u30C8\u306B\u5931\u6557\u3057\u307E\u3057\u305F"
|
|
7621
7629
|
};
|
|
7622
7630
|
|
|
7623
7631
|
// src/i18n/ko.json
|
|
@@ -7683,7 +7691,6 @@ var ko_default = {
|
|
|
7683
7691
|
copied: "\uBCF5\uC0AC\uB428",
|
|
7684
7692
|
receiveQrcode: "QR \uCF54\uB4DC\uB97C \uC2A4\uCE94\uD558\uC5EC \uBC1B\uAE30",
|
|
7685
7693
|
copyAddress: "\uC8FC\uC18C \uBCF5\uC0AC",
|
|
7686
|
-
importSuccess: "\uC131\uACF5\uC801\uC73C\uB85C \uAC00\uC838\uC654\uC2B5\uB2C8\uB2E4.",
|
|
7687
7694
|
tokenSmartContract: "\uD1A0\uD070 \uC2A4\uB9C8\uD2B8 \uCEE8\uD2B8\uB799\uD2B8",
|
|
7688
7695
|
tokenSmartContractPlaceholder: "\uD1A0\uD070 \uC2A4\uB9C8\uD2B8 \uCEE8\uD2B8\uB799\uD2B8\uB97C \uC785\uB825\uD558\uC138\uC694.",
|
|
7689
7696
|
tokenSymbol: "\uD1A0\uD070 \uC2EC\uBCFC",
|
|
@@ -7692,7 +7699,13 @@ var ko_default = {
|
|
|
7692
7699
|
tokenDecimalsPlaceholder: "\uC18C\uC218\uC810 \uC790\uB9AC\uC218\uB97C \uC785\uB825\uD558\uC138\uC694.",
|
|
7693
7700
|
import: "\uAC00\uC838\uC624\uAE30",
|
|
7694
7701
|
receive: "\uBC1B\uAE30",
|
|
7695
|
-
customizedToken: "\uB9DE\uCDA4\uD615 \uD1A0\uD070"
|
|
7702
|
+
customizedToken: "\uB9DE\uCDA4\uD615 \uD1A0\uD070",
|
|
7703
|
+
noMoreRecords: "\uC5EC\uAE30\uC5D0 \uB354 \uC774\uC0C1 \uAE30\uB85D\uC774 \uC5C6\uC2B5\uB2C8\uB2E4!",
|
|
7704
|
+
noRecords: "\uC5EC\uAE30\uC5D0 \uAE30\uB85D\uC774 \uC5C6\uC2B5\uB2C8\uB2E4!",
|
|
7705
|
+
close: "\uB2EB\uAE30",
|
|
7706
|
+
back: "\uB4A4\uB85C",
|
|
7707
|
+
importSuccess: "\uD1A0\uD070\uC744 \uC131\uACF5\uC801\uC73C\uB85C \uAC00\uC838\uC654\uC2B5\uB2C8\uB2E4",
|
|
7708
|
+
importFail: "\uD1A0\uD070 \uAC00\uC838\uC624\uAE30\uC5D0 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4"
|
|
7696
7709
|
};
|
|
7697
7710
|
|
|
7698
7711
|
// src/i18n/vi.json
|
|
@@ -7758,7 +7771,6 @@ var vi_default = {
|
|
|
7758
7771
|
copied: "\u0110\xE3 sao ch\xE9p",
|
|
7759
7772
|
receiveQrcode: "Nh\u1EADn b\u1EB1ng c\xE1ch qu\xE9t m\xE3 QR",
|
|
7760
7773
|
copyAddress: "Sao ch\xE9p \u0111\u1ECBa ch\u1EC9",
|
|
7761
|
-
importSuccess: "Nh\u1EADp th\xE0nh c\xF4ng",
|
|
7762
7774
|
tokenSmartContract: "H\u1EE3p \u0111\u1ED3ng th\xF4ng minh Token",
|
|
7763
7775
|
tokenSmartContractPlaceholder: "Nh\u1EADp h\u1EE3p \u0111\u1ED3ng th\xF4ng minh Token.",
|
|
7764
7776
|
tokenSymbol: "K\xFD hi\u1EC7u Token",
|
|
@@ -7767,7 +7779,13 @@ var vi_default = {
|
|
|
7767
7779
|
tokenDecimalsPlaceholder: "Nh\u1EADp s\u1ED1 th\u1EADp ph\xE2n.",
|
|
7768
7780
|
import: "Nh\u1EADp",
|
|
7769
7781
|
receive: "Nh\u1EADn",
|
|
7770
|
-
customizedToken: "Token t\xF9y ch\u1EC9nh"
|
|
7782
|
+
customizedToken: "Token t\xF9y ch\u1EC9nh",
|
|
7783
|
+
noMoreRecords: "Kh\xF4ng c\xF2n b\u1EA3n ghi n\xE0o \u1EDF \u0111\xE2y!",
|
|
7784
|
+
noRecords: "Kh\xF4ng c\xF3 b\u1EA3n ghi n\xE0o \u1EDF \u0111\xE2y!",
|
|
7785
|
+
close: "\u0110\xF3ng",
|
|
7786
|
+
back: "Quay l\u1EA1i",
|
|
7787
|
+
importSuccess: "Nh\u1EADp Token th\xE0nh c\xF4ng",
|
|
7788
|
+
importFail: "Kh\xF4ng th\u1EC3 nh\u1EADp Token"
|
|
7771
7789
|
};
|
|
7772
7790
|
|
|
7773
7791
|
// src/i18n/es.json
|
|
@@ -7833,7 +7851,6 @@ var es_default = {
|
|
|
7833
7851
|
copied: "Copiado",
|
|
7834
7852
|
receiveQrcode: "Recibir escaneando el c\xF3digo QR",
|
|
7835
7853
|
copyAddress: "Copiar direcci\xF3n",
|
|
7836
|
-
importSuccess: "Importado con \xE9xito",
|
|
7837
7854
|
tokenSmartContract: "Contrato inteligente del Token",
|
|
7838
7855
|
tokenSmartContractPlaceholder: "Ingrese el contrato inteligente del Token.",
|
|
7839
7856
|
tokenSymbol: "S\xEDmbolo del Token",
|
|
@@ -7842,7 +7859,13 @@ var es_default = {
|
|
|
7842
7859
|
tokenDecimalsPlaceholder: "Ingrese los decimales.",
|
|
7843
7860
|
import: "Importar",
|
|
7844
7861
|
receive: "Recibir",
|
|
7845
|
-
customizedToken: "Token personalizado"
|
|
7862
|
+
customizedToken: "Token personalizado",
|
|
7863
|
+
noMoreRecords: "\xA1No hay m\xE1s registros aqu\xED!",
|
|
7864
|
+
noRecords: "\xA1No hay registros aqu\xED!",
|
|
7865
|
+
close: "Cerrar",
|
|
7866
|
+
back: "Atr\xE1s",
|
|
7867
|
+
importSuccess: "Token importado con \xE9xito",
|
|
7868
|
+
importFail: "Error al importar el token"
|
|
7846
7869
|
};
|
|
7847
7870
|
|
|
7848
7871
|
// src/i18n/pt.json
|
|
@@ -7908,7 +7931,6 @@ var pt_default = {
|
|
|
7908
7931
|
copied: "Copiado",
|
|
7909
7932
|
receiveQrcode: "Receber escaneando o c\xF3digo QR",
|
|
7910
7933
|
copyAddress: "Copiar endere\xE7o",
|
|
7911
|
-
importSuccess: "Importado com sucesso",
|
|
7912
7934
|
tokenSmartContract: "Contrato inteligente do Token",
|
|
7913
7935
|
tokenSmartContractPlaceholder: "Digite o contrato inteligente do Token.",
|
|
7914
7936
|
tokenSymbol: "S\xEDmbolo do Token",
|
|
@@ -7917,7 +7939,13 @@ var pt_default = {
|
|
|
7917
7939
|
tokenDecimalsPlaceholder: "Digite os decimais.",
|
|
7918
7940
|
import: "Importar",
|
|
7919
7941
|
receive: "Receber",
|
|
7920
|
-
customizedToken: "Token personalizado"
|
|
7942
|
+
customizedToken: "Token personalizado",
|
|
7943
|
+
noMoreRecords: "N\xE3o h\xE1 mais registros aqui!",
|
|
7944
|
+
noRecords: "N\xE3o h\xE1 registros aqui!",
|
|
7945
|
+
close: "Fechar",
|
|
7946
|
+
back: "Voltar",
|
|
7947
|
+
importSuccess: "Token importado com sucesso",
|
|
7948
|
+
importFail: "Falha ao importar o token"
|
|
7921
7949
|
};
|
|
7922
7950
|
|
|
7923
7951
|
// src/i18n/index.ts
|
|
@@ -7934,9 +7962,9 @@ var messages = {
|
|
|
7934
7962
|
};
|
|
7935
7963
|
|
|
7936
7964
|
// src/MatchContext.tsx
|
|
7937
|
-
var
|
|
7938
|
-
var queryClient = new
|
|
7939
|
-
var MatchContext = (0,
|
|
7965
|
+
var import_jsx_runtime94 = require("react/jsx-runtime");
|
|
7966
|
+
var queryClient = new import_react_query8.QueryClient();
|
|
7967
|
+
var MatchContext = (0, import_react40.createContext)(void 0);
|
|
7940
7968
|
var MatchProvider = ({
|
|
7941
7969
|
children,
|
|
7942
7970
|
appid,
|
|
@@ -7956,7 +7984,7 @@ var MatchProvider = ({
|
|
|
7956
7984
|
useWalletInit({
|
|
7957
7985
|
config: wallet
|
|
7958
7986
|
});
|
|
7959
|
-
return /* @__PURE__ */ (0,
|
|
7987
|
+
return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_react_intl21.IntlProvider, { locale: realLocale, messages: messages[realLocale], children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_react_query8.QueryClientProvider, { client: queryClient, children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
7960
7988
|
MatchContext.Provider,
|
|
7961
7989
|
{
|
|
7962
7990
|
value: {
|
|
@@ -7967,12 +7995,12 @@ var MatchProvider = ({
|
|
|
7967
7995
|
theme,
|
|
7968
7996
|
locale: realLocale
|
|
7969
7997
|
},
|
|
7970
|
-
children: /* @__PURE__ */ (0,
|
|
7998
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(context_default, { children })
|
|
7971
7999
|
}
|
|
7972
8000
|
) }) });
|
|
7973
8001
|
};
|
|
7974
8002
|
var useMatch = () => {
|
|
7975
|
-
const context = (0,
|
|
8003
|
+
const context = (0, import_react40.useContext)(MatchContext);
|
|
7976
8004
|
if (context === void 0) {
|
|
7977
8005
|
throw new Error("useMatch must be used within a MatchProvider");
|
|
7978
8006
|
}
|
|
@@ -7998,10 +8026,10 @@ __export(bind_exports, {
|
|
|
7998
8026
|
useBindInfo: () => useBindInfo,
|
|
7999
8027
|
useBindList: () => useBindList
|
|
8000
8028
|
});
|
|
8001
|
-
var
|
|
8029
|
+
var import_react_query9 = require("@tanstack/react-query");
|
|
8002
8030
|
function useBindList(options) {
|
|
8003
8031
|
const { isLogin } = useUserInfo();
|
|
8004
|
-
return (0,
|
|
8032
|
+
return (0, import_react_query9.useQuery)({
|
|
8005
8033
|
queryKey: ["bindList"],
|
|
8006
8034
|
enabled: isLogin,
|
|
8007
8035
|
queryFn: async () => {
|
|
@@ -8013,7 +8041,7 @@ function useBindList(options) {
|
|
|
8013
8041
|
}
|
|
8014
8042
|
function useBindInfo(options) {
|
|
8015
8043
|
const { isLogin } = useUserInfo();
|
|
8016
|
-
return (0,
|
|
8044
|
+
return (0, import_react_query9.useQuery)({
|
|
8017
8045
|
queryKey: ["bindInfo"],
|
|
8018
8046
|
enabled: isLogin,
|
|
8019
8047
|
queryFn: async () => {
|
|
@@ -8030,10 +8058,10 @@ __export(poh_exports, {
|
|
|
8030
8058
|
usePohList: () => usePohList,
|
|
8031
8059
|
verifyPohApi: () => verifyPohApi
|
|
8032
8060
|
});
|
|
8033
|
-
var
|
|
8061
|
+
var import_react_query10 = require("@tanstack/react-query");
|
|
8034
8062
|
function usePohList(options) {
|
|
8035
8063
|
const { isLogin } = useUserInfo();
|
|
8036
|
-
return (0,
|
|
8064
|
+
return (0, import_react_query10.useQuery)({
|
|
8037
8065
|
queryKey: ["pohList"],
|
|
8038
8066
|
enabled: isLogin,
|
|
8039
8067
|
queryFn: async () => {
|
|
@@ -8059,8 +8087,8 @@ __export(chains_exports, {
|
|
|
8059
8087
|
});
|
|
8060
8088
|
|
|
8061
8089
|
// src/config/chains/MatchMain.ts
|
|
8062
|
-
var
|
|
8063
|
-
var matchMain = /* @__PURE__ */ (0,
|
|
8090
|
+
var import_viem13 = require("viem");
|
|
8091
|
+
var matchMain = /* @__PURE__ */ (0, import_viem13.defineChain)({
|
|
8064
8092
|
//定义match链
|
|
8065
8093
|
id: 698,
|
|
8066
8094
|
name: "Matchain",
|
|
@@ -8087,8 +8115,8 @@ var matchMain = /* @__PURE__ */ (0, import_viem12.defineChain)({
|
|
|
8087
8115
|
});
|
|
8088
8116
|
|
|
8089
8117
|
// src/config/chains/MatchTest.ts
|
|
8090
|
-
var
|
|
8091
|
-
var matchTest = /* @__PURE__ */ (0,
|
|
8118
|
+
var import_viem14 = require("viem");
|
|
8119
|
+
var matchTest = /* @__PURE__ */ (0, import_viem14.defineChain)({
|
|
8092
8120
|
//定义matchTest链
|
|
8093
8121
|
id: 699,
|
|
8094
8122
|
name: "MatchTest",
|