Show rate error to the model in WalletSend

This commit is contained in:
nicolas.dorier
2018-07-27 00:32:09 +09:00
parent 52f60b0457
commit 86644d38d7
3 changed files with 7 additions and 2 deletions

View File

@@ -167,8 +167,12 @@ namespace BTCPayServer.Controllers
model.Divisibility = _currencyTable.GetNumberFormatInfo(currencyPair.Right, true).CurrencyDecimalDigits;
model.Fiat = currencyPair.Right;
}
else
{
model.RateError = $"{result.EvaluatedRule} ({string.Join(", ", result.Errors.OfType<object>().ToArray())})";
}
}
catch { }
catch(Exception ex) { model.RateError = ex.Message; }
}
return View(model);
}