1
0
mirror of https://github.com/oceanprotocol/market.git synced 2024-12-02 05:57:29 +01:00

show proper errors on submit publish (#1105)

* exit when user rejects the transaction

* if the message is too long, return generic label

* in the case (should not happen) the message is longer than one row, then show ellipsis
This commit is contained in:
EnzoVezzaro 2022-04-07 06:10:36 -04:00 committed by GitHub
parent ed15952a85
commit 4bd9dddf3b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 0 deletions

View File

@ -79,6 +79,10 @@
margin-left: var(--spacer);
font-size: var(--font-size-small);
color: var(--brand-alert-red);
display: block;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
@keyframes loader {

View File

@ -105,6 +105,10 @@ export default function PublishPage({
}))
} catch (error) {
LoggerInstance.error('[publish] error', error.message)
if (error.message.length > 65) {
error.message = 'No Token created.'
}
setFeedback((prevState) => ({
...prevState,
'1': {