-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0f3b9f0
commit 23168c6
Showing
39 changed files
with
1,039 additions
and
168 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'walletd': minor | ||
--- | ||
|
||
Address generation and addition dialogs now have an option to rescan from a specified height. Closes https://github.com/SiaFoundation/walletd/issues/96 |
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,5 @@ | ||
--- | ||
'@siafoundation/design-system': minor | ||
--- | ||
|
||
Added async defaultValues support to useDialogFormHelpers via initKey prop. |
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,5 @@ | ||
--- | ||
'@siafoundation/design-system': patch | ||
--- | ||
|
||
Fixed an issue where Dialog and useDialogFormHelpers were not calling onOpenChange on open events. |
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,5 @@ | ||
--- | ||
'walletd': minor | ||
--- | ||
|
||
There is now a dedicated rescan dialog that can be opened from the wallet list and wallet context menus. Closes https://github.com/SiaFoundation/walletd/issues/96 |
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,5 @@ | ||
--- | ||
'walletd': minor | ||
--- | ||
|
||
Rescan progress and status including errors is now shown in a sticky status bar. Closes https://github.com/SiaFoundation/walletd/issues/96 |
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,5 @@ | ||
--- | ||
'@siafoundation/react-walletd': minor | ||
--- | ||
|
||
Added useRescanStart, useRescanStatus. |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
import { | ||
Panel, | ||
ProgressBar, | ||
Separator, | ||
Text, | ||
} from '@siafoundation/design-system' | ||
import { useRescanStatus } from '@siafoundation/react-walletd' | ||
import { useSyncStatus } from '../hooks/useSyncStatus' | ||
import { formatRelative } from 'date-fns' | ||
import { defaultDatasetRefreshInterval } from '../config/swr' | ||
|
||
export function RescanStatus() { | ||
const syncStatus = useSyncStatus() | ||
const rescanStatus = useRescanStatus({ | ||
config: { | ||
swr: { | ||
refreshInterval: defaultDatasetRefreshInterval, | ||
}, | ||
}, | ||
}) | ||
|
||
if (!rescanStatus.data) { | ||
return null | ||
} | ||
|
||
const isScanning = rescanStatus.data.index.height < syncStatus.nodeBlockHeight | ||
const showAsRescanning = syncStatus.isSynced && isScanning | ||
|
||
if (!showAsRescanning) { | ||
return null | ||
} | ||
|
||
return ( | ||
<div className="z-20 fixed bottom-5 left-1/2 -translate-x-1/2 flex justify-center"> | ||
<Panel className="px-2 py-2 w-[400px] overflow-hidden"> | ||
<Text weight="medium" className="pb-2"> | ||
Rescanning the blockchain | ||
</Text> | ||
<div className="flex flex-col gap-1"> | ||
<ProgressBar | ||
variant="accent" | ||
value={rescanStatus.data.index.height} | ||
max={syncStatus.nodeBlockHeight} | ||
/> | ||
<div className="flex justify-between gap-3"> | ||
<Text color="verySubtle" size="12" ellipsis> | ||
{rescanStatus.data.error ? 'Stopped' : 'Scanning...'} | ||
</Text> | ||
<Text color="verySubtle" size="12" noWrap> | ||
{`${rescanStatus.data.index.height.toLocaleString()} / ${syncStatus.nodeBlockHeight.toLocaleString()}`} | ||
</Text> | ||
</div> | ||
</div> | ||
<Separator className="w-full mt-2 mb-1" /> | ||
<div className="flex justify-between items-center"> | ||
{rescanStatus.data.error && ( | ||
<Text color="red" size="12"> | ||
Error rescanning the blockchain | ||
</Text> | ||
)} | ||
<div className="flex-1" /> | ||
<Text color="subtle" size="12"> | ||
Started{' '} | ||
{formatRelative(new Date(rescanStatus.data.startTime), new Date())} | ||
</Text> | ||
</div> | ||
{rescanStatus.data.error && ( | ||
<div className="flex flex-col gap-1 overflow-hidden pt-1"> | ||
<Text color="contrast" size="12"> | ||
{rescanStatus.data.error} | ||
</Text> | ||
</div> | ||
)} | ||
</Panel> | ||
</div> | ||
) | ||
} |
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
Oops, something went wrong.