cryptoadvance / spectrum

Electrum adaptor simulating Bitcoin RPC protocol
MIT License
8 stars 11 forks source link

initial extension #9

Closed k9ert closed 1 year ago

k9ert commented 1 year ago

With this PR, spectrum wil get an extension for Specter Desktop. I tried to separate the stuff as best as possible. Spectrum heavy lifting is rarely touched and keep in cryptoadvance.spectrum. All stuff which is specific to the extension is located in cryptoadvance.specterext.spectrum. Namely:

This PR needs the changes in https://github.com/cryptoadvance/specter-desktop/pull/1913 to work.

moneymanolis commented 1 year ago

Many tests are failing because an outdated version of Specter Core is used for the tests: cryptoadvance.specter==1.10.3 is pinned intest_requirements.txt which gets installed by the GitHub actions (see pytest.yml, line 22).

moneymanolis commented 1 year ago

Issues / quirks / bugs (running in "extension" mode not stand-alone)

Adding below tospectrum_node.py?

@property
def datadir(self):
# Spectrum node has no Bitcoin Core datadir
    return None
grafik

I suppose the problem is, that there is no working_folder for the wallet_manager:

grafik grafik

Features / improvements

Currently, the only visible feeback to see whether the Electrum connection is established / working is the block count at the top left. There should be immediate feedback after "Save" plus a visible icon (as we have in Specter Core) to signal no connection.

No connection:

grafik

Connection:

grafik
moritzwietersheim commented 1 year ago

I did an initial test on my MacBook Pro M1, of dmg release v1.13.2-pre7 on mainnet. Loads & connects very nicely, without Problems. Loaded my multisig-demo wallet & single-sig demo wallet.

I could prepare an unsigned tx for multisig normally, and could also scan & sign with Specter DIY via QR. When I tried to sign with Trezor One there was no USB signing option. telegram-cloud-photo-size-2-5411293515037655333-x

Still see these Speed-up & Cancel Transaction bug, and doesnt dissappear after some time. image

The icon at the top of the status line is somehow distorted. telegram-cloud-photo-size-2-5411293515037655331-y

k9ert commented 1 year ago

This PR is not really sustainable. Change-rate is much faster than review rate. Let's start from scratch and simply merge it.