-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of https://github.com/block-core/angor
- Loading branch information
Showing
17 changed files
with
570 additions
and
175 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
@using Angor.Shared | ||
@using Blockcore.Networks | ||
@inject INetworkConfiguration NetworkConfiguration | ||
|
||
|
||
<div class="d-flex flex-column align-items-start" title="@GetTooltip()"> | ||
<span class="fs-4"> | ||
<strong>@BtcBalance</strong> @_network.CoinTicker | ||
</span> | ||
@if (ShowFiatInline && PreferredCurrency != "BTC" && !string.IsNullOrEmpty(BtcBalanceInFiat)) | ||
{ | ||
<h6 class="text-muted">@BtcBalanceInFiat</h6> | ||
} | ||
</div> | ||
|
||
@code { | ||
[Parameter] | ||
public decimal BtcBalance { get; set; } | ||
|
||
[Parameter] | ||
public string BtcBalanceInFiat { get; set; } | ||
|
||
[Parameter] | ||
public string PreferredCurrency { get; set; } | ||
|
||
[Parameter] | ||
public bool ShowFiatInline { get; set; } = false; | ||
|
||
private Network _network; | ||
|
||
protected override void OnInitialized() | ||
{ | ||
_network = NetworkConfiguration.GetNetwork(); | ||
base.OnInitialized(); | ||
} | ||
|
||
private string GetTooltip() => | ||
PreferredCurrency != "BTC" && !string.IsNullOrEmpty(BtcBalanceInFiat) && !ShowFiatInline | ||
? $"Equivalent: {BtcBalanceInFiat}" | ||
: string.Empty; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.