@wheelx-widget/widget 0.1.16 → 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 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
@@ -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();