ReaduseQuery
useGetFees
Read consolidated fee information for user — combines per-user resolved fees (getFeeAmounts) with the global feeConfig toggles in one read.
Import
@tokenops/sdk/fhe-disperse/reactReturn
{ data, isLoading, error, refetch }Lifecycle
ReadDescription
Read consolidated fee information for user — combines per-user resolved
fees (getFeeAmounts) with the global feeConfig toggles in one read.
UI code calls this to render the fee panel before the user submits.
Signature
@tokenops/sdk/fhe-disperse/react
ts
function useGetFees(args?: UseGetFeesArgs): UseQueryResult<UserFees, Error>;Parameters
Shape of the options object passed to the hook itself.
| Property | Type | Description |
|---|---|---|
| user | Address | The user whose resolved fees to read. Hook is disabled until set. |
Example
@tokenops/sdk/fhe-disperse/react · @example
tsx
const { data: fees } = useGetFees({ user });
// fees → { isCustom, gasFeeWei, tokenFeeBps, gasFeeEnabled, tokenFeeEnabled }Pulled directly from the hook's TSDoc block — the same snippet your IDE shows on hover.
See also
Other Read hooks in disperse:
useIsRegisteredHas this deployer already called register?useGetWalletsRead the deployer's two registered subwallet addresses.useGetFeeConfigRead the singleton's { gasFeeEnabled, tokenFeeEnabled, defaultGasFee, defaultTokenFee } fee config.useGetBatchLimitsRead the maximum batch size for each of the three disperse modes ("wallet", "direct", "wallet-token-fee").