This repository was archived by the owner on Sep 26, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed
Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -206,6 +206,10 @@ export default class RouteApp extends React.Component<Props, AppState> {
206206 this . setState ( { walletSettings } ) ;
207207 } ;
208208
209+ updateWalletSettings = async ( ) => {
210+ await this . rpc . fetchWalletSettings ( ) ;
211+ } ;
212+
209213 setAddressesWithBalances = ( addressesWithBalance : AddressBalance [ ] ) => {
210214 this . setState ( { addressesWithBalance } ) ;
211215
@@ -514,7 +518,7 @@ export default class RouteApp extends React.Component<Props, AppState> {
514518 openPassword = { this . openPassword }
515519 clearTimers = { this . clearTimers }
516520 walletSettings = { walletSettings }
517- setWalletSettings = { this . setWalletSettings }
521+ updateWalletSettings = { this . updateWalletSettings }
518522 { ...standardProps }
519523 />
520524 </ div >
Original file line number Diff line number Diff line change @@ -242,7 +242,7 @@ type Props = {
242242 encryptWallet : ( p : string ) => void ;
243243 decryptWallet : ( p : string ) => Promise < boolean > ;
244244 walletSettings : WalletSettings ;
245- setWalletSettings : ( walletSettings : WalletSettings ) => void ;
245+ updateWalletSettings : ( ) => Promise < void > ;
246246} ;
247247
248248type State = {
@@ -631,7 +631,9 @@ class Sidebar extends PureComponent<Props & RouteComponentProps, State> {
631631 setWalletSpamFilterThreshold = async ( threshold : number ) => {
632632 // Call the RPC to set the threshold as an option
633633 await RPC . setWalletSettingOption ( "spam_filter_threshold" , threshold . toString ( ) ) ;
634- // console.log("Setting spam filter threshold to", threshold);
634+
635+ // Refresh the wallet settings
636+ await this . props . updateWalletSettings ( ) ;
635637 } ;
636638
637639 payURI = ( uri : string ) => {
You can’t perform that action at this time.
0 commit comments