-
Notifications
You must be signed in to change notification settings - Fork 119
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: store shielded context by chain id
- Loading branch information
1 parent
06ffe4e
commit 65abd93
Showing
22 changed files
with
268 additions
and
99 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
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,33 @@ | ||
import { ActionButton, Stack } from "@namada/components"; | ||
import { routes } from "App/routes"; | ||
import { shieldedSyncAtom } from "atoms/balance"; | ||
import { clearShieldedContextAtom } from "atoms/settings"; | ||
import { useAtom } from "jotai"; | ||
import { useNavigate } from "react-router-dom"; | ||
|
||
export const SettingsMASP = (): JSX.Element => { | ||
const navigate = useNavigate(); | ||
const [clearShieldedContext] = useAtom(clearShieldedContextAtom); | ||
const [{ refetch: shieldedSync }] = useAtom(shieldedSyncAtom); | ||
|
||
const onInvalidateShieldedContext = async (): Promise<void> => { | ||
await clearShieldedContext.mutateAsync(); | ||
shieldedSync(); | ||
navigate(routes.masp); | ||
}; | ||
|
||
return ( | ||
<Stack as="footer" className="px-5" gap={3}> | ||
<h2 className="text-base">Invalidate Shielded Context</h2> | ||
<p className="text-sm"> | ||
In case your shielded balance is not updating correctly, you can | ||
invalidate the shielded context to force a rescan. This might take a few | ||
minutes to complete. | ||
</p> | ||
|
||
<ActionButton onClick={onInvalidateShieldedContext} className="shrink-0"> | ||
Invalidate Shielded Context | ||
</ActionButton> | ||
</Stack> | ||
); | ||
}; |
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
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
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.