Skip to content

Commit

Permalink
fix(gnoweb): don't pre-fill help page address with "ADDRESS" (gnolang…
Browse files Browse the repository at this point in the history
…#2196)

Co-authored-by: Morgan Bazalgette <[email protected]>
  • Loading branch information
cobite and thehowl authored May 29, 2024
1 parent 088eeca commit e02b751
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions gno.land/pkg/gnoweb/static/js/realm_help.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ function setMyAddress(addr) {
function getMyAddress() {
var myAddr = localStorage.getItem("my_address");
if (!myAddr) {
return "ADDRESS";
return "";
}
return myAddr;
}
Expand All @@ -45,13 +45,13 @@ function updateCommand(x) {
ins.each(function(input) {
vals.push(input.value);
});
var myAddr = getMyAddress();
var myAddr = getMyAddress() || "ADDRESS";
var shell = x.find(".shell_command");
shell.empty();

// command Z: all in one.
shell.append(u("<span>").text("### INSECURE BUT QUICK ###")).append(u("<br>"));
var args = ["gnokey", "maketx", "call",
var args = ["gnokey", "maketx", "call",
"-pkgpath", shq(realmPath), "-func", shq(funcName),
"-gas-fee", "1000000ugnot", "-gas-wanted", "2000000",
"-send", shq(""),
Expand Down
2 changes: 1 addition & 1 deletion gno.land/pkg/gnoweb/views/realm_help.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<br />
These are the realm's exposed functions ("public smart contracts").<br />
<br />
My address: <input id="my_address" value="ADDRESS" width="40" /> (see <a href="https://docs.gno.land/gno-tooling/cli/gno-tooling-gnokey" target="_blank">`gnokey list`</a>)<br />
My address: <input id="my_address" placeholder="ADDRESS" width="40" /> (see <a href="https://docs.gno.land/gno-tooling/cli/gno-tooling-gnokey" target="_blank">`gnokey list`</a>)<br />
<br />
<br />
{{ template "func_specs" . }}
Expand Down

0 comments on commit e02b751

Please sign in to comment.