Skip to content

Commit

Permalink
Update gno.land/cmd/gnoland/testdata/grc20-registry.txtar
Browse files Browse the repository at this point in the history
Co-authored-by: Hariom Verma <hariom18599@gmail.com>
  • Loading branch information
moul and harry-hov authored Dec 6, 2023
1 parent 23ce8c8 commit ffcdf3c
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions gno.land/cmd/gnoland/testdata/grc20-registry.txtar
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@ var registry = []pair{}
func Register(name string, cb transferCb) { registry = append(registry, pair{name: name, cb: cb}) }
func TransferByName(name string, to string, amount uint64) string {
for _, pair := range registry {
if pair.name == name {
if std.CurrentRealm().Addr().String() == pair.cb(std.Address(to), amount) {
return "same address, success!"
} else {
return "invalid address, ownership issue :("
}
if pair.name != name {
continue
}
if std.CurrentRealm().Addr().String() != pair.cb(std.Address(to), amount) {
return "invalid address, ownership issue :("
}
return "same address, success!"
}
return "not found"
}
Expand Down

0 comments on commit ffcdf3c

Please sign in to comment.