Skip to content
This repository has been archived by the owner on Apr 25, 2024. It is now read-only.

Commit

Permalink
fix(wallet): direct Edit Details btn to editable pubkey page
Browse files Browse the repository at this point in the history
ISSUES: #109
  • Loading branch information
honoka428 authored and waldenraines committed Dec 22, 2020
1 parent 64ed86b commit 6fc3d84
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/components/Wallet/WalletGenerator.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -143,18 +143,20 @@ class WalletGenerator extends React.Component {
).length;
};

toggleImporters = (event) => {
toggleImporters = (event, type) => {
event.preventDefault();
const {
setImportersVisible,
configuring,
resetWallet,
initialLoadComplete,
setGenerating,
} = this.props;

if (!configuring) {
setGenerating(false);
resetWallet();
if (type === "edit") initialLoadComplete();
if (type === "clear") resetWallet();
}

setImportersVisible(!configuring);
Expand Down Expand Up @@ -370,7 +372,7 @@ class WalletGenerator extends React.Component {
<Card>
<CardHeader title={this.title()} />
<CardContent>
<Button href="#" onClick={this.toggleImporters}>
<Button href="#" onClick={(e) => this.toggleImporters(e, "edit")}>
{configuring ? "Hide Key Selection" : "Edit Details"}
</Button>
<ConfirmWallet />
Expand All @@ -380,7 +382,7 @@ class WalletGenerator extends React.Component {
information.
</p>
<WalletConfigInteractionButtons
onClearFn={(e) => this.toggleImporters(e)}
onClearFn={(e) => this.toggleImporters(e, "clear")}
onDownloadFn={downloadWalletDetails}
/>
{unknownClient && (
Expand Down

0 comments on commit 6fc3d84

Please sign in to comment.