File tree 7 files changed +13
-13
lines changed
7 files changed +13
-13
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ import (
23
23
24
24
// CreateBackup is called after SetPassword() to create the backup.
25
25
func (device * Device ) CreateBackup () error {
26
- if device .status != StatusSeeded && device .status != StatusInitialized {
26
+ if device .status != StatusSeeded && device .status != StatusUnlocked {
27
27
return errp .New ("invalid status" )
28
28
}
29
29
@@ -49,7 +49,7 @@ func (device *Device) CreateBackup() error {
49
49
return errp .New ("unexpected response" )
50
50
}
51
51
if device .status == StatusSeeded {
52
- device .changeStatus (StatusInitialized )
52
+ device .changeStatus (StatusUnlocked )
53
53
}
54
54
return nil
55
55
}
@@ -130,6 +130,6 @@ func (device *Device) RestoreBackup(id string) error {
130
130
if ! ok {
131
131
return errp .New ("unexpected response" )
132
132
}
133
- device .changeStatus (StatusInitialized )
133
+ device .changeStatus (StatusUnlocked )
134
134
return nil
135
135
}
Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ func TestSimulatorBackups(t *testing.T) {
38
38
require .Error (t , err )
39
39
40
40
require .NoError (t , device .CreateBackup ())
41
- require .Equal (t , StatusInitialized , device .Status ())
41
+ require .Equal (t , StatusUnlocked , device .Status ())
42
42
43
43
list , err = device .ListBackups ()
44
44
require .NoError (t , err )
Original file line number Diff line number Diff line change @@ -261,7 +261,7 @@ func (device *Device) Init() error {
261
261
if ! deviceInfo .version .AtLeast (semver .NewSemVer (9 , 20 , 0 )) {
262
262
device .changeStatus (StatusConnected )
263
263
} else if deviceInfo .unlocked {
264
- device .changeStatus (StatusInitialized )
264
+ device .changeStatus (StatusUnlocked )
265
265
} else if * deviceInfo .initialized {
266
266
// deviceInfo.initialized is not nil if version is at least 9.20.0.
267
267
device .changeStatus (StatusConnected )
Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ func (device *Device) ShowMnemonic() error {
38
38
return errp .New ("unexpected response" )
39
39
}
40
40
if device .status == StatusSeeded {
41
- device .changeStatus (StatusInitialized )
41
+ device .changeStatus (StatusUnlocked )
42
42
}
43
43
return nil
44
44
}
@@ -63,7 +63,7 @@ func (device *Device) RestoreFromMnemonic() error {
63
63
if ! ok {
64
64
return errp .New ("unexpected response" )
65
65
}
66
- device .changeStatus (StatusInitialized )
66
+ device .changeStatus (StatusUnlocked )
67
67
return nil
68
68
}
69
69
Original file line number Diff line number Diff line change @@ -175,7 +175,7 @@ func (device *Device) ChannelHashVerify(ok bool) {
175
175
return
176
176
}
177
177
if info .Initialized {
178
- device .changeStatus (StatusInitialized )
178
+ device .changeStatus (StatusUnlocked )
179
179
} else {
180
180
device .changeStatus (StatusUninitialized )
181
181
}
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ const (
24
24
StatusConnected Status = "connected"
25
25
26
26
// StatusUnpaired means the pairing has not been confirmed yet. After the pairing screen has
27
- // been confirmed, we move to StatusUninitialized or StatusInitialized depending on the device
27
+ // been confirmed, we move to StatusUninitialized or StatusUnlocked depending on the device
28
28
// status.
29
29
StatusUnpaired Status = "unpaired"
30
30
@@ -36,12 +36,12 @@ const (
36
36
StatusUninitialized Status = "uninitialized"
37
37
38
38
// StatusSeeded is after SetPassword(), before CreateBack() during initialization of the
39
- // device. Use CreateBackup() to move to StatusInitialized .
39
+ // device. Use CreateBackup() to move to StatusUnlocked .
40
40
StatusSeeded Status = "seeded"
41
41
42
- // StatusInitialized means the device is seeded and the backup was created, and the device is
42
+ // StatusUnlocked means the device is seeded and the backup was created, and the device is
43
43
// unlocked. The keystore is ready to use.
44
- StatusInitialized Status = "initialized "
44
+ StatusUnlocked Status = "unlocked "
45
45
46
46
// StatusRequireFirmwareUpgrade means that the a firmware upgrade is required before being able
47
47
// to proceed to StatusLoggedIn or StatusSeeded (firmware version too old).
Original file line number Diff line number Diff line change @@ -87,7 +87,7 @@ func (device *Device) SetPassword(seedLen int) error {
87
87
if seedLen == 16 && ! device .version .AtLeast (semver .NewSemVer (9 , 6 , 0 )) {
88
88
return UnsupportedError ("9.6.0" )
89
89
}
90
- if device .status == StatusInitialized {
90
+ if device .status == StatusUnlocked {
91
91
return errp .New ("invalid status" )
92
92
}
93
93
request := & messages.Request {
You can’t perform that action at this time.
0 commit comments