mirror of
https://github.com/status-im/safe-react.git
synced 2025-02-07 15:23:50 +00:00
Fixed linting errors
This commit is contained in:
parent
6b8f836937
commit
ae37d95bfe
@ -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,
|
||||
|
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user