Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return is stopping land transfer #29

Closed
nachomazzara opened this issue Jan 19, 2018 · 0 comments
Closed

Return is stopping land transfer #29

nachomazzara opened this issue Jan 19, 2018 · 0 comments
Assignees

Comments

@nachomazzara
Copy link
Collaborator

We should replace:

function transferLand(int x, int y, address to) public {
    return transfer(to, encodeTokenId(x, y));
  }

  function transferManyLand(int[] x, int[] y, address to) public {
    require(x.length == y.length);
    for (uint i = 0; i < x.length; i++) {
      return transfer(to, encodeTokenId(x[i], y[i]));
    }
  }

To

function transferLand(int x, int y, address to) public {
    transfer(to, encodeTokenId(x, y));
  }

  function transferManyLand(int[] x, int[] y, address to) public {
    require(x.length == y.length);
    for (uint i = 0; i < x.length; i++) {
      transfer(to, encodeTokenId(x[i], y[i]));
    }
  }

transferLand it is working anyways, but transferManyLand is only transferred one land and then break the process due return keyword

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant