Skip to content

Commit

Permalink
feat: fixbug for session key list create_time not show correct (#902)
Browse files Browse the repository at this point in the history
  • Loading branch information
yubing744 authored Oct 2, 2023
1 parent 22beffe commit 7aafeb9
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dashboard/src/views/feature/SessionKeyList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,15 @@ export default function SessionKeyList() {
headerName: 'Last Active Time',
width: 200,
valueGetter: (params: GridValueGetterParams) => {
return formatDate(params.row.last_active_time)
return formatDate(params.row.last_active_time * 1000)
},
},
{
field: 'create_time',
headerName: 'Create Time',
width: 200,
valueGetter: (params: GridValueGetterParams) => {
return formatDate(params.row.create_time)
return formatDate(params.row.create_time * 1000)
},
},
{
Expand Down
5 changes: 5 additions & 0 deletions sdk/typescript/test/e2e/sdk.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,9 @@ describe('SDK', () => {
const account = new Account(provider, roochAddress, authorizer)
expect(account).toBeDefined()

// wait timestamp sync
await new Promise((resolve) => setTimeout(resolve, 5000))

// create session account
const sessionAccount = await account.createSessionAccount(
['0x3::empty::empty', '0x1::*::*'],
Expand All @@ -406,6 +409,8 @@ describe('SDK', () => {
expect(page.data).toHaveLength(1)
expect(page.data[0].authentication_key).toBeDefined()
expect(page.data[0].max_inactive_interval).toBe(100)
expect(page.data[0].create_time).greaterThan(1696225092)
expect(page.data[0].last_active_time).greaterThan(1696225092)

// query next page
const nextPage = await account.querySessionKeys(page.nextCursor, 10)
Expand Down
2 changes: 2 additions & 0 deletions sdk/typescript/test/e2e/servers/rooch-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ export class RoochServer {
'local',
'-d',
'TMP',
'--eth-rpc-url',
'https://goerli.infura.io/v3/9aa3d95b3bc440fa88ea12eaa4456161',
])

if (this.child) {
Expand Down

0 comments on commit 7aafeb9

Please sign in to comment.