@@ -21,7 +21,7 @@ export interface transactionDetails {
2121 destinationAmount : string ;
2222 sourceToken : Currency ; // 0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee denotes native token
2323 destinationToken : Currency ;
24- txData : txData [ ] // tx hashes will be passed here
24+ txData : txData [ ] ; // tx hashes will be passed here
2525 bridgeName ?: string ; // will be passed only in case of cross chain swaps
2626 estimatedServiceTime ?: string ; // (in ms) will be passed only in case of cross chain swaps
2727 dexName ?: string ; // will be passed only in case of same chain swaps
@@ -30,6 +30,11 @@ export interface transactionDetails {
3030export type onNetworkChange = ( network : Network ) => void ;
3131export type onTokenChange = ( token : Currency ) => void ;
3232
33+ export interface FeeParams {
34+ feePercent : number ;
35+ feeTakerAddress : string ;
36+ }
37+
3338export interface WidgetProps {
3439 API_KEY : string ;
3540 provider ?: any ;
@@ -93,10 +98,21 @@ export interface WidgetProps {
9398 // These messages are usually more human readable. Hence on our frontend we check for e.data.message || e.message
9499 onError ?: ( error : any ) => void ;
95100
96- // Will be called when the cross-chain swap or same chain swap transaction is submitted.
101+ // Will be called when the cross-chain swap or same chain swap transaction is submitted.
97102 // This excludes the source and/or destination swap transactions in case of cross-chain swaps and only the bridging transaction will be considered
98103 onSubmit ?: ( data : transactionDetails ) => void ;
99104
105+ /**
106+ * Fee Params to collect fees
107+ *
108+ * feePercent
109+ * The % of fee to be cut from the source input token amount.
110+ * NOTE : Fee Percent can be up to three decimal places and cannot be more than 5%
111+ *
112+ * feeTakerAddress: the address where the fee will be sent to in the transaction
113+ */
114+ feeParams ?: FeeParams ;
115+
100116 locale ?: string ;
101117 title ?: ReactNode | string ;
102118 customize ?: Customize ;
0 commit comments