helium / blockchain-core

Apache License 2.0
214 stars 85 forks source link

Expose payment amounts when max=true #1447

Closed vihu closed 1 year ago

vihu commented 1 year ago

Summary

This PR adds amount when max=true for payment_v2 transactions. It requires that ledger be passed in when calling to_json for payment_v2 transactions implying that ETL needs to be upgraded to do the same.

TODO:

madninja commented 1 year ago

Unfortunately this won’t work during submission to pending txns. There is no ledger available when submitting a pending payment txn and it needs some form of json to represent it to

vihu commented 1 year ago

Unfortunately this won’t work during submission to pending txns. There is no ledger available when submitting a pending payment txn and it needs some form of json to represent it to

Right, I updated this to do the existing way if ledger isn't passed in Opts (so this would still be compatible with pending txn endpoint, except it wouldn't show the amount when max=true). But if we can pass in the ledger from the historical txn endpoint, then amount would show up even if max=true.