Feathercoin-Foundation / electrum-ftc

Electrum-FTC; Feathercoin thin client. Follows upstream by rebasing FTC patches. Tags remain stable.
MIT License
10 stars 8 forks source link

Sending transactions with Trezor model T does not work #108

Open strmci opened 5 years ago

strmci commented 5 years ago

Expected Behavior

Sending FTC with Trezor model T.

Current Behavior

After clicking on "send" button: Trezor response: "Trying to spend coins from another chain. Continue?" Electrum response: "Invalid address type"

Your Environment

image

toxeus commented 5 years ago

Thank you for your report. The issue is on Trezor's side. We have submitted the necessary PR with the params (and it got merged) but FTC hasn't been activated yet. See https://github.com/trezor/trezor-common/pull/105

napoly commented 5 years ago

Sorry to oppose you but I don't think your statement about Trezor's side is correct since both Electrum as well as Trezor are open source projects. I also believe that Trezor would like to see another coin in their portfolio.

Anyway I tried to reproduce this problem to see for myself and to wrap it here up for a simple tutorial for others to follow. To test this or to use Trezor with Feathercoin one actually doesn't have to own a physical device thanks to emulator.

  1. Download Trezor Bridge Head to https://wallet.trezor.io/#/bridge download and install Trezor bridge for communication with device. (My current version of bridge is 2.0.25) Github repo: https://github.com/trezor/webwallet-data/tree/master/bridge. After installation you might need to kill it again sudo killall trezord and start it with 'trezord -e 21324' so it will be visible for Trezor emulator locally.

  2. Install Electrum-ftc Clone this repository :). Build and install. Honestly I had some trouble with dependencies and python/python3 pip/pi3 mismatch but python isn't really my strongest skill. After some fight I was able to run it with command pipenv run python ./electrum-ftc -v in Intellij debug mode.

  3. Install Trezor Clone https://github.com/trezor/trezor-core.git and read through it's readme. Once successfully compiled run it with command PYOPT=0 ./emu.sh so it will start up in debug mode (red small square on top right corner) I also created mnemonic/pin as with normal device at wallet.trezor.io

  4. Downgrade python-trezor to 0.9.1 In order to see Trezor emulator from Electrum I had to downgrade python-trezor by command sudo pip3 install trezor==0.9.1 since I was facing this issue https://github.com/pooler/electrum-ltc/issues/201

After all these steps I was finally able to connect from Electrum-ftc to Trezor emulator. I was also able to receive and send Feathercoin in and out to my newly created Electrum/Trezor/Ftc wallet as seen on picture:

electrum_trezor_ftc_send

Running on Linux Mint as well. I'm using Electrum-ftc Version 3.2.2.0 commit 9be8a8c054565dc430ce0fc91b1100fbf692da5d from 8/30/18 so there hasn't been any change in Electrum-ftc since this issue was open. It's possible this issue has been fixed in Trezor code-base and we weren't notified so it would be nice if somebody could try this out to confirm.

Hope this info helps at least a little... so we could have Feathercoin with native Trezor support in future as well.

toxeus commented 5 years ago

Thank you for your very valuable information. This is great help towards full trezor support.

Clone this repository :). Build and install. Honestly I had some trouble with dependencies and python/python3 pip/pi3 mismatch but python isn't really my strongest skill.

To avoid problems like these I suggest that you follow the the recommended installation method instead :wink:. It does a clone behind the scenes (see git+ prefix in the url) but also fetches all the python dependencies. But if you insist in cloning yourself then there is even a guide for doing exactly that.