spesmilo / electrum

Electrum Bitcoin Wallet
https://electrum.org
MIT License
7.22k stars 3.02k forks source link

AssertionError: #9057

Closed TARS-bot closed 4 weeks ago

TARS-bot commented 1 month ago

Crash Report

This crash report was reported through the automatic crash reporting system 🤖

Traceback

Traceback (most recent call last):
  File "electrum\gui\qt\send_tab.py", line 248, in spend_max
AssertionError

AssertionError: 

Reporter

This issue was reported by 1 user(s):

Electrum Version Python Version Operating System Wallet Type Locale Stack
4.5.3 3.10.11 (tags/v3.10.11:7d4cc5a, Apr 5 2023, 00:20:04) [MSC v.1929 32 bit (Intel)] Windows-10-10.0.22631-SP0 standard pt_BR ℹ

Additional Information

The reporting user(s) did not provide additional information.

accumulator commented 4 weeks ago

This happens when a BIP21 contains an explicit amount=0.

Not sure how to handle 1) consider as invalid BIP21 uri 2) consider as 'amountless' invoice

SomberNight commented 4 weeks ago

Or, option (3): treat it as wanting to create a 0-value output. That would make sense for e.g. OP_RETURN, though I guess bip21 cannot be used for scripts that don't have a corresponding address.

  1. consider as 'amountless' invoice

There is an explicit amount, so I don't think this is correct.

I would prefer (1) or (3).

accumulator commented 4 weeks ago

(1) implemented in bb4ee2b50bd988326f892752574cbec94bb5a9b9