marigold-dev / tzsafe-ui

TzSafe-UI frontend — to interact with multi-signatures wallets.
https://www.marigold.dev/tzsafe
10 stars 2 forks source link

[Feat] Handling FA2 and FA1.2 in history #104

Closed JulesGuesnon closed 1 year ago

JulesGuesnon commented 1 year ago

Description

This PR detects when FA1.2 or FA2 tokens are sent to the wallet

Overview

image image
rueshyna commented 1 year ago

@aguillon

for alias, I opened the issue: https://github.com/marigold-dev/tzsafe-ui/issues/106

@JulesGuesnon If the followings are easy to fix, please process. if not, I'm ok with creating an issue for tracking except the last one.

I also think you want to show the token's icon somewhere in the proposal or history. I haven't tested with artsy NFTs, but I guess that it only gives you the token ID and contract address, and that won't cut it for most users.

I agree that having icon would be nicer.

  • What's the "metadata" field for? Why is amount = 0? I'm testing here with a FA2 token. It seems to work better for FA1.2.

The metadata is for advance users who create their own customized lambda. If users create proposals by tzsafe-ui, metadata is always empty now. the amount of FA2 is showing in Params/Tokens. if users transfer multiple FA2 tokens, it's a bit hard to show in the current UI. I do agree we should have nicer presentation for regular users. The current proposal presentation is still toward developers. I think this one is a bit out of scope of this PR.

  • Let's assume I have 2 FA1.2 tokens. When submitting a proposal, if I try to transfer 1 to one address, and 2 to another address (which can't work because 1 + 2 = 3 > 2) then I can still submit the proposal, and, later, sign it. Obviously I then can't execute it correctly.

When the time users create a proposal, it doesn't really execute. Therefore, users have time to prepare funding more FA1.2 token before resolving the proposals. I think showing warnings for users would be good, not restrict them to create these kinds of proposals. It's the same for XTZ transfer.

  • When making a proposal, if I add a "Transfer FA2" item and fill the "address" field first, and then select a token, I get an "Invalid address" message below the address. Removing one character and then putting it back fixes this, but it's still a minor UI bug.

It's a bug. should be fixed.

JulesGuesnon commented 1 year ago

@rueshyna

I agree that having icon would be nicer.

This is easy to add because I do have the data to do it, but my main problem is basically where to add it. I quickly thought about it, and it doesn't really fit with current history design I think

It's a bug. should be fixed.

On it

For the rest I think it can be turned into issues

rueshyna commented 1 year ago

This is easy to add because I do have the data to do it, but my main problem is basically where to add it. I quickly thought about it, and it doesn't really fit with current history design I think

That's what I was thinking of. issue: https://github.com/marigold-dev/tzsafe-ui/issues/108

JulesGuesnon commented 1 year ago

@aguillon

I don't think the way tokens are displayed during proposals or after executing them is good though:

I agree with this, there is probably a way more visual solution to come up with as we have icons for FA1.2 and FA2. Maybe rather than a big table that is definitely made for developers, we could show some small cards for each transaction. And each card could have an icon:

the same aliases as tzkt.

I see the point, and I think it would be valuable to have that kind of feature, but I don't really see how we can use it with our current features. I mean, it can probably be used to have a feature of verified address, and provide more informations to the user, but as long as addresses in TzSafe are only strings that you fill into inputs it's quite complicated I think. The only way I can see an integration of this feature for now, is fetching an API to see if the address is verified on tzkt, and provide a link to the user if it exists so he can check by himself