mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-17 22:14:26 +01:00
Shorten balance assignment
This commit is contained in:
committed by
Andrew Camilleri
parent
4785f0a4dd
commit
a32ace1dcb
@@ -264,14 +264,10 @@ namespace BTCPayServer.Controllers
|
||||
walletVm.Id = new WalletId(wallet.Store.Id, wallet.Network.CryptoCode);
|
||||
walletVm.StoreName = wallet.Store.StoreName;
|
||||
|
||||
if (wallets.BalanceForCryptoCode.ContainsKey(wallet.Network))
|
||||
{
|
||||
wallets.BalanceForCryptoCode[wallet.Network] = wallets.BalanceForCryptoCode[wallet.Network].Add(await GetBalanceAsMoney(wallet.Wallet, wallet.DerivationStrategy));
|
||||
}
|
||||
else
|
||||
{
|
||||
wallets.BalanceForCryptoCode[wallet.Network] = await GetBalanceAsMoney(wallet.Wallet, wallet.DerivationStrategy);
|
||||
}
|
||||
var money = await GetBalanceAsMoney(wallet.Wallet, wallet.DerivationStrategy);
|
||||
wallets.BalanceForCryptoCode[wallet.Network] = wallets.BalanceForCryptoCode.ContainsKey(wallet.Network)
|
||||
? wallets.BalanceForCryptoCode[wallet.Network].Add(money)
|
||||
: money;
|
||||
}
|
||||
|
||||
return View(wallets);
|
||||
|
||||
Reference in New Issue
Block a user