mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-02-22 06:21:44 +01:00
simplify currency parsing if _ is forgotten and there is 6 letters
This commit is contained in:
parent
0290a5eacd
commit
3f4ec9ba80
1 changed files with 5 additions and 0 deletions
|
@ -45,6 +45,11 @@ namespace BTCPayServer.Rating
|
|||
var currencyPair = splitted[0];
|
||||
if (currencyPair.Length < 6 || currencyPair.Length > 10)
|
||||
return false;
|
||||
if (currencyPair.Length == 6)
|
||||
{
|
||||
value = new CurrencyPair(currencyPair.Substring(0,3), currencyPair.Substring(3, 3));
|
||||
return true;
|
||||
}
|
||||
for (int i = 3; i < 5; i++)
|
||||
{
|
||||
var potentialCryptoName = currencyPair.Substring(0, i);
|
||||
|
|
Loading…
Add table
Reference in a new issue