Fix redeem rewards disabled button
This commit is contained in:
@@ -379,7 +379,6 @@ export const fetchDelegations = async (
|
||||
nymClient: any
|
||||
): Promise<Delegation[]> => {
|
||||
const data = await nymClient.getDelegatorDelegations({ delegator: address });
|
||||
console.log("data", data);
|
||||
return data.delegations;
|
||||
};
|
||||
|
||||
|
||||
@@ -69,6 +69,7 @@ const SubHeaderRowActions = () => {
|
||||
refetchOnReconnect: false,
|
||||
});
|
||||
|
||||
|
||||
const handleRefetch = useCallback(async () => {
|
||||
await refetch();
|
||||
await queryClient.invalidateQueries(); // This will refetch ALL active queries
|
||||
@@ -165,7 +166,7 @@ const SubHeaderRowActions = () => {
|
||||
<Button
|
||||
variant="contained"
|
||||
onClick={handleRedeemRewardsButtonClick}
|
||||
disabled={totalStakerRewards === 0}
|
||||
disabled={totalStakerRewards / 1_000_000 < 1}
|
||||
>
|
||||
Redeem NYM
|
||||
</Button>
|
||||
|
||||
Reference in New Issue
Block a user