Пример #1
0
 public void OnDestroy()
 {
     if (instance == this)
     {
         instance = null;
     }
 }
Пример #2
0
    void Start()
    {
        if (instance == null)
        {
            instance = this;
        }

        // retrieve the url from the Wallet Manager
        _url = "https://ropsten.infura.io";

        TokenInfo.symbol   = "???";
        TokenInfo.decimals = 18; // add default values. TODO: make sure these are populated before checking balance

        // Here we assign the contract as a new contract and we send it the ABI and contact address
        this.contract = new Contract(null, ABI, TokenContractAddress);

        //WalletManager.Instance.LoadingIndicator.SetActive(true);

        StartCoroutine(GetTokenInfo());
    }
Пример #3
0
    void Awake()
    {
        if (instance == null)
        {
            instance = this;
            WalletManager wallet = gameObject.GetComponent <WalletManager>();
            wallet.SetInstance();
        }

        // retrieve the url from the Wallet Manager
        Debug.Log(WalletManager.Instance);
        _url = WalletManager.Instance.networkUrl;

        TokenInfo.symbol   = "???";
        TokenInfo.decimals = 18; // add default values. TODO: make sure these are populated before checking balance

        // Here we assign the contract as a new contract and we send it the ABI and contact address
        this.contract = new Contract(null, ABI, TokenContractAddress);

        WalletManager.Instance.AddInfoText("[Loading Token Info...]", true);
        WalletManager.Instance.LoadingIndicator.SetActive(true);

        StartCoroutine(GetTokenInfo());
    }