From e9566a4c2fdb2670123d7f43051cd3916716b621 Mon Sep 17 00:00:00 2001 From: ShengguangXiao Date: Tue, 31 Aug 2021 07:50:45 +0000 Subject: [PATCH] Fix minor loan typos and format --- src/masternodes/loan.cpp | 2 +- src/masternodes/rpc_loan.cpp | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/masternodes/loan.cpp b/src/masternodes/loan.cpp index a6470bfdd41..1313f33e62f 100644 --- a/src/masternodes/loan.cpp +++ b/src/masternodes/loan.cpp @@ -28,7 +28,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!"); diff --git a/src/masternodes/rpc_loan.cpp b/src/masternodes/rpc_loan.cpp index 86324932a5b..191fcf039c4 100644 --- a/src/masternodes/rpc_loan.cpp +++ b/src/masternodes/rpc_loan.cpp @@ -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)"}, @@ -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)."}, @@ -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};