Skip to content

Commit

Permalink
fix: types
Browse files Browse the repository at this point in the history
  • Loading branch information
iamacook committed Nov 8, 2023
1 parent acd5a83 commit de9dfe5
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
12 changes: 6 additions & 6 deletions src/hooks/loadables/useLoadRecovery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ const getRecoveryState = async (delayModifier: Delay): Promise<RecoveryState[num
const validFrom = BigNumber.from(txBlock.timestamp).add(txCooldown)
const expiresAt = txExpiration.isZero()
? null // Never expires
: validFrom.add(txExpiration).toString()
: validFrom.add(txExpiration)

return {
...event,
timestamp: txBlock.timestamp,
validFrom: validFrom.toString(),
validFrom,
expiresAt,
}
}),
Expand All @@ -50,10 +50,10 @@ const getRecoveryState = async (delayModifier: Delay): Promise<RecoveryState[num
return {
address: delayModifier.address,
modules,
txExpiration: txExpiration.toString(),
txCooldown: txCooldown.toString(),
txNonce: txNonce.toString(),
queueNonce: queueNonce.toString(),
txExpiration,
txCooldown,
txNonce,
queueNonce,
queue,
}
}
Expand Down
13 changes: 7 additions & 6 deletions src/store/recoverySlice.ts
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
import { createSelector } from '@reduxjs/toolkit'
import type { TransactionAddedEvent } from '@gnosis.pm/zodiac/dist/cjs/types/Delay'
import type { BigNumber } from 'ethers'

import { makeLoadableSlice } from './common'

type QueuedTransactionAdded = TransactionAddedEvent & {
timestamp: number
validFrom: string
expiresAt: string | null
validFrom: BigNumber
expiresAt: BigNumber | null
}

export type RecoveryState = Array<{
address: string
modules: Array<string>
txExpiration: string
txCooldown: string
txNonce: string
queueNonce: string
txExpiration: BigNumber
txCooldown: BigNumber
txNonce: BigNumber
queueNonce: BigNumber
queue: Array<QueuedTransactionAdded>
}>

Expand Down

0 comments on commit de9dfe5

Please sign in to comment.