diff --git a/.gitignore b/.gitignore index 9907b03d7..cd87e7456 100644 --- a/.gitignore +++ b/.gitignore @@ -265,3 +265,6 @@ src/.idea/.idea.Stratis.Bitcoin.FullNode/.idea/ *.iml /src/.idea /src/Blockcore.Benchmark/BenchmarkDotNet.Artifacts/results +.vscode/launch.json +.vscode/tasks.json +.gitignore diff --git a/src/Blockcore/Interfaces/UI/INavigationItem.cs b/src/Blockcore/Interfaces/UI/INavigationItem.cs index 01324a906..0eff28913 100644 --- a/src/Blockcore/Interfaces/UI/INavigationItem.cs +++ b/src/Blockcore/Interfaces/UI/INavigationItem.cs @@ -7,7 +7,7 @@ namespace Blockcore.Interfaces.UI public interface INavigationItem { public string Name { get; } - public string Navigation { get; } + public string Icon { get; } } } \ No newline at end of file diff --git a/src/Features/Blockcore.Features.ColdStaking/UI/NavItem.cs b/src/Features/Blockcore.Features.ColdStaking/UI/NavItem.cs index e17f87f1d..2ae003eaf 100644 --- a/src/Features/Blockcore.Features.ColdStaking/UI/NavItem.cs +++ b/src/Features/Blockcore.Features.ColdStaking/UI/NavItem.cs @@ -5,7 +5,7 @@ namespace Blockcore.Features.Wallet.UI public class ColdStakingNavigationItem : INavigationItem { public string Name => "Cold Staking"; - public string Navigation => "ColdStaking"; + public string Icon => "oi-pulse"; } } \ No newline at end of file diff --git a/src/Features/Blockcore.Features.ColdStaking/UI/Pages/ColdStake.razor b/src/Features/Blockcore.Features.ColdStaking/UI/Pages/ColdStake.razor index 75d33774b..032d7c4d2 100644 --- a/src/Features/Blockcore.Features.ColdStaking/UI/Pages/ColdStake.razor +++ b/src/Features/Blockcore.Features.ColdStaking/UI/Pages/ColdStake.razor @@ -8,6 +8,7 @@ @inject IWalletManager WalletManager @inject NavigationManager NavigationManager @inject NodeDeployments NodeDeployments +@inject Network Network @if (!NodeDeployments.GetFlags().ScriptFlags.HasFlag(ScriptVerify.CheckColdStakeVerify)) { @@ -15,147 +16,174 @@ return; } -
Enable cold staking on an existing wallet.
- -@this.Network.CoinTicker.ToUpper()
+@this.Network.CoinTicker.ToUpper()
+Information about the deployed wallets.
- -@{ -| Wallet / Account | -Confirmed balance | -Unconfirmed balance | -Action | -|||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @walletName / @coldStakingAccount.Name | -@coldAccountBalance.AmountConfirmed | -@coldAccountBalance.AmountUnconfirmed | -
- @if (coldAccountBalance.AmountConfirmed + coldAccountBalance.AmountUnconfirmed > 0)
- {
-
+
+
+
+
+
+
+ Balances+
+
|
@this.Network.CoinTicker.ToUpper()
+@this.Network.CoinTicker.ToUpper()
+Setup cold staking.
- -@{ - var accountBalance = this.WalletManager.GetBalances(walletname, "account 0").Single(); - -| Amount Confirmed | -Amount Unconfirmed | -Spendable Amount | -
|---|---|---|
| @accountBalance.AmountConfirmed | -@accountBalance.AmountUnconfirmed | -@accountBalance.SpendableAmount | -
@this.Network.CoinTicker.ToUpper()
+@this.Network.CoinTicker.ToUpper()
+@this.Network.CoinTicker.ToUpper()
+@this.Network.CoinTicker.ToUpper()
+| TYPE | +DATE/TIME | +AMOUNT | +BLOCK | +
|---|---|---|---|
| @transaction.Type | +@String.Format("{0:f}", transaction.Timestamp) | +@transaction.Amount | +@transaction.ConfirmedInBlock | +
Withdraw form a coldstaking cold wallet.
- -@{ - var coldStakingAccount = ColdStakingManager.GetColdStakingAccount(this.WalletManager.GetWallet(walletname), true); - if (coldStakingAccount != null) - { - var coldAccountBalance = ColdStakingManager.GetBalances(walletname, coldStakingAccount.Name).Single(); - -Amount Confirmed: @coldAccountBalance.AmountConfirmed
-Amount Unconfirmed: @coldAccountBalance.AmountUnconfirmed
-Spendable Amount: @coldAccountBalance.SpendableAmount
- } -@this.Network.CoinTicker.ToUpper()
+@this.Network.CoinTicker.ToUpper()
+Information about staking.
- +@this.Network.CoinTicker.ToUpper()
+| Wallet / Account | -Balance | +Wallet | +Main balance (unconfirmed) | + @*Hot balance (unconfirmed) | *@
|---|---|---|---|---|
| { SetWalletName(walletName); }" style="cursor:pointer"> @walletName / @account.Name | -@accountBalance.AmountConfirmed | + var mainAccountBalance = this.WalletManager.GetBalances(walletName, account.Name).Single(); + +|||
| @walletName | + @if (@mainAccountBalance.AmountUnconfirmed >0) { +@mainAccountBalance.AmountConfirmed (@mainAccountBalance.AmountUnconfirmed ) | + } else { +@mainAccountBalance.AmountConfirmed | + } + + @* var hotStakingAccount = ColdStakingManager.GetColdStakingAccount(this.WalletManager.GetWallet(walletName), false); + + if (hotStakingAccount != null) { + var hotAccountBalance = ColdStakingManager.GetBalances(walletName, hotStakingAccount.Name).Single(); + @if (@hotAccountBalance.AmountUnconfirmed >0) { +@hotAccountBalance.AmountConfirmed (@hotAccountBalance.AmountUnconfirmed ) | + } else { +@hotAccountBalance.AmountConfirmed | + } + } *@
Add the IP address of known network peers.
- -@{ -In IBD
- } +Connected peers: @this.ConnectionManager.ConnectedPeers.Count()
-Current tip at height: @this.ChainIndexer.Tip.Height
-Current tip Hash: @this.ChainIndexer.Tip.HashBlock
+Currently processing the IBD (initial block download) & syncing your node with the network
} +| Connected peers: | +@this.ConnectionManager.ConnectedPeers.Count() | +
| Current tip at height: | +@this.ChainIndexer.Tip.Height | +
| Current tip Hash: | +@this.ChainIndexer.Tip.HashBlock | +
| IP Address | +Inbound | +Agent | +Version | +
|---|---|---|---|
| @peer.RemoteSocketEndpoint.ToString() | +@peer.Inbound | +@peer.PeerVersion?.UserAgent | +@peer.PeerVersion?.Version | +
diff --git a/src/Features/Blockcore.Features.NodeHost/UI/Pages/Peers.razor b/src/Features/Blockcore.Features.NodeHost/UI/Pages/Peers.razor deleted file mode 100644 index 2fa770b77..000000000 --- a/src/Features/Blockcore.Features.NodeHost/UI/Pages/Peers.razor +++ /dev/null @@ -1,44 +0,0 @@ -@page "/peers" - -@inject Blockcore.Connection.IConnectionManager ConnectionManager -@inject NavigationManager NavigationManager - -Connected peers
- -Information about connected peers.
- -@{ -- --
-
| Ip | -Inbound | -Agent | -Version | -
|---|---|---|---|
| @peer.RemoteSocketEndpoint.ToString() | -@peer.Inbound | -@peer.PeerVersion?.UserAgent | -@peer.PeerVersion?.Version | -