From ffcdf3c197a6d3d27652ff9ef7a602f98d983452 Mon Sep 17 00:00:00 2001 From: Manfred Touron <94029+moul@users.noreply.github.com> Date: Wed, 6 Dec 2023 23:38:02 +0100 Subject: [PATCH] Update gno.land/cmd/gnoland/testdata/grc20-registry.txtar Co-authored-by: Hariom Verma --- gno.land/cmd/gnoland/testdata/grc20-registry.txtar | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/gno.land/cmd/gnoland/testdata/grc20-registry.txtar b/gno.land/cmd/gnoland/testdata/grc20-registry.txtar index 4ffa1db6f67..224125deb30 100644 --- a/gno.land/cmd/gnoland/testdata/grc20-registry.txtar +++ b/gno.land/cmd/gnoland/testdata/grc20-registry.txtar @@ -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" }