diff --git a/explorer/src/utils/index.ts b/explorer/src/utils/index.ts index 5375377b5a9..91b082c5cac 100644 --- a/explorer/src/utils/index.ts +++ b/explorer/src/utils/index.ts @@ -102,7 +102,6 @@ export const isLessThan = (a: number, b: number) => a < b; */ export const isBalanceEnough = (fee: string, tx: string = '0', balance: string = '0') => { - console.log('balance', balance, fee, tx); try { return Big(balance).gte(Big(fee).plus(Big(tx))); } catch (e) { diff --git a/nym-wallet/src/components/Bonding/modals/RedeemRewardsModal.tsx b/nym-wallet/src/components/Bonding/modals/RedeemRewardsModal.tsx index 8e00ddbfa5e..0243e765f3c 100644 --- a/nym-wallet/src/components/Bonding/modals/RedeemRewardsModal.tsx +++ b/nym-wallet/src/components/Bonding/modals/RedeemRewardsModal.tsx @@ -4,11 +4,10 @@ import { ModalListItem } from 'src/components/Modals/ModalListItem'; import { SimpleModal } from 'src/components/Modals/SimpleModal'; import { ModalFee } from 'src/components/Modals/ModalFee'; import { useGetFee } from 'src/hooks/useGetFee'; -import { simulateClaimOperatorReward, simulateVestingClaimOperatorReward } from 'src/requests'; import { AppContext } from 'src/context'; import { BalanceWarning } from 'src/components/FeeWarning'; import { Box } from '@mui/material'; -import { TBondedMixnode } from 'src/requests/mixnodeDetails'; +import { TBondedNymNode } from 'src/requests/nymNodeDetails'; export const RedeemRewardsModal = ({ node, @@ -16,23 +15,18 @@ export const RedeemRewardsModal = ({ onError, onClose, }: { - node: TBondedMixnode; + node: TBondedNymNode; onConfirm: (fee?: FeeDetails) => Promise; onError: (err: string) => void; onClose: () => void; }) => { - const { fee, getFee, isFeeLoading, feeError } = useGetFee(); + const { fee, isFeeLoading, feeError } = useGetFee(); const { userBalance } = useContext(AppContext); useEffect(() => { if (feeError) onError(feeError); }, [feeError]); - useEffect(() => { - if (node.proxy) getFee(simulateVestingClaimOperatorReward, {}); - else getFee(simulateClaimOperatorReward, {}); - }, []); - const handleOnOK = async () => onConfirm(fee); return ( diff --git a/nym-wallet/src/pages/bonding/Bonding.tsx b/nym-wallet/src/pages/bonding/Bonding.tsx index b66ffbe58ed..d618775e05a 100644 --- a/nym-wallet/src/pages/bonding/Bonding.tsx +++ b/nym-wallet/src/pages/bonding/Bonding.tsx @@ -292,7 +292,7 @@ export const Bonding = () => { /> )} - {showModal === 'redeem' && bondedNode && isMixnode(bondedNode) && ( + {showModal === 'redeem' && bondedNode && isNymNode(bondedNode) && ( setShowModal(undefined)} diff --git a/nym-wallet/src/requests/actions.ts b/nym-wallet/src/requests/actions.ts index 6907cf054ae..835fcb465b8 100644 --- a/nym-wallet/src/requests/actions.ts +++ b/nym-wallet/src/requests/actions.ts @@ -7,7 +7,7 @@ import { NodeConfigUpdate, GatewayConfigUpdate, } from '@nymproject/types'; -import { TBondGatewayArgs, TBondGatewaySignatureArgs, TNodeConfigUpdateArgs } from '../types'; +import { TBondGatewayArgs, TBondGatewaySignatureArgs } from '../types'; import { invokeWrapper } from './wrapper'; export const bondGateway = async (args: TBondGatewayArgs) => diff --git a/nym-wallet/src/requests/rewards.ts b/nym-wallet/src/requests/rewards.ts index 36b90838e70..ed5dcb797a8 100644 --- a/nym-wallet/src/requests/rewards.ts +++ b/nym-wallet/src/requests/rewards.ts @@ -6,7 +6,7 @@ export const claimOperatorReward = async (fee?: Fee) => export const claimDelegatorRewards = async (mixId: number, fee?: FeeDetails) => invokeWrapper('claim_locked_and_unlocked_delegator_reward', { - mixId, + nodeId: mixId, fee: fee?.fee, });