Esempio n. 1
0
    public void Construct(
        PlayerPrefPasswordDerivation playerPrefPasswordDerivation,
        UserWalletManager userWalletManager,
        HopeWalletInfoManager hopeWalletInfoManager,
        WalletPasswordVerification walletPasswordVerification,
        ContactsManager contactsManager,
        DynamicDataCache dynamicDataCache,
        ButtonClickObserver buttonClickObserver,
        CurrencyManager currencyManager,
        LogoutHandler logoutHandler)
    {
        this.playerPrefPasswordDerivation = playerPrefPasswordDerivation;
        this.userWalletManager            = userWalletManager;
        this.hopeWalletInfoManager        = hopeWalletInfoManager;
        this.walletPasswordVerification   = walletPasswordVerification;
        this.contactsManager     = contactsManager;
        this.dynamicDataCache    = dynamicDataCache;
        this.buttonClickObserver = buttonClickObserver;
        this.currencyManager     = currencyManager;
        this.logoutHandler       = logoutHandler;

        buttonClickObserver.SubscribeObservable(this);
        defaultCurrencyOptions.ButtonClicked((int)currencyManager.ActiveCurrency);

        walletName = hopeWalletInfoManager.GetWalletInfo(userWalletManager.GetWalletAddress()).WalletName;

        deleteWalletButton.onClick.AddListener(() => popupManager.GetPopup <GeneralOkCancelPopup>(true)
                                               .SetSubText($"Are you sure you want to delete wallet '{walletName}'?\nThis cannot be undone!")
                                               .OnOkClicked(() => DeleteWallet(userWalletManager, hopeWalletInfoManager, logoutHandler))
                                               .DisableEnterButton());
    }
        public WalletNameSection(
            HopeWalletInfoManager hopeWalletInfoManager,
            WalletPasswordVerification walletPasswordVerification,
            ContactsManager contactsManager,
            DynamicDataCache dynamicDataCache,
            UserWalletManager userWalletManager,
            SettingsPopupAnimator settingsPopupAnimator,
            GameObject currentPasswordSection,
            GameObject walletNameSection,
            GameObject loadingIcon,
            HopeInputField currentPasswordField,
            HopeInputField currentWalletNameField,
            HopeInputField newWalletNameField,
            Button nextButton,
            Button saveButton,
            GameObject[] hopeOnlyCategoryButtons)
        {
            this.hopeWalletInfoManager      = hopeWalletInfoManager;
            this.walletPasswordVerification = walletPasswordVerification;
            this.contactsManager            = contactsManager;
            this.dynamicDataCache           = dynamicDataCache;
            this.settingsPopupAnimator      = settingsPopupAnimator;
            this.currentPasswordSection     = currentPasswordSection;
            this.walletNameSection          = walletNameSection;
            this.loadingIcon             = loadingIcon;
            this.currentPasswordField    = currentPasswordField;
            this.currentWalletNameField  = currentWalletNameField;
            this.newWalletNameField      = newWalletNameField;
            this.nextButton              = nextButton;
            this.saveButton              = saveButton;
            this.hopeOnlyCategoryButtons = hopeOnlyCategoryButtons;

            walletInfo = hopeWalletInfoManager.GetWalletInfo(userWalletManager.GetWalletAddress());
            SetListeners();
        }
Esempio n. 3
0
 public void Construct(
     UIManager uiManager,
     UserWalletManager userWalletManager,
     DynamicDataCache dynamicDataCache,
     ButtonClickObserver buttonClickObserver,
     WalletPasswordVerification walletPasswordVerification)
 {
     this.uiManager                  = uiManager;
     this.userWalletManager          = userWalletManager;
     this.dynamicDataCache           = dynamicDataCache;
     this.buttonClickObserver        = buttonClickObserver;
     this.walletPasswordVerification = walletPasswordVerification;
 }
Esempio n. 4
0
    public void Construct(
        HopeWalletInfoManager hopeWalletInfoManager,
        UserWalletManager userWalletManager,
        WalletPasswordVerification walletPasswordVerification,
        LogoutHandler logoutHandler,
        DynamicDataCache dynamicDataCache,
        ButtonClickObserver buttonClickObserver)
    {
        this.walletPasswordVerification = walletPasswordVerification;
        this.logoutHandler       = logoutHandler;
        this.dynamicDataCache    = dynamicDataCache;
        this.buttonClickObserver = buttonClickObserver;

        walletName     = hopeWalletInfoManager.GetWalletInfo(userWalletManager.GetWalletAddress()).WalletName;
        formTitle.text = walletName;

        SetMessageText();

        (dynamicDataCache.GetData("pass") as ProtectedString)?.SetValue(RandomBytes.Secure.SHA3.GetBytes(16));
    }