Skip to content

Commit 72d15b2

Browse files
committed
Merge branch 'igor/update-balance-after-redeem' into 'main'
fix(dapp): update balances after redeeming action See merge request pantherprotocol/panther-core!864
2 parents 13f3d48 + 07893f4 commit 72d15b2

File tree

1 file changed

+8
-3
lines changed
  • dapp/src/components/ZAssets/PrivateZAssetsTable/RedeemRewardsWarningDialog/SecondStageRedeem

1 file changed

+8
-3
lines changed

dapp/src/components/ZAssets/PrivateZAssetsTable/RedeemRewardsWarningDialog/SecondStageRedeem/index.tsx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@ import {
3434
StartWalletActionPayload,
3535
} from 'redux/slices/ui/web3-wallet-last-action';
3636
import {updateUTXOStatus} from 'redux/slices/wallet/advanced-stakes-rewards';
37+
import {getChainBalance} from 'redux/slices/wallet/chain-balance';
3738
import {poolV0ExitDelaySelector} from 'redux/slices/wallet/poolV0';
39+
import {getZkpTokenBalance} from 'redux/slices/wallet/zkp-token-balance';
3840
import {parseTxErrorMessage} from 'services/errors';
3941
import {generateRootKeypairs} from 'services/keys';
4042
import {exit} from 'services/pool';
@@ -157,6 +159,8 @@ export default function SecondStageRedeem(props: {
157159
reward.id,
158160
UTXOStatus.SPENT,
159161
]);
162+
dispatch(getZkpTokenBalance, context);
163+
dispatch(getChainBalance, context);
160164

161165
openNotification(
162166
'Withdrawal completed successfully',
@@ -169,7 +173,7 @@ export default function SecondStageRedeem(props: {
169173
'info',
170174
10000,
171175
);
172-
}, [dispatch, library, account, chainId, reward]);
176+
}, [dispatch, library, account, chainId, reward, context]);
173177

174178
useEffect(() => {
175179
const timer = setInterval(() => {
@@ -267,8 +271,9 @@ export default function SecondStageRedeem(props: {
267271
<PrimaryActionButton
268272
onClick={closeModalAndRedeem}
269273
disabled={!isLockPeriodPassed}
270-
styles={`redeem-modal-button
271-
${!isLockPeriodPassed && 'disabled'}`}
274+
styles={`redeem-modal-button ${
275+
!isLockPeriodPassed && 'disabled'
276+
}`}
272277
>
273278
{isLockPeriodPassed ? (
274279
<Typography>Redeem {zZKP} ZKP</Typography>

0 commit comments

Comments
 (0)