فهرست منبع

балансы

Rimmon 3 سال پیش
والد
کامیت
37c6007cfe
1فایلهای تغییر یافته به همراه26 افزوده شده و 26 حذف شده
  1. 26 26
      Pages/ModalAssets.razor

+ 26 - 26
Pages/ModalAssets.razor

@@ -24,13 +24,13 @@
                         </div>
                         <div class="modal__body__calc__balance__numbers__value">
                             <div class="modal__body__calc__balance__numbers__value__item">
-                                <p>100.890110</p>
+                                <p>---</p>
                                 <p>ETH</p>
 
                             </div>
                             <div class="modal__body__calc__balance__numbers__value__item">
-                                <p>1000.89011</p>
-                                <p>2DH</p>
+                                <p>---</p>
+                                <p>HCB</p>
                             </div>
                         </div>
                     </div>
@@ -40,13 +40,12 @@
                         </div>
                         <div class="modal__body__calc__balance__numbers__value">
                             <div class="modal__body__calc__balance__numbers__value__item">
-                                <p>@tokenBalance</p>
                                 <p>@ethBalance</p>
-
+                                <p>ETH</p>
                             </div>
                             <div class="modal__body__calc__balance__numbers__value__item">
-                                <p>1000.89011</p>
-                                <p>2DH</p>
+                                <p>@tokenBalance</p>
+                                <p>HCB</p>
                             </div>
                         </div>
                     </div>
@@ -99,24 +98,25 @@
 
     string elementid = "modal_assets";
 
-    Models.AccountModel _account;
+    Models.AccountModel _account = new();
 
-        @using Models;Blockchain bcMain;
-
-        public async Task Balances()
-        {
-            ethBalance = await _account.GetBalance();
-            tokenBalance = await bcMain.BalanceOf("0xe5D682717955d6C35d465A3485625C64655a04f4", _account.GetActualAddress(bcMain));
-        }
-
-        public void Open(Models.AccountModel account)
-        {
-            _account = account;
-            JsRuntime.InvokeVoidAsync("OpenModal", elementid);
-        }
-
-        public void Close()
-        {
-            JsRuntime.InvokeVoidAsync("CloseModal", elementid);
-        }
+        @using Models;Blockchain bcMain;
+
+    public async Task Balances()
+    {
+        ethBalance = await _account.GetBalance();
+        tokenBalance = await bcMain.BalanceOf("0xe5D682717955d6C35d465A3485625C64655a04f4", _account.GetActualAddress(bcMain));
+    }
+
+    public async void Open(Models.AccountModel account)
+    {
+        _account = account;
+        await Balances();
+        JsRuntime.InvokeVoidAsync("OpenModal", elementid);
+    }
+
+    public void Close()
+    {
+        JsRuntime.InvokeVoidAsync("CloseModal", elementid);
+    }
 }