rename SafeVersion interface
This commit is contained in:
parent
b709f7774a
commit
f96eb3b8da
|
@ -32,7 +32,7 @@ export const enabledFeatures = (version: string): Array<string> =>
|
||||||
return acc
|
return acc
|
||||||
}, [])
|
}, [])
|
||||||
|
|
||||||
interface SafeInfo {
|
interface SafeVersionInfo {
|
||||||
current: string
|
current: string
|
||||||
latest: string
|
latest: string
|
||||||
needUpdate: boolean
|
needUpdate: boolean
|
||||||
|
@ -41,7 +41,7 @@ interface SafeInfo {
|
||||||
export const checkIfSafeNeedsUpdate = async (
|
export const checkIfSafeNeedsUpdate = async (
|
||||||
gnosisSafeInstance: { VERSION: () => Promise<string> },
|
gnosisSafeInstance: { VERSION: () => Promise<string> },
|
||||||
lastSafeVersion: string,
|
lastSafeVersion: string,
|
||||||
): Promise<SafeInfo> => {
|
): Promise<SafeVersionInfo> => {
|
||||||
if (!gnosisSafeInstance || !lastSafeVersion) {
|
if (!gnosisSafeInstance || !lastSafeVersion) {
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
|
@ -66,7 +66,7 @@ export const getCurrentMasterContractLastVersion = async (): Promise<string> =>
|
||||||
return safeMasterVersion
|
return safeMasterVersion
|
||||||
}
|
}
|
||||||
|
|
||||||
export const getSafeVersionInfo = async (safeAddress: string): Promise<SafeInfo> => {
|
export const getSafeVersionInfo = async (safeAddress: string): Promise<SafeVersionInfo> => {
|
||||||
try {
|
try {
|
||||||
const safeMaster = await getGnosisSafeInstanceAt(safeAddress)
|
const safeMaster = await getGnosisSafeInstanceAt(safeAddress)
|
||||||
const lastSafeVersion = await getCurrentMasterContractLastVersion()
|
const lastSafeVersion = await getCurrentMasterContractLastVersion()
|
||||||
|
|
Loading…
Reference in New Issue