diff --git a/src/common/constants.js b/src/common/constants.js index 27de4ad..4132c14 100644 --- a/src/common/constants.js +++ b/src/common/constants.js @@ -137,6 +137,8 @@ export const C = { STR_Min_Anonset: 'Min Anonset', STR_Anonim_Level: 'Anonimity Level', STR_Set_Min_Anonset: 'Set Minimum Anonset', + STR_Auto_mix_account_select: + 'Funds reaching the minimum anonset specified will be sent to', STR_Select_Account: 'Select one account to which the Wasabi wallet will autosend funds to.', // --- ERRORS -- diff --git a/src/components/screens/wallet/SifirBtcReceiveTxnScreen.js b/src/components/screens/wallet/SifirBtcReceiveTxnScreen.js index 1754527..f8705fb 100644 --- a/src/components/screens/wallet/SifirBtcReceiveTxnScreen.js +++ b/src/components/screens/wallet/SifirBtcReceiveTxnScreen.js @@ -58,12 +58,15 @@ const SifirBtcReceiveTxnScreen = props => { useEffect(() => { loadWalletAddress(); - }, [labelInputDone, addrType]); + }, []); + // }, [labelInputDone, addrType]); // load new address useEffect(() => { + let loadNew = false; if (refresh > 0 && refresh > prevRefreshValue.current) { - loadWalletAddress({loadNew: true}); + loadNew = true; } + loadWalletAddress({loadNew}); prevRefreshValue.current = refresh; }, [refresh]); @@ -209,6 +212,7 @@ const SifirBtcReceiveTxnScreen = props => { )} {!labelInputDone && ( { if (labelInputDone) { setAddress(null); @@ -216,6 +220,7 @@ const SifirBtcReceiveTxnScreen = props => { setLabelInputDone(false); } else { setLabelInputDone(true); + setRefresh(refresh + 1); } }} style={styles.labelButtonCTA}> @@ -301,13 +306,9 @@ const SifirBtcReceiveTxnScreen = props => { ]}>{`Label: ${labelInput}`} { - if (labelInputDone) { - setAddress(null); - setLabelInput(''); - setLabelInputDone(false); - } else { - setLabelInputDone(true); - } + setAddress(null); + setLabelInput(''); + setLabelInputDone(false); }}> { marginTop: 0, }, ]}> - {C.STR_Select_Account} + {`${C.STR_Auto_mix_account_select} ${selectedWallet.label}`} )} {selectedWallet?.label && WalletAnonSlider}