mirror of
https://github.com/status-im/status-keycard-go.git
synced 2025-01-31 08:37:16 +00:00
add factory reset
This commit is contained in:
parent
e3c16d0e57
commit
ec962ae1e7
@ -1,12 +1,14 @@
|
||||
package statuskeycardgo
|
||||
|
||||
import "errors"
|
||||
|
||||
func (f *KeycardFlow) factoryReset(kc *keycardContext) error {
|
||||
// on success, remove the FactoryReset switch to avoid re-triggering it
|
||||
// if card is disconnected/reconnected
|
||||
err := kc.factoryReset()
|
||||
|
||||
if err == nil {
|
||||
delete(f.params, FactoryReset)
|
||||
return errors.New("not implemented")
|
||||
return restartErr()
|
||||
} else {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
func (f *KeycardFlow) selectKeycard(kc *keycardContext) error {
|
||||
|
@ -463,7 +463,7 @@ func (kc *keycardContext) changePairingPassword(pairingPassword string) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (kc *keycardContext) factoryReset(pairingPassword string) error {
|
||||
func (kc *keycardContext) factoryReset() error {
|
||||
<-kc.connected
|
||||
if kc.runErr != nil {
|
||||
return kc.runErr
|
||||
|
Loading…
x
Reference in New Issue
Block a user