-
Notifications
You must be signed in to change notification settings - Fork 120
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[launcher] speed up the setup wallet process (#3846)
+ remove gettingVSPInfo step from the setup view process + fix loading status on process manages/unmanaged views + cleanup process managed and unmanaged tickets + add tests
- Loading branch information
Showing
13 changed files
with
913 additions
and
209 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
67 changes: 31 additions & 36 deletions
67
...mponents/views/GetStartedPage/SetupWallet/ProcessManagedTickets/ProcessManagedTickets.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
app/components/views/GetStartedPage/SetupWallet/ProcessManagedTickets/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { default } from "./ProcessManagedTickets"; |
85 changes: 39 additions & 46 deletions
85
...ents/views/GetStartedPage/SetupWallet/ProcessUnmanagedTickets/ProcessUnmanagedTickets.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
app/components/views/GetStartedPage/SetupWallet/ProcessUnmanagedTickets/hooks.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import { useState } from "react"; | ||
import { useSettings } from "hooks"; | ||
import { useSelector } from "react-redux"; | ||
import { useDaemonStartup } from "hooks"; | ||
import { getAvailableVSPs } from "selectors"; | ||
|
||
export const useProcessUnmanagedTickets = ({ send }) => { | ||
const { onProcessUnmanagedTickets, isProcessingUnmanaged } = | ||
useDaemonStartup(); | ||
const { isVSPListingEnabled } = useSettings(); | ||
const availableVSPs = isVSPListingEnabled | ||
? useSelector(getAvailableVSPs) | ||
: []; | ||
const [vsp, setVSP] = useState(null); | ||
|
||
const onSubmitContinue = (passphrase) => { | ||
onProcessUnmanagedTickets(passphrase, vsp.host, vsp.pubkey) | ||
.then(() => send({ type: "CONTINUE" })) | ||
.catch((error) => { | ||
send({ type: "ERROR", error }); | ||
}); | ||
}; | ||
|
||
return { | ||
isProcessingUnmanaged, | ||
availableVSPs, | ||
vsp, | ||
setVSP, | ||
onSubmitContinue | ||
}; | ||
}; |
1 change: 1 addition & 0 deletions
1
app/components/views/GetStartedPage/SetupWallet/ProcessUnmanagedTickets/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { default } from "./ProcessUnmanagedTickets"; |
Oops, something went wrong.