Procházet zdrojové kódy

промежуточное

Rimmon před 3 roky
rodič
revize
88ce6dadfa
3 změnil soubory, kde provedl 20 přidání a 15 odebrání
  1. 2 2
      Models/AccountModel.cs
  2. 10 5
      Models/SmartContract.cs
  3. 8 8
      Pages/ModalAssets.razor

+ 2 - 2
Models/AccountModel.cs

@@ -35,8 +35,8 @@ namespace HyperCube.Models
         [Inject]
         ProtectedSessionStorage storage { get; set; }
         //public event EventHandler<int> RolesChanged;
-        int ratingExpert;
-        int ratingProspector;
+        int ratingExpert = 1;
+        int ratingProspector = 1;
         public int GetRatingExpert()
         {
             return ratingExpert;

+ 10 - 5
Models/SmartContract.cs

@@ -138,20 +138,25 @@ namespace HyperCube.Models
                 var initiator_address = await initiator.GetOrCreateActualAddress(bc);
                 //var article_value = (int)newArticle.Rating;
                 var article_value = newArticle.CalcPValue();
-                article_value *= verifier.GetRatingExpert()*initiator.GetRatingProspector();
 
-                //calc expert reward
-                //calc initiator reward
+
                 //calc comission
+
                 //init add transaction 2 contract
                 //add transaction 2db
                 //init notifications
 
-
-
                 var article_value_hex = article_value.ToString("X64");
                 //Console.WriteLine($"article_value {article_value} hex {article_value_hex}");
                 var edits = await newArticle.GetEditsCount();
+
+                //GetRatingExpert - ???
+                //GetRatingProspector - ???
+                var expert_value = article_value * verifier.GetRatingExpert() * edits;
+                var initiator_value = article_value * initiator.GetRatingProspector();
+
+                Console.WriteLine($"article_value {article_value} expert_value {expert_value} initiator_value {initiator_value} ");
+                return "none";
                 var edits_hex = edits.ToString("X64");
                 verifier_address = Blockchain.zerofill(verifier_address, 64, true);
                 initiator_address = Blockchain.zerofill(initiator_address, 64, true);

+ 8 - 8
Pages/ModalAssets.razor

@@ -6,17 +6,17 @@
                     <img src="img/packet.svg" alt="">
                     <p>Цифровые активы</p>
                 </div>
-                <div class="modal__body__header__href">
+                @*<div class="modal__body__header__href">
                     <a href="">Balans</a>
                     <a href="">Swap</a>
                     <a href="">Liquidity</a>
-                </div>
+                </div>*@
             </div>
             <div class="modal__body__container">
                 <div class="modal__body__container__left">
                     <div class="modal__body__calc__balance__header">
                         <p>БАЛАНС</p>
-                        <button class="btn_orange">История</button>
+                        @*<button class="btn_orange">История</button>*@
                     </div>
                     <div class="modal__body__calc__balance__numbers">
                         <div class="modal__body__calc__balance__numbers__name">
@@ -50,12 +50,12 @@
                             </div>
                         </div>
                     </div>
-                    <div class="modal__body__calc__balance__button">
-                        <button class="btn_orange btn_center">Депозиты</button>
+                    @*<div class="modal__body__calc__balance__button">
+                        <button class="btn_orange btn_center">Пополнение</button>
                         <button class="btn_orange btn_center">Вывод</button>
-                    </div>
+                    </div>*@
                 </div>
-                <div class="modal__body__container__right">
+                @*<div class="modal__body__container__right">
                     <p class="modal__body__calc__change__header">Обмен</p>
                     <p class="modal__body__calc__change__desc">Trade tokens in an istant</p>
                     <div class="modal__input__box" place="From" balanc='0.00000410' currency='ETH'>
@@ -82,7 +82,7 @@
                     <div class="modal__input__button">
                         <button class="btn_orange btn_center">ОК</button>
                     </div>
-                </div>
+                </div>*@
             </div>
         </div>
         <a class="modal_close" style="cursor:pointer" @onclick="@Close">&#10006;</a>