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

Filter txtype Parameter of listAccountHistory() doesn´t seem to filter AccountHistory #252

Closed
gamsterx opened this issue May 18, 2021 · 5 comments · Fixed by #343
Closed
Assignees
Labels
kind/bug Something isn't working priority/important-soon Will be important soon triage/accepted Triage has been accepted

Comments

@gamsterx
Copy link

What happened:

I want to get a filtered list of transactions via listAccountHistory. I used the txtype options parameter which didn´t seem to have any effect.

I tried different strings like PoolSwap or Commission with the same unfiltered result.

As this project is currently in heavy development the docs are limited at this point in time. I managed to find the following info:
@param {string} [options.txtype] Filter by transaction type, supported letter from 'CRTMNnpuslrUbBG

I have no clue what the letters suppose to mean. Can somebody explain?

An example from the tests shows a txtype: 'M' which in my case also didn´t filter the transactions.

What you expected to happen:

I expect to get only history objects of the txtype Rewards or Commission or PoolSwap or ....

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

"@defichain/jellyfish": "^0.3.0"

import { Client } from "@defichain/jellyfish";
import { AccountHistoryOptions } from "@defichain/jellyfish-api-core/dist/category/account";

const client = new Client(
    "http://USER:PW@localhost:8555"
  );
  
  const options: AccountHistoryOptions = {
    txtype: "",
  };

  const accountHistories = await client.account.listAccountHistory(
    "mine",
    options
  );
@gamsterx gamsterx added the kind/bug Something isn't working label May 18, 2021
@defichain-bot defichain-bot added the needs/triage Waiting for triage to be accepted label May 18, 2021
@defichain-bot
Copy link
Contributor

@gamsterx: 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 developers manage community feedback and contributions. You can check out my manifest file 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 repository.

@defichain-bot defichain-bot added the needs/area Needs area label(s) label May 18, 2021
@defichain-bot
Copy link
Contributor

@gamsterx: 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 developers manage community feedback and contributions. You can check out my manifest file 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 repository.

@fuxingloh
Copy link
Member

Those characters are the custom DeFi transactions. See #108 for more info.

Thanks for creating this issue, appreciate it! I will assign this to be worked on, our priority is still light wallet. But this is something valid that we need to address.

/assign @jingyi2811 we need to add export enum TxType {} and update the documentations on JSDoc and website/
/area jellyfish-api-core
/triage accepted

@fuxingloh fuxingloh added this to the Jellyfish Documentation milestone May 19, 2021
@defichain-bot defichain-bot added triage/accepted Triage has been accepted area/jellyfish-api-core and removed needs/triage Waiting for triage to be accepted needs/area Needs area label(s) labels May 19, 2021
@fuxingloh fuxingloh added the priority/important-soon Will be important soon label May 20, 2021
@fuxingloh fuxingloh assigned siradji and unassigned jingyi2811 May 21, 2021
@siradji
Copy link
Contributor

siradji commented May 31, 2021

@fuxingloh , this issue was addressed and fixed in Add account.historyCount RPC #265.

@fuxingloh
Copy link
Member

@fuxingloh , this issue was addressed and fixed in Add account.historyCount RPC #265.

That RPC is for historyCount, this is for listAccountHistory.
https://github.com/DeFiCh/jellyfish/blob/9d311db3c3f905fc05fdecdacc0ab96176c291f0/packages/jellyfish-api-core/src/category/account.ts#L110-L117

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working priority/important-soon Will be important soon triage/accepted Triage has been accepted
Projects
None yet
5 participants