mirror of
https://github.com/oceanprotocol/market.git
synced 2024-12-02 05:57:29 +01:00
fileinfo API tweaks
This commit is contained in:
parent
49fe6456f9
commit
49ac2ba909
@ -23,7 +23,7 @@ export default function FilesInput(props: InputProps): ReactElement {
|
||||
const newFileInfo = await getFileInfo(url)
|
||||
newFileInfo && helpers.setValue([newFileInfo])
|
||||
} catch (error) {
|
||||
toast.error('Could not fetch file info. Please check url and try again')
|
||||
toast.error('Could not fetch file info. Please check URL and try again')
|
||||
console.error(error.message)
|
||||
} finally {
|
||||
setIsLoading(false)
|
||||
|
@ -50,7 +50,7 @@ export async function getFileInfo(url: string): Promise<FileMetadata> {
|
||||
data: { url }
|
||||
})
|
||||
|
||||
if (response.status > 299 || !response.data.result) {
|
||||
if (response.status > 299 || !response.data) {
|
||||
toast.error('Could not connect to File API')
|
||||
return
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user