Skip to content

PN-262 Enrich tx input information#81

Merged
tankakatan merged 1 commit intodevelopfrom
PN-262
Oct 19, 2022
Merged

PN-262 Enrich tx input information#81
tankakatan merged 1 commit intodevelopfrom
PN-262

Conversation

@germanviescas
Copy link
Contributor

If Point Engine sends any metadata attached to the transaction input that the user is asked to review and approve, these changes will present such metadata in a user-friendly way in the confirmation window.

  • If the input is an empty hash (0x000...), we will show a "no content" message instead of all the zeros.
  • If the input is a storage ID, we will provide a link to /_storage/:id that will open in a new tab.
  • If the input is a blockchain transaction, we will include a message saying so (in the future, when we have an explorer in Point Network, we can convert it to a link to the transaction in said explorer).
  • If the input looks like a storage ID/tx hash, but is none, we will show a "not found" message.

Here are some screenshots (please mind that the wtf input in some of the screenshots has been manually added in the code just for testing, to simulate found and not-found blockchain transactions).

not_found

storage

tx

case ParamMetaType.NOT_FOUND:
return (
<span>
{param.value} <em>(not found in storage nor blockchain)</em>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This message looks a bit like an error, as if something was not found and hence may be wrong. I would rather say something like unfamiliar data id. Probably in the future we will emphasise it even more, but for now we need to figure out how common this case actually is.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The less verbose way would be to just say (?)

It can be arbitrary binary data that the contract wants to store, doesn't have to exist in our storage necessarily

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be nice to have a way to try to decode it into ASCII/UTF-8 if needed, like etherscan does

@tankakatan tankakatan merged commit 1a3676d into develop Oct 19, 2022
@tankakatan tankakatan deleted the PN-262 branch October 19, 2022 07:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants