Browse Source

small update

Rimmon 4 years ago
parent
commit
4545ee3c91
2 changed files with 11 additions and 13 deletions
  1. 1 1
      Models/Blockchain.cs
  2. 10 12
      Pages/Blockchains.razor

+ 1 - 1
Models/Blockchain.cs

@@ -44,7 +44,7 @@ namespace HyperCube.Models
             Console.WriteLine("loaded blockchains " + loaded.Count);
 
             LoadContracts();
-
+            Console.WriteLine("LoadContracts count " + contracts.Count);
             return $"Blockchain connected: {url}";
         }
 

+ 10 - 12
Pages/Blockchains.razor

@@ -50,22 +50,20 @@
         <input id="bytecode" size="100" @bind="bytecode" name="bytecode" type="text" placeholder="Transaction address" @bind:event="oninput">
         <br />
     </p>*@
-    <p>
-        <select>
-            @if (Blockchain.newData)
-    {
-                @if (Blockchain.loaded.Count > 0)
-                {
-                @foreach (var c in Blockchain.loaded[0].contracts.Values)
-                    {
+<p>
+    <select>
+        @if (Blockchain.loaded.Count > 0)
+        {
+            @foreach (var c in Blockchain.loaded[0].contracts.Values)
+            {
                 <option>
                     Bytecode: @c.ByteCode
                 </option>
-                    }
-                }
             }
-        </select>
-    </p>
+        }
+    </select>
+    @Blockchain.newData
+</p>
     <p>@result</p>
 
     @code