diff --git a/lib/library.go b/lib/library.go index f75e7f5c855..8e24369340c 100644 --- a/lib/library.go +++ b/lib/library.go @@ -371,7 +371,7 @@ func NewOnboarding(n, mnemonicPhraseLength C.int) *C.char { return C.CString(string(outBytes)) } -//ImportOnboardingAccount re-creates and imports an account created during onboarding. +// ImportOnboardingAccount re-creates and imports an account created during onboarding. //export ImportOnboardingAccount func ImportOnboardingAccount(id, password *C.char) *C.char { info, mnemonic, err := statusBackend.AccountManager().ImportOnboardingAccount(C.GoString(id), C.GoString(password)) @@ -396,6 +396,12 @@ func ImportOnboardingAccount(id, password *C.char) *C.char { return C.CString(string(outBytes)) } +// ResetOnboarding resets the current onboarding removing from memory all the generated keys. +//export ResetOnboarding +func ResetOnboarding() { + statusBackend.AccountManager().ResetOnboarding() +} + //VerifyAccountPassword verifies account password //export VerifyAccountPassword func VerifyAccountPassword(keyStoreDir, address, password *C.char) *C.char { diff --git a/mobile/status.go b/mobile/status.go index bda7f8adef1..413120c8891 100644 --- a/mobile/status.go +++ b/mobile/status.go @@ -374,6 +374,11 @@ func ImportOnboardingAccount(id, password string) string { return string(outBytes) } +// ResetOnboarding resets the current onboarding removing from memory all the generated keys. +func ResetOnboarding() { + statusBackend.AccountManager().ResetOnboarding() +} + // VerifyAccountPassword verifies account password. func VerifyAccountPassword(keyStoreDir, address, password string) string { _, err := statusBackend.AccountManager().VerifyAccountPassword(keyStoreDir, address, password)