有关费用如何工作、不同链上的费用收集以及设置费用钱包的更多详细信息,请参见集成盈利指南。
fee 属性,或提供更多灵活性和自定义选项的高级 feeConfig 配置。
简单费用配置
Advanced fee configuration
For more advanced use cases, you can use thefeeConfig parameter which provides additional customization options:

Example of the advanced fee configuration
WidgetFeeConfig interface
TheWidgetFeeConfig interface provides the following options:
name(optional): Display name for your integration shown in fee detailslogoURI(optional): URL to your logo displayed alongside fee informationfee(optional): Fixed fee percentage (e.g., 0.03 for 3%)showFeePercentage(default: false): Whether to display the fee percentage 中 UIshowFeeTooltip(default: false): Whether to show a tooltip with fee details (requiresnameorfeeTooltipComponent)feeTooltipComponent(optional): Custom React component for the fee tooltipcalculateFee(optional): Function for dynamic fee calculation based on transaction parameters
Only use either
fee or calculateFee - not both. The calculateFee
function allows for dynamic fee calculation based on factors like token pairs,
transaction amounts, user tiers, or any other custom logic.
