Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Settings text changed & new open current wallet button added #42

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion src/components/loadingscreen/LoadingScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class LoadingScreenState {

walletScreen: number;
// 0 -> no wallet, load existing wallet
// 1 -> show option
// 1 -> show options
// 2 -> create new
// 3 -> restore existing

Expand Down Expand Up @@ -400,6 +400,20 @@ class LoadingScreen extends Component<LoadingScreenProps & RouteComponentProps,
>
Create New Wallet
</button>
<button
type="button"
className={cstyles.primarybutton}
onClick={() => {
this.setState({ walletScreen: 0 });
this.setState({
currentStatus: "",
currentStatusIsError: false,
});
this.doFirstTimeSetup();
}}
>
Open Current Wallet
</button>
<button
type="button"
className={cstyles.primarybutton}
Expand Down
12 changes: 6 additions & 6 deletions src/components/walletsettingsmodal/WalletSettingsModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ export default function WalletSettingsModal({
closeModal,
setWalletSpamFilterThreshold,
}: WalletSettingsModalProps) {
const [selected, setSelected] = useState("");
const [selected, setSelected] = useState("");

useEffect(() => {
if (walletSettings.transaction_filter_threshold <= 0) {
setSelected("no_filter");
} else {
setSelected("filter");
setSelected("filter");
}
}, [walletSettings]);
}, [walletSettings.transaction_filter_threshold]);

return (
<Modal
Expand All @@ -35,7 +35,7 @@ export default function WalletSettingsModal({
>
<div className={[cstyles.verticalflex].join(" ")}>
<div className={cstyles.marginbottomlarge} style={{ textAlign: "left", marginLeft: 10 }}>
Filter out Spam Transactions
Transaction Filter Threshold
</div>

<div className={[cstyles.well, cstyles.verticalflex].join(" ")}>
Expand All @@ -47,7 +47,7 @@ export default function WalletSettingsModal({
value="filter"
onClick={(e) => setWalletSpamFilterThreshold(500)}
/>
Don't scan spammy transactions
Don't scan spammy transactions (value: 500)
</div>

<div style={{ margin: "10px" }}>
Expand All @@ -58,7 +58,7 @@ export default function WalletSettingsModal({
defaultChecked={selected === "no_filter"}
onClick={(e) => setWalletSpamFilterThreshold(0)}
/>
Scan all transactions
Scan all transactions (value: 0)
</div>
</div>

Expand Down