Fix/stuck on keys saved (#3823)
* fixed: getting stuck on the "Keys saved" randomly * bump version
This commit is contained in:
parent
1df8c1c511
commit
b81ad3fcac
|
@ -12,8 +12,6 @@ import (
|
|||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/status-im/status-go/timesource"
|
||||
|
||||
"github.com/status-im/status-go/images"
|
||||
|
||||
"github.com/imdario/mergo"
|
||||
|
@ -1139,11 +1137,7 @@ func (b *GethStatusBackend) CreateAccountAndLogin(request *requests.CreateAccoun
|
|||
if err := request.Validate(); err != nil {
|
||||
return err
|
||||
}
|
||||
customizationColorClock, err := timesource.GetCurrentTimeInMillis()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return b.generateOrImportAccount("", customizationColorClock, request)
|
||||
return b.generateOrImportAccount("", 1, request)
|
||||
}
|
||||
|
||||
func (b *GethStatusBackend) ConvertToRegularAccount(mnemonic string, currPassword string, newPassword string) error {
|
||||
|
|
|
@ -189,6 +189,12 @@ func (s *NTPTimeSource) updateOffset() error {
|
|||
offset, err := computeOffset(s.timeQuery, s.servers, s.allowedFailures)
|
||||
if err != nil {
|
||||
log.Error("failed to compute offset", "error", err)
|
||||
s.mu.Lock()
|
||||
defer s.mu.Unlock()
|
||||
for _, c := range s.callbacks {
|
||||
c.callback(now())
|
||||
c.wg.Done()
|
||||
}
|
||||
return errUpdateOffset
|
||||
}
|
||||
log.Info("Difference with ntp servers", "offset", offset)
|
||||
|
@ -262,5 +268,8 @@ func GetCurrentTimeInMillis() (uint64, error) {
|
|||
ts.AddCallback(func(now time.Time) {
|
||||
t = uint64(now.UnixNano() / int64(time.Millisecond))
|
||||
}).Wait()
|
||||
return t, nil
|
||||
if ts.updatedOffset {
|
||||
return t, nil
|
||||
}
|
||||
return 0, errUpdateOffset
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue