BirthdayResearch / jellyfishsdk

DeFiChain Jellyfish SDK & Ecosystem for building modern lite DeFi Applications at scale.
https://jellyfishsdk.com
MIT License
104 stars 36 forks source link

fix(jellyfish-api-core): Account history missing some fields for pool rewards #1242

Closed chanakasameera closed 1 year ago

chanakasameera commented 2 years ago

What happened:

The txn and txid fields are missing in an AccountHistory instance returned from pagination for pool rewards (options.no_rewards = false) of listAccountHistory RPC

What you expected to happen:

The txn and txid fields should be included in the AccountHistory

How to reproduce it (as minimally and precisely as possible):

Reproduce by adding a test into [packages/jellyfish-api-core/tests/category/account/listAccountHistory.test.ts]

Anything else we need to know?:

https://github.com/DeFiCh/ain/blob/acd6ce34181f54ab97a45733a6b830961ee1450f/src/masternodes/rpc_accounts.cpp#L65 According to this rewardhistoryToJSON method implementation in Ain, The txn and txid fields are not included

defichain-bot commented 2 years ago

@chanakasameera: Thanks for opening an issue, it is currently awaiting triage.

The triage/accepted label can be added by foundation members by writing /triage accepted in a comment.

Details I am a bot created to help the [DeFiCh](https://github.com/DeFiCh) developers manage community feedback and contributions. You can check out my [manifest file](https://github.com/DeFiCh/jellyfish/blob/main/.github/governance.yml) to understand my behavior and what I can do. If you want to use this for your project, you can check out the [DeFiCh/oss-governance-bot](https://github.com/DeFiCh/oss-governance-bot) repository.
defichain-bot commented 2 years ago

@chanakasameera: There are no 'area' labels on this issue. Adding an appropriate label will greatly expedite the process for us. You can add as many area as you see fit. If you are unsure what to do you can ignore this!

You can add area labels by leaving a /area comment.

Details I am a bot created to help the [DeFiCh](https://github.com/DeFiCh) developers manage community feedback and contributions. You can check out my [manifest file](https://github.com/DeFiCh/jellyfish/blob/main/.github/governance.yml) to understand my behavior and what I can do. If you want to use this for your project, you can check out the [DeFiCh/oss-governance-bot](https://github.com/DeFiCh/oss-governance-bot) repository.
ivan-zynesis commented 2 years ago

@chanakasameera AFAIK, these AccountHistory are legitimately have neither txid nor txn.

Jellyfish-api-core listAccountHistory is forced to have no_rewards true as well thus result have non undefined values for these two. Maybe we should close this?