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

Feature: stacktrack 0.2.1 and spectrum 0.3.1 #2074

Merged
merged 4 commits into from
Jan 24, 2023

Conversation

k9ert
Copy link
Collaborator

@k9ert k9ert commented Jan 23, 2023

No description provided.

@netlify
Copy link

netlify bot commented Jan 23, 2023

Deploy Preview for specter-desktop-docs canceled.

Name Link
🔨 Latest commit d728f31
🔍 Latest deploy log https://app.netlify.com/sites/specter-desktop-docs/deploys/63cfbea9390ce700087e56c7

@moneymanolis
Copy link
Collaborator

I am getting this error when trying to access the wallets overview:

Traceback (most recent call last):
  File "/Users/heinzi/.pyenv/versions/.new-stacktrace-version/lib/python3.10/site-packages/flask/app.py", line 1523, in full_dispatch_request
    rv = self.dispatch_request()
  File "/Users/heinzi/.pyenv/versions/.new-stacktrace-version/lib/python3.10/site-packages/flask/app.py", line 1509, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
  File "/Users/heinzi/.pyenv/versions/.new-stacktrace-version/lib/python3.10/site-packages/flask_login/utils.py", line 272, in decorated_view
    return func(*args, **kwargs)
  File "/Users/heinzi/.pyenv/versions/.new-stacktrace-version/lib/python3.10/site-packages/cryptoadvance/specterext/stacktrack/controller.py", line 79, in wallets_overview
    txs: list = _extract_txs(wallets)
  File "/Users/heinzi/.pyenv/versions/.new-stacktrace-version/lib/python3.10/site-packages/cryptoadvance/specterext/stacktrack/controller.py", line 124, in _extract_txs
    return sorted(txs, key=lambda d: d["blockheight"], reverse=True)
TypeError: '<' not supported between instances of 'NoneType' and 'int'

Chart in an individual wallet works fine, though (didn't work for me with the prior version):

grafik

@moneymanolis
Copy link
Collaborator

moneymanolis commented Jan 23, 2023

I've investigated the error a bit and it is very likely due to blockheight being None. return sorted(txs, key=lambda d: d["blockheight"], reverse=True) is sorting by the blockheight which doesn't work of course if it is None. The respective test for this (def test_txlist) didn't capture this since it was:
assert tx.blockheight is None or tx.blockheight > 200

Tagging @wombat6 as well here.

@moneymanolis
Copy link
Collaborator

moneymanolis commented Jan 23, 2023

Digging into txlist.py and the properties of TxItem:

"blockheight", # int, blockheight, None if not confirmed

So, it looks to me that the issue is with unconfirmed transactions!

Copy link
Collaborator

@moneymanolis moneymanolis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Handling of unconfirmed transactions with blockheight None has to be fixed.

@k9ert
Copy link
Collaborator Author

k9ert commented Jan 24, 2023

I am getting this error when trying to access the wallets overview:

Mitigated: In v0.2.1 you get a msg like:

Due to cryptoadvance/specterext-stacktrack#12 the chart is not available for unconfirmed transactions. Check the logs for details

I've investigated the error a bit and ...

I've created cryptoadvance/specterext-stacktrack#12

@k9ert k9ert changed the title Feature: stacktrack 0.2.0 and spectrum 0.3.1 Feature: stacktrack 0.2.1 and spectrum 0.3.1 Jan 24, 2023
Copy link
Collaborator

@moneymanolis moneymanolis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Error is caught now and wallets overview is shown without chart if there are unconfirmed tx.

@moneymanolis moneymanolis merged commit 04bd875 into cryptoadvance:master Jan 24, 2023
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.

2 participants