Ejemplo n.º 1
0
    private void UpdateItemInfo(Hodler.Output.Item item, BigInteger lockedTimeStamp)
    {
        item.LockedTimeStamp = lockedTimeStamp;

        if (item.Unlockable && !item.UnlockableGasLimit.HasValue)
        {
            GasUtils.EstimateContractGasLimit <Hodler.Messages.Release>(hodlerContract.ContractAddress,
                                                                        userWalletManager.GetWalletAddress(),
                                                                        item.Id).OnSuccess(limit => item.UnlockableGasLimit = limit);
        }
    }
Ejemplo n.º 2
0
    private void CreateItem(Hodler.Output.Item item, bool initialWalletLoad = true)
    {
        LockedPRPSItemButton itemButton = lockedPRPSItemFactory.Create().SetButtonInfo(item);

        itemButton.UseUnlockableTime = useUnlockableTime;

        Transform componentTransform = itemButton.transform;
        Transform parentTransform    = componentTransform.parent;

        itemButton.StartButtonUpdates();

        parentTransform.parent        = itemSpawnTransform;
        parentTransform.localScale    = new Vector3(0f, 1f, 1f);
        componentTransform.localScale = Vector3.one;

        if (!initialWalletLoad)
        {
            lockedPRPSAnimator.AnimateWalletIn(parentTransform.gameObject);
        }

        lockedPRPSItems.Add(itemButton);
    }
Ejemplo n.º 3
0
    private void AddNewItem(Hodler.Output.Item item, BigInteger lockedTimeStamp)
    {
        if (item.ReleaseTime == 0)
        {
            return;
        }

        if (!lockedItems.Select(lockedItem => lockedItem.LockedTimeStamp).Contains(lockedTimeStamp))
        {
            UpdateItemInfo(item, lockedTimeStamp);
            lockedItems.Add(item);
            lockedItems.Sort((i1, i2) => i2.LockedTimeStamp.CompareTo(i1.LockedTimeStamp));
            lockedItems.Sort((i1, i2) => i1.Unlockable && i2.Unlockable ? 0 : i1.Unlockable ? -1 : i2.Unlockable ? 1 : 0);
            UsedIds.Add(item.Id);
        }
        else
        {
            var oldItem = lockedItems.Single(lockedItem => lockedItem.LockedTimeStamp == lockedTimeStamp);
            oldItem.Fulfilled = item.Fulfilled;
            UpdateItemInfo(oldItem, lockedTimeStamp);
        }
    }
Ejemplo n.º 4
0
 private void UpdateItemList(Hodler.Output.Item item, BigInteger lockedTimeStamp)
 {
     AddNewItem(item, lockedTimeStamp);
     CheckItemUpdateCounter();
 }