You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/react-connect/src/hooks/useWaasFeeOptions.ts
+19-6Lines changed: 19 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -44,25 +44,37 @@ export type UseWaasFeeOptionsReturn = [
44
44
rejectPendingFeeOption: (id: string)=>void
45
45
]
46
46
47
+
/**
48
+
* Options for the useWaasFeeOptions hook
49
+
*/
50
+
exportinterfaceWaasFeeOptionsConfig{
51
+
/** Whether to skip checking token balances (default: false) */
52
+
skipFeeBalanceCheck?: boolean;
53
+
}
54
+
47
55
/**
48
56
* Hook for handling WaaS (Wallet as a Service) fee options for unsponsored transactions
49
57
*
50
58
* This hook provides functionality to:
51
59
* - Get available fee options for a transaction in Native Token and ERC20's
52
-
* - Check wallet balances for each fee option
60
+
* - Provide user wallet balances for each fee option
53
61
* - Confirm or reject fee selections
54
62
*
55
-
* @paramchainId - The chain ID for which to get fee options
63
+
* @paramoptions - Configuration options for the hook
56
64
* @returns {UseWaasFeeOptionsReturn} Array containing the confirmation state and control functions
57
65
*
58
66
* @example
59
67
* ```tsx
60
-
* const chainId = 137 // Polygon mainnet
68
+
* // Use the hook with default balance checking, this will fetch the user's wallet balances for each fee option and provide them in the UseWaasFeeOptionsReturn
0 commit comments