Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

subjkt settings [bug] #336

Closed
Synkitten opened this issue Oct 17, 2023 · 12 comments
Closed

subjkt settings [bug] #336

Synkitten opened this issue Oct 17, 2023 · 12 comments
Labels
🐛 bug Something isn't working

Comments

@Synkitten
Copy link

Synkitten commented Oct 17, 2023

Describe the bug

When adding your subjkt details for a new wallet I found that the first letter of the chosen name is removed automatically if you use a capital e.g. 'Moments' is automatically changed to 'oments'. The biggest problem is it takes a few seconds for the auto recognition and removal of the capitalised letter which isn't obvious if you have moved on to filling out the next questions.
If you check at the wrong time you don't realise the issue before accepting the transaction.
name issue 2

Reproduction

  1. Type name in with a capital
  2. Wait for letter to disappear

Expected behavior

Make capitals useable if it's possible but otherwise make it autocorrect to lower case or have a notice show if it is deleted so you know to check maybe.

Platform and versions

OS windows
Browser - Brave (chrome)
Version - v. 1.58.137

Additional context

No response

@Synkitten Synkitten added 🐛 bug Something isn't working 🧹 needs triage The issue/PR was not yet reviewed by a maintainer labels Oct 17, 2023
@melMass melMass removed the 🧹 needs triage The issue/PR was not yet reviewed by a maintainer label Oct 17, 2023
@melMass
Copy link
Member

melMass commented Oct 17, 2023

@Zir0h @jagracar I will check properly but like that I can't recall what we ended up with, kind of related to #334 : Are Subjkt case sensitive?

@Zir0h
Copy link
Contributor

Zir0h commented Oct 17, 2023

This is actually a duplicate of #303
The UI silently drops "invalid" characters, currently only lowecase and 0-9 is allowed I think.
Most important part is that the visitor should receive feedback about errors, rather than the site silently dropping bad characters.

@melMass
Copy link
Member

melMass commented Oct 17, 2023

Thanks but my question was about the Subjkt casing at the contract level

@jagracar
Copy link
Member

jagracar commented Oct 17, 2023

Thanks but my question was about the Subjkt casing at the contract level

I don't think so. The entry point takes bytes and i don't think it does any string manipulation. My guess is that is possible to register jagracar, Jagracar or JAGRACAR using better call dev.
https://tzkt.io/KT1My1wDZHDGweCrJnQJi3wcFaS67iksirvj/entrypoints

In fact, you can see some capitals here:
https://tzkt.io/KT1My1wDZHDGweCrJnQJi3wcFaS67iksirvj/storage/3920

I even find some recent ones with capitals. Maybe they were registered in one of the h=n forks.
https://better-call.dev/mainnet/KT1My1wDZHDGweCrJnQJi3wcFaS67iksirvj/storage/big_map/3920/keys

@melMass
Copy link
Member

melMass commented Oct 17, 2023

My guess is that is possible to register jagracar, Jagracar or JAGRACAR using better call dev.

I think we already had this discussion but I can't recall the conclusions 😅 !
The fact that there was this handler makes me suggest that it might have been a way to prevent subjkt registration where only the casing changes

@jagracar
Copy link
Member

My guess is that is possible to register jagracar, Jagracar or JAGRACAR using better call dev.

I think we already had this discussion but I can't recall the conclusions 😅 ! The fact that there was this handler makes me suggest that it might have been a way to prevent subjkt registration where only the casing changes

I don't think the smart contract is that clever. It just registers the name (in bytes) to the associated address. If the name exists already, it will throw an error. But that only happens if the name exactly the same in bytes. So capitals or not make a difference.

Unfortunately there is no way to check the smarpy code for the SUBJKT contract, only the michelson code:
https://tzkt.io/KT1My1wDZHDGweCrJnQJi3wcFaS67iksirvj/code

@melMass
Copy link
Member

melMass commented Oct 17, 2023

Cool, so to address this issue, we should probably just correct it disallowing uppercase and let the user know, either by a popup or a field validation visual like a red border

@jagracar
Copy link
Member

jagracar commented Oct 17, 2023

The problem is that if your wallet is assigned to mel and i assign mine to Mel using BCD, which page will be shown in the UI? Yours or mine?

And what happens if you registered Mel before the filter took place in the UI? If i register mel, will my page be shown instead of yours?

@jagracar
Copy link
Member

I think at some moment we might need to deploy our own SUBJKT contract with some of those problems fixed.

@NoRulesJustFeels
Copy link
Contributor

Should we consider a solution that works across Tezos and not just for Teia?

@Zir0h
Copy link
Contributor

Zir0h commented Oct 17, 2023

I think at some moment we might need to deploy our own SUBJKT contract with some of those problems fixed.

Indeed, because now we're just doing patchwork 😅 frontend sanitization is the same as no sanitization 😆
If the contract allows it, it shouldn't be prevented on the UI, but that's my opinion

@Zir0h
Copy link
Contributor

Zir0h commented Oct 17, 2023

Should we consider a solution that works across Tezos and not just for Teia?

yeah, like https://forum.tezosagora.org/t/open-sourcing-and-decentralizing-tezid-profiles/5681

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants