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

add bool conversion for listtransactions #1059

Merged
merged 1 commit into from
Apr 22, 2018

Conversation

iFoggz
Copy link
Member

@iFoggz iFoggz commented Apr 21, 2018

#1055

Add bool conversion. default this is false however since the beginning of time we have not been able to set this bool due to a string to bool conversion problem (which i fixed in rpc overhaul).

I do not know if this will address the flype.me issue but when you set the bool to true via argument send transactions show in the list. The code is pretty much identical to bitcoins thou bitcoin has the conversion fix in.

This may be why flype.me had issue as they could never specify the bool. I'm not aware of how to request the same data from bitcoin or any other wallet without that information I cannot dip much further.

i'm open to ideas but it would be better if flype.me would provide similar requests they do to bitcoin so i can verify its not different as i'm sure (with limited information) that they are using all arguments with other wallets but unable to do so with gridcoin rpc.

@iFoggz iFoggz changed the base branch from master to hotfix April 21, 2018 20:16
@denravonska denravonska merged commit 6c0ce81 into gridcoin-community:hotfix Apr 22, 2018
@denravonska denravonska deleted the listtransactionsfix branch April 22, 2018 04:47
@holycto
Copy link

holycto commented Apr 23, 2018

We're doing exactly the same rpc call on all bitcoin rpc compatible coins

@holycto
Copy link

holycto commented Apr 23, 2018

I'm providing here some example from both grc and btc:

GRC:

txid = 'aea649a40a0cb899f7d66451de5e6e8690ed598e696208e9182053615eceffaf'

txs = rpc.rlisttransactions("*", 200)
txs.filter(["txid"]==txid)
 => [{"involvesWatchonly"=>true, "account"=>"", "address"=>"S1vk7wzbS84i7gpShzSMEZzpTnMtUezAXK", "category"=>"receive", "fee"=>0.0, "amount"=>19.80128935, "confirmations"=>54, "blockhash"=>"42d929a4cb4e48f687181018609b18d3f5e33dc351209fdfb66264f578d56d6d", "blockindex"=>2, "blocktime"=>1524145136, "txid"=>"aea649a40a0cb899f7d66451de5e6e8690ed598e696208e9182053615eceffaf", "time"=>1524145088, "timereceived"=>1524145088}] 

tx = rpc.gettransaction(txid)
tx["details"]
 => [{"involvesWatchonly"=>true, "account"=>"", "address"=>"SF83agM4ERg1WaJvKNbJYrWRHVvUM3xkZz", "category"=>"send", "amount"=>-2.0, "fee"=>-0.0001}] 

BTC:

txid = '93f536aa681675868aba07079d86296c0fa408a0667d02df2b3e2052e08273f0'
txs = rpc.listtransactions("*", 200)
txs.filter(["txid"]==txid)
 => [{"account"=>"", "address"=>"35L8W5B4x7Gaqs95S33CYcfEmhWWsqTqbF", "category"=>"send", "amount"=>-0.00035, "vout"=>0, "fee"=>-8.15e-06, "confirmations"=>3405, "blockhash"=>"00000000000000000047192039f2572889bf8bbde8b3b3e4ef907de2cf40af63", "blockindex"=>809, "blocktime"=>1522257798, "txid"=>"93f536aa681675868aba07079d86296c0fa408a0667d02df2b3e2052e08273f0", "walletconflicts"=>[], "time"=>1522256731, "timereceived"=>1522256731, "bip125-replaceable"=>"no", "abandoned"=>false}] 

tx = rpc.gettransaction(txid)
tx["details"]
 => [{"account"=>"", "address"=>"35L8W5B4x7Gaqs95S33CYcfEmhWWsqTqbF", "category"=>"send", "amount"=>-0.00035, "vout"=>0, "fee"=>-8.15e-06, "abandoned"=>false}] 

As you can see listtransactions reports sent tx incorrectly as "receive", although gettransaction does show the transaction properly

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

Successfully merging this pull request may close these issues.

None yet

4 participants