From 89709cbe73332e387f55bb51b750df94cf472da9 Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Wed, 21 Oct 2020 16:43:23 +0200 Subject: [PATCH] periodically try to get DDO when not present yet --- .../molecules/FormFields/Datatoken/index.tsx | 4 ++-- src/components/pages/Publish/Feedback.tsx | 2 +- src/components/templates/AssetDetails.tsx | 12 ++++++++++-- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/src/components/molecules/FormFields/Datatoken/index.tsx b/src/components/molecules/FormFields/Datatoken/index.tsx index 2f25e54fe..bd83bfc0c 100644 --- a/src/components/molecules/FormFields/Datatoken/index.tsx +++ b/src/components/molecules/FormFields/Datatoken/index.tsx @@ -16,9 +16,9 @@ export default function Datatoken(props: InputProps): ReactElement { helpers.setValue({ ...dataTokenOptions }) } - // Generate new DT name & symbol, but only once automatically + // Generate new DT name & symbol useEffect(() => { - if (!ocean || typeof field?.value?.name !== 'undefined') return + if (!ocean) return generateName() }, [ocean]) diff --git a/src/components/pages/Publish/Feedback.tsx b/src/components/pages/Publish/Feedback.tsx index 2395955d7..036382953 100644 --- a/src/components/pages/Publish/Feedback.tsx +++ b/src/components/pages/Publish/Feedback.tsx @@ -23,7 +23,7 @@ export default function Feedback({