Bringin Off-ramp
@if (EditMode)
{
}
else if (_settings?.Enabled is true)
{
}
else if (_settings is not null)
{
}
@if (_manualOrder)
{
}
else if (_settings is not null && !EditMode)
{
}
else if (_settings is not null && EditMode)
{
if (ApiKeyError)
{
}
if (!string.IsNullOrEmpty(_settings.ApiKey) && !ApiKeyError)
{
}
}
@if (_settings is null)
{
Bringin is a service that allows you to automatically convert your BTC to EUR and send it to your bank account. Start configuring it by clicking on the button below.
}
else if (_manualOrder)
{
var items = new List();
items.AddRange(BringinService.SupportedMethods.Where(s => _pms.Contains(s.PaymentMethod)).Select(s => s.PaymentMethod));
Create an order irrespective of the current balance tracked by the plugin.
@if (!string.IsNullOrEmpty(ManualOrderPaymentMethod))
{
// var fiat = BringinService.SupportedMethods.First(s => s.PaymentMethod.ToString() == ManualOrderPaymentMethod)?.FiatMinimum is true;
BTC
@*
*@
@*
*@
@* *@
@* *@
@*
*@
@*
*@
}
}
}
else if (!EditMode)
{
@if (LastFiatBalance is not null)
{
Balance
@LastFiatBalance
EUR@TimeAgo
}
@foreach (var method in _settings.MethodSettings)
{
var pmi = PaymentMethodId.TryParse(method.Key);
if (pmi is null)
continue;
if (!_pms.Contains(pmi))
continue;
@pmi.ToPrettyString()
@if (LastFiatRate is null || !method.Value.FiatThreshold)
{
BTCpending to forward once @DisplayFormatter.Currency(method.Value.Threshold, method.Value.FiatThreshold ? "EUR" : "BTC") is reached.
}
else if (LastFiatRate is not null && method.Value.FiatThreshold)
{
var balanceInFiat = method.Value.CurrentBalance * LastFiatRate;
var thresholdinBtc = method.Value.Threshold / LastFiatRate;
var percentage = (balanceInFiat / method.Value.Threshold) * 100m;
@foreach (var method in _settings.MethodSettings)
{
var pmId = PaymentMethodId.TryParse(method.Key);
if (pmId is null)
continue;
var supportedMethod = BringinService.SupportedMethods.FirstOrDefault(s => s.PaymentMethod.ToString() == method.Key);
Every time an invoice becomes Settled, we take the sum of all settled payments of this payment method, get the specified percentage of it and add it to the current balance.
@(method.Value.FiatThreshold ? "EUR" : "BTC")
Once the threshold is reached, we create a payout sending the balance to Bringin to be converted.