@matchain/matchid-sdk-react 0.1.42-alpha.5 → 0.1.42-alpha.7
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-GEM2V3W6.mjs → chunk-3IT55D2W.mjs} +53 -12
- package/dist/chunk-3IT55D2W.mjs.map +1 -0
- package/dist/{chunk-FZUZ63FZ.mjs → chunk-YUGXHHVO.mjs} +2 -2
- package/dist/components/index.d.mts +1 -1
- package/dist/components/index.d.ts +1 -1
- package/dist/components/index.js +20 -5
- 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.map +1 -1
- package/dist/hooks/index.mjs +1 -1
- package/dist/{index-CGpyQlbI.d.mts → index-CmH9iRLd.d.mts} +12 -8
- package/dist/{index--yBVwkf9.d.ts → index-DY_ReBra.d.ts} +12 -8
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +47 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -2
- package/package.json +1 -1
- package/dist/chunk-GEM2V3W6.mjs.map +0 -1
- /package/dist/{chunk-FZUZ63FZ.mjs.map → chunk-YUGXHHVO.mjs.map} +0 -0
package/dist/hooks/index.mjs
CHANGED
|
@@ -48,25 +48,29 @@ declare function PasswordModal({ title, isOpen, onSuccess, chainType, recoveryTy
|
|
|
48
48
|
recoveryType?: `${RecoveryType}`;
|
|
49
49
|
}): react_jsx_runtime.JSX.Element;
|
|
50
50
|
|
|
51
|
-
|
|
51
|
+
type SOLModalProps = ModalWithHeaderProps & {
|
|
52
52
|
type?: 'login' | 'bind' | '';
|
|
53
53
|
onSuccess?: () => void;
|
|
54
|
-
}
|
|
54
|
+
};
|
|
55
|
+
declare function SOLModal(props: SOLModalProps): false | react_jsx_runtime.JSX.Element;
|
|
55
56
|
|
|
56
|
-
|
|
57
|
+
type TRONConnectModalProps = ModalWithHeaderProps & {
|
|
57
58
|
type?: 'login' | 'bind' | '';
|
|
58
59
|
onSuccess?: () => void;
|
|
59
|
-
}
|
|
60
|
+
};
|
|
61
|
+
declare function TRONModal(props: TRONConnectModalProps): false | react_jsx_runtime.JSX.Element;
|
|
60
62
|
|
|
61
|
-
|
|
63
|
+
type TonModalProps = ModalWithHeaderProps & {
|
|
62
64
|
type?: 'login' | 'bind' | '';
|
|
63
65
|
onSuccess?: () => void;
|
|
64
|
-
}
|
|
66
|
+
};
|
|
67
|
+
declare function TONModal(props: TonModalProps): false | react_jsx_runtime.JSX.Element;
|
|
65
68
|
|
|
66
|
-
|
|
69
|
+
type BTCConnectModalProps = ModalWithHeaderProps & {
|
|
67
70
|
type?: 'login' | 'bind' | '';
|
|
68
71
|
onSuccess?: () => void;
|
|
69
|
-
}
|
|
72
|
+
};
|
|
73
|
+
declare function BTCModal(props: BTCConnectModalProps): false | react_jsx_runtime.JSX.Element;
|
|
70
74
|
|
|
71
75
|
declare function Overlay({ isOpen, children, zIndex, }: {
|
|
72
76
|
isOpen?: boolean;
|
|
@@ -48,25 +48,29 @@ declare function PasswordModal({ title, isOpen, onSuccess, chainType, recoveryTy
|
|
|
48
48
|
recoveryType?: `${RecoveryType}`;
|
|
49
49
|
}): react_jsx_runtime.JSX.Element;
|
|
50
50
|
|
|
51
|
-
|
|
51
|
+
type SOLModalProps = ModalWithHeaderProps & {
|
|
52
52
|
type?: 'login' | 'bind' | '';
|
|
53
53
|
onSuccess?: () => void;
|
|
54
|
-
}
|
|
54
|
+
};
|
|
55
|
+
declare function SOLModal(props: SOLModalProps): false | react_jsx_runtime.JSX.Element;
|
|
55
56
|
|
|
56
|
-
|
|
57
|
+
type TRONConnectModalProps = ModalWithHeaderProps & {
|
|
57
58
|
type?: 'login' | 'bind' | '';
|
|
58
59
|
onSuccess?: () => void;
|
|
59
|
-
}
|
|
60
|
+
};
|
|
61
|
+
declare function TRONModal(props: TRONConnectModalProps): false | react_jsx_runtime.JSX.Element;
|
|
60
62
|
|
|
61
|
-
|
|
63
|
+
type TonModalProps = ModalWithHeaderProps & {
|
|
62
64
|
type?: 'login' | 'bind' | '';
|
|
63
65
|
onSuccess?: () => void;
|
|
64
|
-
}
|
|
66
|
+
};
|
|
67
|
+
declare function TONModal(props: TonModalProps): false | react_jsx_runtime.JSX.Element;
|
|
65
68
|
|
|
66
|
-
|
|
69
|
+
type BTCConnectModalProps = ModalWithHeaderProps & {
|
|
67
70
|
type?: 'login' | 'bind' | '';
|
|
68
71
|
onSuccess?: () => void;
|
|
69
|
-
}
|
|
72
|
+
};
|
|
73
|
+
declare function BTCModal(props: BTCConnectModalProps): false | react_jsx_runtime.JSX.Element;
|
|
70
74
|
|
|
71
75
|
declare function Overlay({ isOpen, children, zIndex, }: {
|
|
72
76
|
isOpen?: boolean;
|
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { ReactNode } from 'react';
|
|
2
2
|
import { I as IMatchEvents, a as IEnvConfigType, L as LocaleType, W as WalletConfigType } from './types-CVwZEgQ0.mjs';
|
|
3
|
-
export { i as Components } from './index-
|
|
3
|
+
export { i as Components } from './index-CmH9iRLd.mjs';
|
|
4
4
|
export { i as Hooks } from './index-sOVSnYF4.mjs';
|
|
5
5
|
export { i as Api } from './index-DFZpfAfc.mjs';
|
|
6
6
|
export { i as Chains } from './index-DXRGMAbv.mjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { ReactNode } from 'react';
|
|
2
2
|
import { I as IMatchEvents, a as IEnvConfigType, L as LocaleType, W as WalletConfigType } from './types-CVwZEgQ0.js';
|
|
3
|
-
export { i as Components } from './index
|
|
3
|
+
export { i as Components } from './index-DY_ReBra.js';
|
|
4
4
|
export { i as Hooks } from './index-DKMrpRJC.js';
|
|
5
5
|
export { i as Api } from './index-Ca9nh_8s.js';
|
|
6
6
|
export { i as Chains } from './index-DXRGMAbv.js';
|
package/dist/index.js
CHANGED
|
@@ -3484,7 +3484,10 @@ function WalletContent({
|
|
|
3484
3484
|
try {
|
|
3485
3485
|
setStatus("nonce");
|
|
3486
3486
|
statusRef.current = "nonce";
|
|
3487
|
-
const res = type == "bind" ? await getWalletInitApi({
|
|
3487
|
+
const res = type == "bind" ? await getWalletInitApi({
|
|
3488
|
+
address,
|
|
3489
|
+
type: "SOL"
|
|
3490
|
+
}) : await getWalletNonceApi({ address, type: "SOL" });
|
|
3488
3491
|
if (!isSuccess(res)) {
|
|
3489
3492
|
throw new Error(res.message);
|
|
3490
3493
|
}
|
|
@@ -3588,7 +3591,7 @@ var wallets = [
|
|
|
3588
3591
|
new import_wallet_adapter_wallets.TrustWalletAdapter(),
|
|
3589
3592
|
new import_wallet_adapter_wallets.XDEFIWalletAdapter()
|
|
3590
3593
|
];
|
|
3591
|
-
function
|
|
3594
|
+
function SOLConnectModal({
|
|
3592
3595
|
type = "login",
|
|
3593
3596
|
onSuccess,
|
|
3594
3597
|
...props
|
|
@@ -3600,6 +3603,9 @@ function SOLModal({
|
|
|
3600
3603
|
name: "SOL"
|
|
3601
3604
|
}), children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_wallet_adapter_react.ConnectionProvider, { endpoint: (0, import_web3.clusterApiUrl)("devnet"), children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_wallet_adapter_react.WalletProvider, { wallets, autoConnect: true, children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_wallet_adapter_react_ui.WalletModalProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(WalletContent, { onSuccess, type }) }) }) }) });
|
|
3602
3605
|
}
|
|
3606
|
+
function SOLModal(props) {
|
|
3607
|
+
return props.isOpen && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(SOLConnectModal, { ...props });
|
|
3608
|
+
}
|
|
3603
3609
|
|
|
3604
3610
|
// src/components/TRONModal/index.tsx
|
|
3605
3611
|
var import_react21 = __toESM(require("react"));
|
|
@@ -3714,7 +3720,7 @@ var useTRONWallet = () => {
|
|
|
3714
3720
|
|
|
3715
3721
|
// src/components/TRONModal/index.tsx
|
|
3716
3722
|
var import_jsx_runtime65 = require("react/jsx-runtime");
|
|
3717
|
-
function
|
|
3723
|
+
function TRONConnectModal({
|
|
3718
3724
|
type = "login",
|
|
3719
3725
|
onSuccess,
|
|
3720
3726
|
...props
|
|
@@ -3865,6 +3871,9 @@ function TRONModal({
|
|
|
3865
3871
|
})
|
|
3866
3872
|
] }) }) });
|
|
3867
3873
|
}
|
|
3874
|
+
function TRONModal(props) {
|
|
3875
|
+
return props.isOpen && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(TRONConnectModal, { ...props, type: "" });
|
|
3876
|
+
}
|
|
3868
3877
|
|
|
3869
3878
|
// src/components/TONModal/index.tsx
|
|
3870
3879
|
var import_react22 = __toESM(require("react"));
|
|
@@ -4023,7 +4032,7 @@ function WalletContent2({
|
|
|
4023
4032
|
}
|
|
4024
4033
|
);
|
|
4025
4034
|
}
|
|
4026
|
-
function
|
|
4035
|
+
function TONConnectModal({
|
|
4027
4036
|
type = "login",
|
|
4028
4037
|
onSuccess,
|
|
4029
4038
|
...props
|
|
@@ -4043,6 +4052,9 @@ function TONModal({
|
|
|
4043
4052
|
}
|
|
4044
4053
|
) });
|
|
4045
4054
|
}
|
|
4055
|
+
function TONModal(props) {
|
|
4056
|
+
return props.isOpen && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(TONConnectModal, { ...props });
|
|
4057
|
+
}
|
|
4046
4058
|
|
|
4047
4059
|
// src/components/BTCModal/index.tsx
|
|
4048
4060
|
var import_react24 = __toESM(require("react"));
|
|
@@ -4230,7 +4242,7 @@ var useBTCWallet = () => {
|
|
|
4230
4242
|
|
|
4231
4243
|
// src/components/BTCModal/index.tsx
|
|
4232
4244
|
var import_jsx_runtime67 = require("react/jsx-runtime");
|
|
4233
|
-
function
|
|
4245
|
+
function BTCConnectModal({
|
|
4234
4246
|
type = "login",
|
|
4235
4247
|
onSuccess,
|
|
4236
4248
|
...props
|
|
@@ -4389,6 +4401,9 @@ function BTCModal({
|
|
|
4389
4401
|
})
|
|
4390
4402
|
] }) }) });
|
|
4391
4403
|
}
|
|
4404
|
+
function BTCModal(props) {
|
|
4405
|
+
return props.isOpen && /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(BTCConnectModal, { ...props });
|
|
4406
|
+
}
|
|
4392
4407
|
|
|
4393
4408
|
// src/components/CEXBindModal/index.tsx
|
|
4394
4409
|
var import_react25 = require("react");
|
|
@@ -5580,13 +5595,39 @@ var MatchProvider = ({
|
|
|
5580
5595
|
type: "UserPasscode"
|
|
5581
5596
|
}
|
|
5582
5597
|
}) => {
|
|
5583
|
-
const {
|
|
5598
|
+
const { login, endpoints: realEndPoints, locale: realLocale } = useInit({
|
|
5584
5599
|
theme,
|
|
5585
5600
|
appid,
|
|
5586
5601
|
events,
|
|
5587
5602
|
endpoints,
|
|
5588
5603
|
locale
|
|
5589
5604
|
});
|
|
5605
|
+
matchlog_default.log("config", {
|
|
5606
|
+
appid,
|
|
5607
|
+
events,
|
|
5608
|
+
theme,
|
|
5609
|
+
endpoints,
|
|
5610
|
+
locale,
|
|
5611
|
+
wallet
|
|
5612
|
+
});
|
|
5613
|
+
(0, import_react30.useEffect)(() => {
|
|
5614
|
+
console.log("appid", appid);
|
|
5615
|
+
}, [appid]);
|
|
5616
|
+
(0, import_react30.useEffect)(() => {
|
|
5617
|
+
console.log("events", events);
|
|
5618
|
+
}, [events]);
|
|
5619
|
+
(0, import_react30.useEffect)(() => {
|
|
5620
|
+
console.log("theme", theme);
|
|
5621
|
+
}, [theme]);
|
|
5622
|
+
(0, import_react30.useEffect)(() => {
|
|
5623
|
+
console.log("endpoints", endpoints);
|
|
5624
|
+
}, [endpoints]);
|
|
5625
|
+
(0, import_react30.useEffect)(() => {
|
|
5626
|
+
console.log("locale", locale);
|
|
5627
|
+
}, [locale]);
|
|
5628
|
+
(0, import_react30.useEffect)(() => {
|
|
5629
|
+
console.log("wallet", wallet);
|
|
5630
|
+
}, [wallet]);
|
|
5590
5631
|
useWalletInit({
|
|
5591
5632
|
config: wallet
|
|
5592
5633
|
});
|