cryptoadvance / specter-diy

DIY airgapped hardware wallet that uses QR codes for communication with the host
MIT License
440 stars 73 forks source link

Gracefully finish writing to flash on power off #114

Closed stepansnigirev closed 3 years ago

stepansnigirev commented 3 years ago

This damages flash memory and wipes the data if the power button is pressed while data is being written to flash: https://github.com/cryptoadvance/specter-diy/blob/master/boot/main/boot.py#L14-L16

Register a callback instead that would wait for write operations to finish and then gracefully shut down.

stepansnigirev commented 3 years ago

Fixed in https://github.com/cryptoadvance/specter-diy/commit/2f51e152bcdb184cf719792e6c5f972214e3dd36