Skip to content

Commit

Permalink
fix(nami): clear pw secrets on collateral modal close
Browse files Browse the repository at this point in the history
  • Loading branch information
mchappell committed Oct 29, 2024
1 parent 061254e commit 5d1e9bc
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions packages/nami/src/ui/app/components/transactionBuilder.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ const TransactionBuilder = (undefined, ref) => {
delegationTxFee,
isBuildingTx,
stakingError,
passwordUtil: { setPassword },
passwordUtil: { setPassword, clearSecrets },
signAndSubmitTransaction,
getStakePoolInfo,
submitCollateralTx,
Expand Down Expand Up @@ -598,13 +598,11 @@ const TransactionBuilder = (undefined, ref) => {
}}
onCloseBtn={() => {
capture(Events.SettingsCollateralXClick);
setData(d => ({
...d,
error: undefined,
}));
clearSecrets();
}}
onConfirm={(status, error) => {
if (status) {
clearSecrets();
capture(Events.SettingsCollateralConfirmClick);
toast({
title: 'Collateral added',
Expand Down

0 comments on commit 5d1e9bc

Please sign in to comment.