Skip to content
This repository was archived by the owner on Sep 26, 2023. It is now read-only.

Commit cb93bba

Browse files
committed
Fix #199
1 parent 88fdd97 commit cb93bba

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

src/Routes.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff 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>

src/components/Sidebar.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff 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

248248
type 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) => {

0 commit comments

Comments
 (0)