eprbell / dali-rp2

DaLI (Data Loader Interface) is a data loader and input generator for RP2 (https://pypi.org/project/rp2), the privacy-focused, free, open-source cryptocurrency tax calculator: DaLI removes the need to manually prepare RP2 input files. Just like RP2, DaLI is also free, open-source and it prioritizes user privacy.
https://pypi.org/project/dali-rp2/
Apache License 2.0
63 stars 42 forks source link

multi-language earn transactions and added 'earn task' type #189

Closed Larision closed 1 year ago

Larision commented 1 year ago

just a little fix, in spanish [_SUBTITLE] was "De Coinbase Earn" so not showing any earn transaction, and i noticed i´ve some transactions with [_DESCRIPTION]: "Earn Task"

eprbell commented 1 year ago

just a little fix, in spanish [_SUBTITLE] was "De Coinbase Earn" so not showing any earn transaction, and i noticed i´ve some transactions with [_DESCRIPTION]: "Earn Task"

I'm currently on vacation for a couple of weeks: I'll verify this with my own personal tests when I get back.

Larision commented 1 year ago

Sure,enjoy your holidays!!

Larision commented 1 year ago

Here 3 earn transactions from log.

  "amount": {
            "amount": "1.88005264",
            "currency": "FET"
        },
        "created_at": "2021-08-17T15:12:49Z",
        "description": "Earn Task",
        "details": {
            "header": "Se han recibido 1,88005264 FET (0,85 €)",
            "health": "positive",
            "subtitle": "De Coinbase Earn",
            "title": "Fetch.ai recibidos"
        },
        "from": {
            "currency": "FET",
            "id": "ee4b213c-88af-5df9-9652-xxxxxxxxxxxx",
            "resource": "user",
            "resource_path": "/v2/users/ee4b213c-88af-5df9-9652-xxxxxxxxxxxx"
        },
        "hide_native_amount": false,
        "id": "04b68f71-ce2c-50d1-b196-xxxxxxxxxxxx",
        "instant_exchange": false,
        "native_amount": {
            "amount": "0.85",
            "currency": "EUR"
        },
        "network": {
            "status": "off_blockchain",
            "status_description": null
        },
        "off_chain_status": "completed",
        "resource": "transaction",
        "resource_path": "/v2/accounts/b53afbff-9616-5d06-b981-xxxxxxxxxxxx/transactions/04b68f71-ce2c-50d1-b196-xxxxxxxxxxxx",
        "status": "completed",
        "type": "send",
        "updated_at": "2021-11-03T00:22:56Z"
    },
    {
        "amount": {
            "amount": "0.09109957",
            "currency": "UMA"
        },
        "created_at": "2021-03-28T15:37:04Z",
        "description": null,
        "details": {
            "header": "Se han recibido 0,09109957 UMA (1,69 €)",
            "health": "positive",
            "subtitle": "De Coinbase Earn",
            "title": "UMA recibidos"
        },
        "from": {
            "currency": "UMA",
            "id": "d3f6d4d4-b65d-5746-8c61-xxxxxxxxxxxx",
            "resource": "user",
            "resource_path": "/v2/users/d3f6d4d4-b65d-5746-8c61-xxxxxxxxxxxx"
        },
        "hide_native_amount": false,
        "id": "cd5161d6-9fe1-527c-a8d9-xxxxxxxxxxxx",
        "instant_exchange": false,
        "native_amount": {
            "amount": "1.69",
            "currency": "EUR"
        },
        "network": {
            "status": "off_blockchain",
            "status_description": null
        },
        "off_chain_status": "completed",
        "resource": "transaction",
        "resource_path": "/v2/accounts/fbe1c96a-4ef7-5843-9a98-xxxxxxxxxxxx/transactions/cd5161d6-9fe1-527c-a8d9-xxxxxxxxxxxx",
        "status": "completed",
        "type": "send",
        "updated_at": "2021-11-01T17:50:42Z"
    },
    {
        "amount": {
            "amount": "0.948317",
            "currency": "KAVA"
        },
        "created_at": "2023-01-24T06:04:42Z",
        "description": "Earn Task",
        "details": {
            "header": "Se han recibido 0,948317 KAVA (0,91 €)",
            "health": "positive",
            "subtitle": "De Desconocido",
            "title": "Kava recibidos"
        },
        "from": {
            "currency": "KAVA",
            "id": "17a7411b-291f-59a1-bba3-xxxxxxxxxxxx",
            "resource": "user",
            "resource_path": "/v2/users/17a7411b-291f-59a1-bba3-xxxxxxxxxxxx"
        },
        "hide_native_amount": false,
        "id": "6d047903-cfaf-5fc1-a787-xxxxxxxxxxxx",
        "instant_exchange": false,
        "native_amount": {
            "amount": "0.91",
            "currency": "EUR"
        },
        "network": {
            "status": "off_blockchain",
            "status_description": null
        },
        "off_chain_status": "completed",
        "resource": "transaction",
        "resource_path": "/v2/accounts/72890453-ccd2-5593-8ef8-xxxxxxxxxxxx/transactions/6d047903-cfaf-5fc1-a787-xxxxxxxxxxxx",
        "status": "completed",
        "type": "send",
        "updated_at": "2023-01-24T06:04:42Z"
eprbell commented 1 year ago

I have golden file tests.based on my own data and accounts and unfortunately this PR is breaking them. I'll have to investigate more to understand why this is happening: I'll let you know what I find.

macanudo527 commented 1 year ago

@Larision Thanks for making that change! I think this looks good to me. @eprbell if you have the time, maybe you can run the test on your golden files again?

Other than that we will have to wait for the macos bug to get resolved, which should be at the end of this week.

eprbell commented 1 year ago

@Larision Thanks for making that change! I think this looks good to me. @eprbell if you have the time, maybe you can run the test on your golden files again?

Other than that we will have to wait for the macos bug to get resolved, which should be at the end of this week.

Yes, I'll run the test again in the weekend and report back here.

eprbell commented 1 year ago

This works now! If there are no more concerns I think it's OK to merge this.

eprbell commented 1 year ago

@macanudo527, can you remind me what the MacOS bug is and what is the fix? Thanks.

macanudo527 commented 1 year ago

This should do the trick. I'm a little disappointed that they haven't uploaded the fix yet.

eprbell commented 1 year ago

This should do the trick. I'm a little disappointed that they haven't uploaded the fix yet.

Thanks for the pointer! I'm thinking we could move the supported versions from >=3.7 to >=3.8, which would have the side effect of fixing the problem without adding hacks. But if you have concerns about this we can hack the Github action files.

macanudo527 commented 1 year ago

This should do the trick. I'm a little disappointed that they haven't uploaded the fix yet.

Thanks for the pointer! I'm thinking we could move the supported versions from >=3.7 to >=3.8, which would have the side effect of fixing the problem without adding hacks. But if you have concerns about this we can hack the Github action files.

I don't think I have anything that is 3.7 specific. Should I put together a PR and see what, if anything, breaks?

eprbell commented 1 year ago

Sure, that'd be great!

eprbell commented 1 year ago

I think it should be enough to change this line: python-version: [3.7, 3.8, 3.9, "3.10"] to: python-version: [3.8, 3.9, "3.10", "3.11"]

In the following files:

This way we will start testing on 3.11, which is more recent/relevant than 3.7.

eprbell commented 1 year ago

I forgot: there is also a similar Python version thing in setup.cfg and there are a few references to 3.7 in the README files.

macanudo527 commented 1 year ago

I submitted a PR to bump the Python version #195 . but it looks like they already fixed it.