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

Commit

Permalink
Fix #199
Browse files Browse the repository at this point in the history
  • Loading branch information
adityapk00 committed Sep 6, 2022
1 parent 88fdd97 commit cb93bba
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
6 changes: 5 additions & 1 deletion src/Routes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,10 @@ export default class RouteApp extends React.Component<Props, AppState> {
this.setState({ walletSettings });
};

updateWalletSettings = async () => {
await this.rpc.fetchWalletSettings();
};

setAddressesWithBalances = (addressesWithBalance: AddressBalance[]) => {
this.setState({ addressesWithBalance });

Expand Down Expand Up @@ -514,7 +518,7 @@ export default class RouteApp extends React.Component<Props, AppState> {
openPassword={this.openPassword}
clearTimers={this.clearTimers}
walletSettings={walletSettings}
setWalletSettings={this.setWalletSettings}
updateWalletSettings={this.updateWalletSettings}
{...standardProps}
/>
</div>
Expand Down
6 changes: 4 additions & 2 deletions src/components/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ type Props = {
encryptWallet: (p: string) => void;
decryptWallet: (p: string) => Promise<boolean>;
walletSettings: WalletSettings;
setWalletSettings: (walletSettings: WalletSettings) => void;
updateWalletSettings: () => Promise<void>;
};

type State = {
Expand Down Expand Up @@ -631,7 +631,9 @@ class Sidebar extends PureComponent<Props & RouteComponentProps, State> {
setWalletSpamFilterThreshold = async (threshold: number) => {
// Call the RPC to set the threshold as an option
await RPC.setWalletSettingOption("spam_filter_threshold", threshold.toString());
// console.log("Setting spam filter threshold to", threshold);

// Refresh the wallet settings
await this.props.updateWalletSettings();
};

payURI = (uri: string) => {
Expand Down

0 comments on commit cb93bba

Please sign in to comment.