toporin / pysatochip Goto Github PK
View Code? Open in Web Editor NEWSimple python library to communicate with a Satochip hardware wallet - https://pypi.org/project/pysatochip/
License: GNU Lesser General Public License v3.0
Simple python library to communicate with a Satochip hardware wallet - https://pypi.org/project/pysatochip/
License: GNU Lesser General Public License v3.0
During a code analysis of Uniblow, I uncover that the CardConnector card_reset_seed method is buggy when one calls with a PIN of type bytes. I replaced it with: pin = list(pin)
The issue is there :
pysatochip/pysatochip/CardConnector.py
Line 717 in bf577b4
I noticed that pysatochip 0.12.3 is pinpointing specific versions of libraries in https://github.com/Toporin/pysatochip/blob/master/requirements.txt
This is causing me some headaches when Electrum ABC already has dependencies to different/newer versions of those libraries. Do you think it would be possible to replace all ==
by >=
in the requirements, to be more future proof and cause less conflicts?
For now I'm able to work around the issue, so it is not urgent. But something to think about for future releases.
It only causes problems when I try to build a deterministic release, with all version numbers pinpointed on the Electrum ABC side as well. Then there are conflicts that I need to solve by downgrading some library versions on my end.
When I first open my satochip wallet, I get the message "Enter the pin for your None"
If I open the wallet again later in the same session, it correctly says "Enter the pin for your Satochip"
This is a very minor issue, I'm submitting it just in case you have an idea for a very simple fix. Maybe there is anything that can be done on the Electrum side to cause card_type
to be defined earlier in the wallet opening process?
Or else, maybe just add a fallback in pysatochip.CardConnector
:
def card_verify_PIN(self):
logger.debug("In card_verify_PIN")
while (self.card_present):
if self.pin is None:
is_PIN= False
if self.client is not None:
+ card_type = self.card_type or "card"
+ msg = f'Enter the PIN for your {card_type}:'
- msg = f'Enter the PIN for your {self.card_type}:'
(is_PIN, pin_0)= self.client.PIN_dialog(msg) #todo: use request?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.