Fixed linting errors

This commit is contained in:
juampibermani 2021-05-28 13:03:02 -03:00
parent 6b8f836937
commit ae37d95bfe
2 changed files with 84 additions and 82 deletions

View File

@ -95,8 +95,9 @@ const AppFrame = ({ appUrl }: Props): ReactElement => {
const { isLoading } = useAppList(false)
const iframeRef = useRef<HTMLIFrameElement>(null)
const [confirmTransactionModal, setConfirmTransactionModal] =
useState<ConfirmTransactionModalState>(INITIAL_CONFIRM_TX_MODAL_STATE)
const [confirmTransactionModal, setConfirmTransactionModal] = useState<ConfirmTransactionModalState>(
INITIAL_CONFIRM_TX_MODAL_STATE,
)
const [appIsLoading, setAppIsLoading] = useState<boolean>(true)
const [safeApp, setSafeApp] = useState<SafeApp | undefined>()
@ -129,10 +130,9 @@ const AppFrame = ({ appUrl }: Props): ReactElement => {
}),
[setConfirmTransactionModal],
)
const closeConfirmationModal = useCallback(
() => setConfirmTransactionModal(INITIAL_CONFIRM_TX_MODAL_STATE),
[setConfirmTransactionModal],
)
const closeConfirmationModal = useCallback(() => setConfirmTransactionModal(INITIAL_CONFIRM_TX_MODAL_STATE), [
setConfirmTransactionModal,
])
const { sendMessageToIframe } = useIframeMessageHandler(
safeApp,

View File

@ -212,7 +212,8 @@ export const getEmptySafeApp = (): SafeApp => {
}
}
export const getAppInfoFromUrl = memoize(async (appUrl: string): Promise<SafeApp> => {
export const getAppInfoFromUrl = memoize(
async (appUrl: string): Promise<SafeApp> => {
let res = {
...getEmptySafeApp(),
error: true,
@ -269,9 +270,11 @@ export const getAppInfoFromUrl = memoize(async (appUrl: string): Promise<SafeApp
logError(Errors._900, `${res.url}: ${error.message}`, undefined, false)
return res
}
})
},
)
export const getIpfsLinkFromEns = memoize(async (name: string): Promise<string | undefined> => {
export const getIpfsLinkFromEns = memoize(
async (name: string): Promise<string | undefined> => {
try {
const content = await getContentFromENS(name)
if (content && content.protocolType === 'ipfs') {
@ -281,11 +284,10 @@ export const getIpfsLinkFromEns = memoize(async (name: string): Promise<string |
console.error(error)
return
}
})
},
)
export const uniqueApp =
(appList: SafeApp[]) =>
(url: string): string | undefined => {
export const uniqueApp = (appList: SafeApp[]) => (url: string): string | undefined => {
const newUrl = new URL(url)
const exists = appList.some((a) => {
try {