Skip to content

Commit

Permalink
[Issue 1060] update claim reward
Browse files Browse the repository at this point in the history
  • Loading branch information
nampc1 committed Mar 22, 2023
1 parent 4f7d197 commit c087d11
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,4 @@ packages/extension-koni-base/src/api/dotsama/ignore-staking.spec.ts
packages/extension-koni-base/src/api/nft/evm_nft/ignore-moonbeam.api.spec.ts
test.ts
/packages/extension-koni-base/src/test-api/
/packages/extension-base/src/koni/test-api/
Original file line number Diff line number Diff line change
Expand Up @@ -136,15 +136,21 @@ const Component: React.FC<Props> = (props: Props) => {
});
}, [nominatorMetadata, notify, t]);

const handleClaimRewardAction = useCallback(() => {
console.log(reward);
}, [reward]);

const onPressItem = useCallback(
(item: ActionListType) => {
if (item.action === StakingAction.WITHDRAW) {
return () => handleWithdrawalAction();
} else if (item.action === StakingAction.CLAIM_REWARD) {
return () => handleClaimRewardAction();
}

return () => navigate(item.value, { state: { chainStakingMetadata, nominatorMetadata, staking, reward, hideTabList: true } as StakingDataOption });
},
[chainStakingMetadata, handleWithdrawalAction, navigate, nominatorMetadata, reward, staking]
[chainStakingMetadata, handleClaimRewardAction, handleWithdrawalAction, navigate, nominatorMetadata, reward, staking]
);

const availableActions = useCallback(() => {
Expand Down

0 comments on commit c087d11

Please sign in to comment.