mirror of
https://github.com/oceanprotocol/market.git
synced 2024-12-02 05:57:29 +01:00
Converting accountId and owner to lowercase for the comparison to avoid problems caused by inconsistent cases (#1377)
* Showing loader on the edit formm until everything has loaded * Changing logic so that loader is the fallback * Making sure account Ids are in lowercase when comparing them * Fix crash when no account is connected
This commit is contained in:
parent
2107eab979
commit
4fd310cf6e
@ -37,13 +37,17 @@ export default function Edit({ uri }: { uri: string }): ReactElement {
|
||||
}
|
||||
].filter((tab) => tab !== undefined)
|
||||
|
||||
return asset && asset?.accessDetails && accountId === owner ? (
|
||||
return asset &&
|
||||
asset?.accessDetails &&
|
||||
accountId?.toLowerCase() === owner?.toLowerCase() ? (
|
||||
<Page title={pageTitle} noPageHeader uri={uri}>
|
||||
<div className={styles.container}>
|
||||
<Tabs items={tabs} defaultIndex={0} className={styles.edit} />
|
||||
</div>
|
||||
</Page>
|
||||
) : asset && asset?.accessDetails && accountId !== owner ? (
|
||||
) : asset &&
|
||||
asset?.accessDetails &&
|
||||
accountId?.toLowerCase() !== owner?.toLowerCase() ? (
|
||||
<Page title={pageTitle} noPageHeader uri={uri}>
|
||||
<Alert
|
||||
title="Edit action available only to asset owner"
|
||||
|
Loading…
Reference in New Issue
Block a user