@wheelx-widget/widget 0.1.15 → 0.1.17
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/index.d.mts +5 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +5 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -74,6 +74,11 @@ interface WidgetConfig {
|
|
|
74
74
|
evmDifferentAddress?: string;
|
|
75
75
|
/** Solana链固定收款异地址(base58格式)。配置后,to网络为Solana链时优先使用此地址 */
|
|
76
76
|
solanaDifferentAddress?: string;
|
|
77
|
+
/**
|
|
78
|
+
* 返佣ID(affiliation code)。
|
|
79
|
+
* 配置后在 quote 请求中优先使用此值;为空时回退到从 URL path 中提取。
|
|
80
|
+
*/
|
|
81
|
+
affiliation?: string;
|
|
77
82
|
}
|
|
78
83
|
|
|
79
84
|
interface WheelXProviderProps {
|
package/dist/index.d.ts
CHANGED
|
@@ -74,6 +74,11 @@ interface WidgetConfig {
|
|
|
74
74
|
evmDifferentAddress?: string;
|
|
75
75
|
/** Solana链固定收款异地址(base58格式)。配置后,to网络为Solana链时优先使用此地址 */
|
|
76
76
|
solanaDifferentAddress?: string;
|
|
77
|
+
/**
|
|
78
|
+
* 返佣ID(affiliation code)。
|
|
79
|
+
* 配置后在 quote 请求中优先使用此值;为空时回退到从 URL path 中提取。
|
|
80
|
+
*/
|
|
81
|
+
affiliation?: string;
|
|
77
82
|
}
|
|
78
83
|
|
|
79
84
|
interface WheelXProviderProps {
|
package/dist/index.js
CHANGED
|
@@ -50371,7 +50371,7 @@ var MobileContent = React5.memo(function MobileContent2({
|
|
|
50371
50371
|
isMobileChainsOpen
|
|
50372
50372
|
]);
|
|
50373
50373
|
return /* @__PURE__ */ jsxRuntime.jsxs(react.VStack, { w: "100%", h: "100%", align: "start", gap: 0, hideFrom: "md", children: [
|
|
50374
|
-
!isMobileChainsOpen &&
|
|
50374
|
+
!isMobileChainsOpen && /* @__PURE__ */ jsxRuntime.jsx(react.Box, { w: "100%", px: 2, pb: 2, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
50375
50375
|
react.HStack,
|
|
50376
50376
|
{
|
|
50377
50377
|
w: "100%",
|
|
@@ -50892,7 +50892,7 @@ var DesktopContent = ({
|
|
|
50892
50892
|
}
|
|
50893
50893
|
),
|
|
50894
50894
|
/* @__PURE__ */ jsxRuntime.jsxs(react.VStack, { flex: 1, py: 3.5, align: "start", h: "100%", w: 0, children: [
|
|
50895
|
-
|
|
50895
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
50896
50896
|
SearchInput,
|
|
50897
50897
|
{
|
|
50898
50898
|
placeholder: "Search for a token or contract address",
|
|
@@ -55861,6 +55861,8 @@ var MainForm = ({ config }) => {
|
|
|
55861
55861
|
const prevAddressRef = React5.useRef(address);
|
|
55862
55862
|
const prevSolanaAddressRef = React5.useRef(solanaWalletAddress);
|
|
55863
55863
|
const isWalletChangingRef = React5.useRef(false);
|
|
55864
|
+
const affiliationRef = React5.useRef(config?.affiliation);
|
|
55865
|
+
affiliationRef.current = config?.affiliation;
|
|
55864
55866
|
const fromAddress = React5.useMemo(() => {
|
|
55865
55867
|
if (fromTokenInfo.isSolana) {
|
|
55866
55868
|
return solanaWalletAddress || "";
|
|
@@ -55933,6 +55935,7 @@ var MainForm = ({ config }) => {
|
|
|
55933
55935
|
}
|
|
55934
55936
|
}
|
|
55935
55937
|
const p = params;
|
|
55938
|
+
p.affiliation = affiliationRef.current || p.affiliation;
|
|
55936
55939
|
const isAutoRefetchRequest = Boolean(isAutoRefetch);
|
|
55937
55940
|
const traceId = createTraceId();
|
|
55938
55941
|
const requestStartedAt = Date.now();
|