Skip to content

Commit

Permalink
Bugfixes
Browse files Browse the repository at this point in the history
  • Loading branch information
nortonandreev committed Aug 14, 2024
1 parent a15d24d commit 9f44c59
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,8 @@
$: ({ currentOperation } = $operationsStore);
$: [gasSettings, language, minAllowedStake] = collectSettings($settingsStore);
const { hideStakingNotice } = $settingsStore;
$: ({ balance, error, isSyncing } = $walletStore);
$: isSyncOK = !(isSyncing || !!error);
$: ({ balance, error, sync } = $walletStore);
$: isSyncOK = !(sync.inProgress || !!error);
$: duskFormatter = createCurrencyFormatter(language, "DUSK", 9);
</script>
Expand All @@ -136,7 +136,7 @@
waitFor={walletStore.getStakeInfo()}
>
<svelte:fragment slot="pending-content">
{#if !isSyncing && !error}
{#if !sync.inProgress && !error}
<Throbber />
{:else}
<p>Data will load after a successful sync.</p>
Expand Down
9 changes: 8 additions & 1 deletion web-wallet/src/routes/(welcome)/login/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@
Promise.reject(new Error("Wrong password"))
);
function checkLastPosExists() {
const lastPos = localStorage.getItem("lastPos");
return lastPos !== null ? true : false;
}
const loginInfo = loginInfoStorage.get();
const modeLabel = loginInfo ? "Password" : "Mnemonic phrase";
Expand All @@ -70,7 +75,9 @@
getSeed(secretText.trim())
.then(getWallet)
.then(checkLocalData)
.then((wallet) => walletStore.init(wallet))
.then((wallet) =>
walletStore.init(wallet, checkLastPosExists() ? undefined : 0)
)
.then(() => goto("/dashboard"))
.catch((err) => {
if (err.message === localDataCheckErrorMsg) {
Expand Down

0 comments on commit 9f44c59

Please sign in to comment.