public TransactionTabManager( TradableAssetManager tradableAssetManager, EthereumTransactionManager ethereumTransactionManager, IconButtons transactionTabs) { this.tradableAssetManager = tradableAssetManager; this.ethereumTransactionManager = ethereumTransactionManager; this.transactionTabs = transactionTabs; allTabText = transactionTabs.gameObject.GetComponentsInChildren <TMP_Text>()[0]; sentTabText = transactionTabs.gameObject.GetComponentsInChildren <TMP_Text>()[1]; receivedTabText = transactionTabs.gameObject.GetComponentsInChildren <TMP_Text>()[2]; tradableAssetManager.OnBalancesUpdated += ChangeText; ethereumTransactionManager.OnTransactionsAdded += ChangeText; transactionTabs.OnButtonChanged += TabChanged; AccountsPopup.OnAccountChanged += _ => ChangeText(); }
/// <summary> /// Sets the necessary values /// </summary> private void Awake() { settingsCategories = settingsCategoriesParent.GetComponent <IconButtons>(); settingsCategories.OnButtonChanged += CategoryChanged; }