Changed: StorageResultType to error result code

This commit is contained in:
djmaze 2021-03-16 09:46:23 +01:00
parent be3ef15f8e
commit 4a8d516123
33 changed files with 257 additions and 302 deletions

View file

@ -1,5 +1,3 @@
import { StorageResultType } from 'Common/Enums';
import Remote from 'Remote/User/Fetch';
import { decorateKoCommands } from 'Knoin/Knoin';
@ -26,9 +24,9 @@ class TwoFactorTestPopupView extends AbstractViewPopup {
testCodeCommand() {
this.testing(true);
Remote.testTwoFactor((result, data) => {
Remote.testTwoFactor((iError, data) => {
this.testing(false);
this.codeStatus(StorageResultType.Success === result && data && !!data.Result);
this.codeStatus(!iError && data && !!data.Result);
if (this.koTestedTrigger && this.codeStatus()) {
this.koTestedTrigger(true);