You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We should have a way to set a -send amount for via txlink, which would be reflected in gnokey commands in the help page, as well as Adena.
While this is a practical feature, it does pose a certain threat of scamming - this is why we need to make sure that when such a link is clicked, it clearly shows the user what it's doing.
For gnokey help commands, we could highlight the -send flag and the amount in red so that it pops out, or put a warning banner above, while also adding a text field that would allow the user to modify the amount (& denom!) in gnoweb directly, without going near the CLI.
For Adena, we could do something similar.
A suggested way to set this parameter in gnoweb links is .send, as it doesn't conflict with any possible Gno function arguments (function arg names cannot start with .).
Just a note for those coming here: I suggest using special arguments with a dot prefix, as they cannot be the variable name of a function. This approach eliminates the risk of matching an actual variable. For example, we can have &send=foo&.send=1999ugnot, which is weird but prevents any mismatch.
Alternatively, we could use another prefix that cannot exist in a variable name. An underscore (_) might be a good option since it is more visually distinct than a dot. However, I'm unsure if we can use it in functions in Go as well. The goal is to find a "special" prefix that avoids any mismatch while remaining visually clear. I'm open to suggestions.
Description
We should have a way to set a
-send
amount for via txlink, which would be reflected in gnokey commands in the help page, as well as Adena.While this is a practical feature, it does pose a certain threat of scamming - this is why we need to make sure that when such a link is clicked, it clearly shows the user what it's doing.
For gnokey help commands, we could highlight the
-send
flag and the amount in red so that it pops out, or put a warning banner above, while also adding a text field that would allow the user to modify the amount (& denom!) ingnoweb
directly, without going near the CLI.For Adena, we could do something similar.
A suggested way to set this parameter in gnoweb links is
.send
, as it doesn't conflict with any possible Gno function arguments (function arg names cannot start with.
).Example:
$help&func=MyFunc&arg=whatever&.send=10000ugnot
We also need to modify
txlink
&helplink
libraries to match this down the line.cc @alexiscolin @moul @dongwon8247
The text was updated successfully, but these errors were encountered: