Skip to content

Commit

Permalink
update portal sdk verion to 0.2.8
Browse files Browse the repository at this point in the history
  • Loading branch information
wow-sven committed Dec 3, 2024
1 parent 0a48169 commit 0c2ec55
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 22 deletions.
4 changes: 2 additions & 2 deletions infra/rooch-portal-v2/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@
"@mui/x-data-grid": "^7.7.0",
"@mui/x-date-pickers": "^7.7.0",
"@mui/x-tree-view": "^7.7.0",
"@roochnetwork/rooch-sdk": "0.2.7",
"@roochnetwork/rooch-sdk-kit": "0.2.7",
"@roochnetwork/rooch-sdk": "0.2.8",
"@roochnetwork/rooch-sdk-kit": "0.2.8",
"@tanstack/react-query": "^5.51.11",
"@types/react-copy-to-clipboard": "^5.0.7",
"@types/react-syntax-highlighter": "^15.5.13",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { Chip, Stack, Button, TableRow, Collapse, TableCell } from '@mui/materia
import { isSessionExpired } from 'src/utils/common';

import { toast } from 'src/components/snackbar';
import { useCurrentSession } from "@roochnetwork/rooch-sdk-kit";

export default function SessionKeyRowItem({
item,
Expand All @@ -19,6 +20,7 @@ export default function SessionKeyRowItem({
}) {
const [openCollapse, setOpenCollapse] = useState(false);
const [removing, setRemoving] = useState(false);
const curSession = useCurrentSession()

const expired = useMemo(
() => isSessionExpired(Number(item.lastActiveTime), item.maxInactiveInterval),
Expand Down Expand Up @@ -49,6 +51,7 @@ export default function SessionKeyRowItem({
<TableCell align="center">
<LoadingButton
loading={removing}
disabled={curSession === undefined}
onClick={async () => {
setRemoving(true);
try {
Expand Down
5 changes: 4 additions & 1 deletion infra/rooch-portal-v2/src/sections/settings/view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,13 @@ export function SettingsView() {
isPending: isLoadingSessionKeys,
refetch: refetchSessionKeys,
} = useRoochClientQuery('getSessionKeys', {
address: address?.genRoochAddress().toHexAddress() || ''
address: address!.genRoochAddress().toHexAddress()
}
)

console.log(isLoadingSessionKeys)
console.log(sessionKeys)

useEffect(() => {
if (address !== undefined) {
setIsAddressLoaded(true)
Expand Down
39 changes: 20 additions & 19 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 0c2ec55

Please sign in to comment.