@matchain/matchid-sdk-react 0.1.40-alpha.2 → 0.1.40-alpha.4
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-6RESIJXV.mjs → chunk-GYHBGOEC.mjs} +2 -2
- package/dist/{chunk-3CHFSRD3.mjs → chunk-HL5ODTAH.mjs} +5 -11
- package/dist/chunk-HL5ODTAH.mjs.map +1 -0
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +1 -1
- package/dist/hooks/api/index.d.mts +1 -1
- package/dist/hooks/api/index.d.ts +1 -1
- package/dist/hooks/api/index.js +2 -2
- package/dist/hooks/api/index.js.map +1 -1
- package/dist/hooks/api/index.mjs +2 -2
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/index.mjs +1 -1
- package/dist/{index-mEK7Lcps.d.mts → index-CiM5L42f.d.mts} +2 -1
- package/dist/{index-DlrDrTMk.d.ts → index-DBscX8i6.d.ts} +2 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +4 -10
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -2
- package/package.json +1 -1
- package/dist/chunk-3CHFSRD3.mjs.map +0 -1
- /package/dist/{chunk-6RESIJXV.mjs.map → chunk-GYHBGOEC.mjs.map} +0 -0
package/dist/hooks/index.mjs
CHANGED
|
@@ -11,10 +11,11 @@ interface MyResponseType<T> {
|
|
|
11
11
|
result: T;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
declare const bindCexApi: (
|
|
14
|
+
declare const bindCexApi: (data: {
|
|
15
15
|
cex: string;
|
|
16
16
|
api_key: string;
|
|
17
17
|
api_secret: string;
|
|
18
|
+
api_passphrase?: string;
|
|
18
19
|
}) => Promise<MyResponseType<any>>;
|
|
19
20
|
declare const unBindApi: ({ type }: {
|
|
20
21
|
type: string;
|
|
@@ -11,10 +11,11 @@ interface MyResponseType<T> {
|
|
|
11
11
|
result: T;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
declare const bindCexApi: (
|
|
14
|
+
declare const bindCexApi: (data: {
|
|
15
15
|
cex: string;
|
|
16
16
|
api_key: string;
|
|
17
17
|
api_secret: string;
|
|
18
|
+
api_passphrase?: string;
|
|
18
19
|
}) => Promise<MyResponseType<any>>;
|
|
19
20
|
declare const unBindApi: ({ type }: {
|
|
20
21
|
type: string;
|
package/dist/index.d.mts
CHANGED
|
@@ -2,7 +2,7 @@ import React, { ReactNode } from 'react';
|
|
|
2
2
|
import { I as IMatchEvents, a as IEnvConfigType, L as LocaleType } from './types.d-IS3DBl3p.mjs';
|
|
3
3
|
export { i as Components } from './index-ClQl2MMF.mjs';
|
|
4
4
|
export { i as Hooks } from './index-Dm5o2w2J.mjs';
|
|
5
|
-
export { i as Api } from './index-
|
|
5
|
+
export { i as Api } from './index-CiM5L42f.mjs';
|
|
6
6
|
export { i as Chains } from './index-DXRGMAbv.mjs';
|
|
7
7
|
import 'react/jsx-runtime';
|
|
8
8
|
import 'viem';
|
package/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import React, { ReactNode } from 'react';
|
|
|
2
2
|
import { I as IMatchEvents, a as IEnvConfigType, L as LocaleType } from './types.d-IS3DBl3p.js';
|
|
3
3
|
export { i as Components } from './index-CvCSpU8m.js';
|
|
4
4
|
export { i as Hooks } from './index-BPveUnst.js';
|
|
5
|
-
export { i as Api } from './index-
|
|
5
|
+
export { i as Api } from './index-DBscX8i6.js';
|
|
6
6
|
export { i as Chains } from './index-DXRGMAbv.js';
|
|
7
7
|
import 'react/jsx-runtime';
|
|
8
8
|
import 'viem';
|
package/dist/index.js
CHANGED
|
@@ -1434,11 +1434,11 @@ var getBindInfoApi = () => {
|
|
|
1434
1434
|
method: "GET"
|
|
1435
1435
|
});
|
|
1436
1436
|
};
|
|
1437
|
-
var bindCexApi = (
|
|
1437
|
+
var bindCexApi = (data) => {
|
|
1438
1438
|
return request_default({
|
|
1439
1439
|
url: `/api/v1/cex/subscribe`,
|
|
1440
1440
|
method: "POST",
|
|
1441
|
-
data
|
|
1441
|
+
data
|
|
1442
1442
|
});
|
|
1443
1443
|
};
|
|
1444
1444
|
var unBindApi = ({ type }) => {
|
|
@@ -3937,7 +3937,7 @@ function CEXBindModal({
|
|
|
3937
3937
|
) }),
|
|
3938
3938
|
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)(Field, { label: intl.formatMessage({
|
|
3939
3939
|
id: "CEXBindApiSecretKey"
|
|
3940
|
-
}), error:
|
|
3940
|
+
}), error: !needPassphrase && error, children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
3941
3941
|
Input,
|
|
3942
3942
|
{
|
|
3943
3943
|
value: secret,
|
|
@@ -4084,17 +4084,11 @@ function useWalletInit({
|
|
|
4084
4084
|
document.body.insertBefore(iframe, document.body.firstChild);
|
|
4085
4085
|
window.sendMatchWalletMessage = (method, data, retry = 5, times = 0) => {
|
|
4086
4086
|
try {
|
|
4087
|
-
if (!iframeLoaded) {
|
|
4088
|
-
throw new Error("Wallet not ready");
|
|
4089
|
-
}
|
|
4090
|
-
if (!walletInited) {
|
|
4091
|
-
throw new Error("Wallet not inited");
|
|
4092
|
-
}
|
|
4093
4087
|
if (!document.getElementById("match-wallet")) {
|
|
4094
4088
|
throw new Error("Wallet not found");
|
|
4095
4089
|
}
|
|
4096
4090
|
} catch (error) {
|
|
4097
|
-
console.error(`wallet init[${
|
|
4091
|
+
console.error(`wallet init[${times}/${retry}]`, error);
|
|
4098
4092
|
if (times < retry) {
|
|
4099
4093
|
setTimeout(() => {
|
|
4100
4094
|
window.sendMatchWalletMessage(method, data, retry, times + 1);
|