public PasswordSection( PlayerPrefPasswordDerivation playerPrefPasswordDerivation, UserWalletManager userWalletManager, HopeWalletInfoManager hopeWalletInfoManager, DynamicDataCache dynamicDataCache, SettingsPopupAnimator settingsPopupAnimator, HopeInputField newPasswordField, HopeInputField confirmPasswordField, Button saveButton, GameObject loadingIcon) { this.playerPrefPasswordDerivation = playerPrefPasswordDerivation; this.hopeWalletInfoManager = hopeWalletInfoManager; this.dynamicDataCache = dynamicDataCache; this.settingsPopupAnimator = settingsPopupAnimator; this.newPasswordField = newPasswordField; this.confirmPasswordField = confirmPasswordField; this.saveButton = saveButton; this.loadingIcon = loadingIcon; walletEncryptor = new WalletEncryptor(playerPrefPasswordDerivation, dynamicDataCache); walletDecryptor = new WalletDecryptor(playerPrefPasswordDerivation, dynamicDataCache); walletInfo = hopeWalletInfoManager.GetWalletInfo(userWalletManager.GetWalletAddress()); newPasswordField.OnInputUpdated += _ => PasswordsUpdated(); confirmPasswordField.OnInputUpdated += _ => PasswordsUpdated(); saveButton.onClick.AddListener(SavePasswordButtonClicked); }
/// <summary> /// Initializes the WalletCreator with all required references. /// </summary> /// <param name="popupManager"> The active PopupManager. </param> /// <param name="playerPrefPassword"> The PlayerPrefPassword to use to encrypt the wallet. </param> /// <param name="dynamicDataCache"> The active DynamicDataCache. </param> /// <param name="hopeWalletInfoManager"> The active HopeWalletInfoManager. </param> public WalletCreator( PopupManager popupManager, PlayerPrefPasswordDerivation playerPrefPassword, DynamicDataCache dynamicDataCache, HopeWalletInfoManager hopeWalletInfoManager) : base(popupManager, playerPrefPassword, dynamicDataCache, hopeWalletInfoManager) { walletEncryptor = new WalletEncryptor(playerPrefPassword, dynamicDataCache); }