/// <summary>
    /// Removes the periodic updater and unsubscribes all UserWalletManager events.
    /// </summary>
    protected virtual void OnDisable()
    {
        UserWalletManager.OnWalletLoadSuccessful   -= OnWalletLoadSuccessful;
        UserWalletManager.OnWalletLoadUnsuccessful -= OnWalletLoadUnsuccessful;

        periodicUpdateManager.RemovePeriodicUpdater(this);
    }
Exemplo n.º 2
0
 /// <summary>
 /// Checks if purpose was removed as the most recently removed TradableAsset, and stops updating the LockPRPSManager if so.
 /// </summary>
 /// <param name="tradableAsset"> The most recently removed TradableAsset from the TradableAssetManager. </param>
 private void CheckIfPRPSRemoved(TradableAsset tradableAsset)
 {
     if (tradableAsset.AssetAddress.EqualsIgnoreCase(prpsContract.ContractAddress))
     {
         periodicUpdateManager.RemovePeriodicUpdater(this);
     }
 }
 /// <summary>
 /// Unsubscribes the gas price observable and removes the periodic updater.
 /// </summary>
 public void Destroy()
 {
     periodicUpdateManager.RemovePeriodicUpdater(this);
     transactionSpeedSlider.Stop();
 }