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

get_transfers refuses to work with or without parameters #59

Closed
Codivorous opened this issue Apr 1, 2018 · 10 comments
Closed

get_transfers refuses to work with or without parameters #59

Codivorous opened this issue Apr 1, 2018 · 10 comments

Comments

@Codivorous
Copy link

It's really weird. I've tried with all sorts of combinations of parameters, but it only returns an empty array. I decided to settle on incoming_transfers for the time being, and that worked but it didn't seem to filter by subaddress, when I had the subaddress index, for example '3', fed to it.

Am I doing something wrong? I'm calling the functions with $WalletRPC->get_transfers().

I appreciate any help! :)

@sneurlax
Copy link
Contributor

sneurlax commented Apr 2, 2018

OK, I debugged this and solved it in #61. Thank you for your submission and I apologize for the issue! get_transfers works when feeding in an array of parameters, but when feeding in a single string as a parameter would use the nonexistent $input_type variable, whereas only $input_types exists.

Thank you, @Codivorous!

@sneurlax
Copy link
Contributor

sneurlax commented Apr 2, 2018

PS, the docs do say the following:

   * Look up transfers
   *
   * @param  array   $input_types      Array of transfer type strings; possible values include 'all', in', 'out', 'pending', 'failed', and 'pool'  (optional)

Check the code if you have an issue, but this really should have worked with just a string as an input--I just fucked up that bit of code :) Thank you again and please let me know if you have any other issues

sneurlax added a commit to sneurlax/monerophp that referenced this issue Apr 2, 2018
sneurlax added a commit to sneurlax/monerophp that referenced this issue Apr 2, 2018
@serhack serhack closed this as completed in 9b14237 Apr 2, 2018
serhack added a commit that referenced this issue Apr 2, 2018
@Codivorous
Copy link
Author

Thanks for the quick work @sneurlax!

@Codivorous
Copy link
Author

Unfortunately, this did not fix the issue completely. While the function now doesn't crash, I still can't actually get it to work.

This is the wallet that I am serving. As you can see, it has plenty of transfers:
bilde

The RPC wallet is running, and (hopefully) working:
bilde

This is the entire code snippet I am trying to run:
bilde

And then I get this output:
bilde

Running it without any parameters doesn't do anything either:
bilde

Same output. I hope I provided enough information for you to understand my issue :p

@sneurlax
Copy link
Contributor

sneurlax commented Apr 2, 2018

@serhack could you reopen this issue? I'm on it.

@sneurlax
Copy link
Contributor

sneurlax commented Apr 2, 2018

@Codivorous, could you try passing get_transfers(['in']) and/or get_transfers('in')? all isn't a thing (I am making it so now.)

@sneurlax
Copy link
Contributor

sneurlax commented Apr 2, 2018

I can tell it's not a thing from on_get_transfers in https://github.com/monero-project/monero/blob/master/src/wallet/wallet_rpc_server.cpp ...

@Codivorous
Copy link
Author

It does indeed work when you specify "in" - so the issue here is that "all" doesn't exist, even though it's the default and is also specified in the documentation. Thank you for your help again @sneurlax!

@sneurlax
Copy link
Contributor

sneurlax commented Apr 2, 2018

I am opening a pull request now to add this functionality. Perhaps it was in a previous version of monero-wallet-rpc -- if you need it, it should become functional soon

sneurlax added a commit to sneurlax/monerophp that referenced this issue Apr 2, 2018
serhack added a commit that referenced this issue Apr 2, 2018
Feature: allow 'all' as parameter to get_transfers
@sneurlax
Copy link
Contributor

sneurlax commented Apr 2, 2018

Merged, all should work now

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

2 participants