/// <summary>
        /// The edit wallet button has been clicked
        /// </summary>
        private void EditWalletButtonClicked()
        {
            currentPasswordField.InputFieldBase.interactable = false;
            settingsPopupAnimator.ShowLoadingIcon(nextButton.gameObject, loadingIcon, true);

            if (currentPasswordField.InputFieldBase.inputType == InputField.InputType.Standard)
            {
                currentPasswordField.EyeClicked();
            }

            walletPasswordVerification.VerifyPassword(currentPasswordField).OnPasswordCorrect(_ =>
            {
                if (nextButton == null)
                {
                    return;
                }

                settingsPopupAnimator.ShowLoadingIcon(nextButton.gameObject, loadingIcon, false);
                currentPasswordSection.AnimateScale(0f, 0.15f, () => walletNameSection.AnimateScale(1f, 0.15f));
                hopeOnlyCategoryButtons[2].transform.GetChild(0).GetComponent <TextMeshProUGUI>().text = "Wallet Name";
                hopeOnlyCategoryButtons[3].AnimateScaleX(1f, 0.15f);
                hopeOnlyCategoryButtons[4].AnimateScaleX(1f, 0.15f);
            })
            .OnPasswordIncorrect(() =>
            {
                if (nextButton == null)
                {
                    return;
                }

                nextButton.interactable = false;
                settingsPopupAnimator.ShowLoadingIcon(nextButton.gameObject, loadingIcon, false);
            });
        }
Пример #2
0
    /// <summary>
    /// Attempts to unlock the wallet with the password entered in the field.
    /// </summary>
    private void CheckPassword()
    {
        if (passwordField.InputFieldBase.inputType == InputField.InputType.Standard)
        {
            passwordField.EyeClicked();
        }

        walletPasswordVerification.VerifyPassword(passwordField)
        .OnPasswordCorrect(CorrectPassword)
        .OnPasswordIncorrect(IncorrectPassword);
    }
Пример #3
0
    /// <summary>
    /// Unlock button has been clicked and password is checked
    /// </summary>
    private void UnlockButtonClicked()
    {
        OnPasswordVerificationStarted?.Invoke();

        if (passwordField.InputFieldBase.inputType == InputField.InputType.Standard)
        {
            passwordField.EyeClicked();
        }

        walletPasswordVerification.VerifyPassword(passwordField)
        .OnPasswordCorrect(CorrectPassword)
        .OnPasswordIncorrect(IncorrectPassword);
    }