Skip to content

Commit

Permalink
Fix minor loan typos and format (#703)
Browse files Browse the repository at this point in the history
  • Loading branch information
ShengguangXiao authored Aug 31, 2021
1 parent 1a03b0c commit ee6fba3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/masternodes/loan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Res CLoanView::LoanCreateSetCollateralToken(CLoanSetCollateralTokenImpl const &
if (GetLoanSetCollateralToken(collToken.creationTx))
return Res::Err("setCollateralToken with creation tx %s already exists!", collToken.creationTx.GetHex());
if (collToken.factor > COIN)
return Res::Err("setCollateralToken factor must be lower or equal than %s!",GetDecimaleString(COIN));
return Res::Err("setCollateralToken factor must be lower or equal than %s!", GetDecimaleString(COIN));
if (collToken.factor < 0)
return Res::Err("setCollateralToken factor must not be negative!");

Expand Down
10 changes: 5 additions & 5 deletions src/masternodes/rpc_loan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -269,8 +269,8 @@ UniValue setloantoken(const JSONRPCRequest& request) {
{
{"metadata", RPCArg::Type::OBJ, RPCArg::Optional::NO, "",
{
{"symbol", RPCArg::Type::STR, RPCArg::Optional::NO, "Token's symbol (unique), no longer than " + std::to_string(CToken::MAX_TOKEN_SYMBOL_LENGTH)},
{"name", RPCArg::Type::STR, RPCArg::Optional::OMITTED, "Token's name (optional), no longer than " + std::to_string(CToken::MAX_TOKEN_NAME_LENGTH)},
{"symbol", RPCArg::Type::STR, RPCArg::Optional::NO, "Token's symbol (unique), not longer than " + std::to_string(CToken::MAX_TOKEN_SYMBOL_LENGTH)},
{"name", RPCArg::Type::STR, RPCArg::Optional::OMITTED, "Token's name (optional), not longer than " + std::to_string(CToken::MAX_TOKEN_NAME_LENGTH)},
{"priceFeedId", RPCArg::Type::STR_HEX, RPCArg::Optional::NO, "txid of oracle feeding the price"},
{"mintable", RPCArg::Type::BOOL, RPCArg::Optional::OMITTED, "Token's 'Mintable' property (bool, optional), default is 'True'"},
{"interest", RPCArg::Type::NUM, RPCArg::Optional::OMITTED, "Interest rate (default: 0)"},
Expand Down Expand Up @@ -382,8 +382,8 @@ UniValue updateloantoken(const JSONRPCRequest& request) {
{"token", RPCArg::Type::STR, RPCArg::Optional::NO, "The tokens's symbol, id or creation tx"},
{"metadata", RPCArg::Type::OBJ, RPCArg::Optional::OMITTED, "",
{
{"symbol", RPCArg::Type::STR, RPCArg::Optional::OMITTED, "Token's symbol (unique), no longer than " + std::to_string(CToken::MAX_TOKEN_SYMBOL_LENGTH)},
{"name", RPCArg::Type::STR, RPCArg::Optional::OMITTED, "Token's name (optional), no longer than " + std::to_string(CToken::MAX_TOKEN_NAME_LENGTH)},
{"symbol", RPCArg::Type::STR, RPCArg::Optional::OMITTED, "Token's symbol (unique), not longer than " + std::to_string(CToken::MAX_TOKEN_SYMBOL_LENGTH)},
{"name", RPCArg::Type::STR, RPCArg::Optional::OMITTED, "Token's name (optional), not longer than " + std::to_string(CToken::MAX_TOKEN_NAME_LENGTH)},
{"priceFeedId", RPCArg::Type::STR_HEX, RPCArg::Optional::OMITTED, "txid of oracle feeding the price"},
{"mintable", RPCArg::Type::BOOL, RPCArg::Optional::OMITTED, "Token's 'Mintable' property (bool, optional), default is 'True'"},
{"interest", RPCArg::Type::NUM, RPCArg::Optional::OMITTED, "Interest rate (optional)."},
Expand Down Expand Up @@ -959,7 +959,7 @@ UniValue getloanscheme(const JSONRPCRequest& request) {

LOCK(cs_main);
auto loanScheme = pcustomcsview->GetLoanScheme(loanSchemeId);
if(!loanScheme)
if (!loanScheme)
throw JSONRPCError(RPC_INVALID_PARAMETER, "Cannot find existing loan scheme with id " + loanSchemeId);

UniValue result{UniValue::VOBJ};
Expand Down

0 comments on commit ee6fba3

Please sign in to comment.