Skip to content

Commit

Permalink
fix: get feegranter issue (#1193)
Browse files Browse the repository at this point in the history
  • Loading branch information
Hemanthghs authored Mar 12, 2024
1 parent d864758 commit 9a182d6
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion frontend/src/custom-hooks/useGetFeegranter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,17 @@ import { setError } from '@/store/features/common/commonSlice';
const useGetFeegranter = () => {
const feegranter = useAppSelector((state) => state.feegrant.feegrantAddress);
const chainFeegrants = useAppSelector((state) => state.feegrant.chains);
const isFeegrantMode = useAppSelector(
(state) => state.feegrant.feegrantModeEnabled
);
const { getChainInfo } = useGetChainInfo();
const dispatch = useAppDispatch();

const getFeegranter = (chainID: string, txnMsg: string) => {
const feegrants = chainFeegrants?.[chainID].grantsToMeAddressMapping;
if (!isFeegrantMode) {
return '';
}
const feegrants = chainFeegrants?.[chainID]?.grantsToMeAddressMapping;
if (!feegranter?.length) {
return '';
}
Expand Down

0 comments on commit 9a182d6

Please sign in to comment.