Skip to content

Commit

Permalink
Fix error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
Jouzo committed Nov 23, 2021
1 parent 5bd2031 commit 97e1726
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/masternodes/rpc_vault.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1189,7 +1189,7 @@ UniValue estimatecollateral(const JSONRPCRequest& request) {
for (const auto& [tokenId, tokenAmount] : loanAmounts.balances) {
auto loanToken = pcustomcsview->GetLoanTokenByID(tokenId);
if (!loanToken) {
throw JSONRPCError(RPC_DATABASE_ERROR, strprintf("(%s) is not a loan token!", tokenId));
throw JSONRPCError(RPC_DATABASE_ERROR, strprintf("(%s) is not a loan token!", tokenId.v));
}

auto priceFeed = pcustomcsview->GetFixedIntervalPrice(loanToken->fixedIntervalPriceId);
Expand All @@ -1212,7 +1212,7 @@ UniValue estimatecollateral(const JSONRPCRequest& request) {

auto token = pcustomcsview->GetToken(tokenId);
if (!token) {
throw JSONRPCError(RPC_DATABASE_ERROR, strprintf("Token %d does not exist!", tokenId));
throw JSONRPCError(RPC_DATABASE_ERROR, strprintf("Token %s does not exist!", tokenId));
}

auto collateralToken = pcustomcsview->HasLoanCollateralToken({token->first, height});
Expand Down

0 comments on commit 97e1726

Please sign in to comment.