Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion conan.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"requires": [
"zlib/1.3.2#1cb806da49011867778ffb6ac7190fcb%1782392402.122708",
"xxhash/0.8.3#681d36a0a6111fc56e5e45ea182c19cc%1782392402.420688",
"xrpl-rpc-spec/0.1.21#d536f87a2ae7d313452746cfa3ac4404%1790869005.122975",
"xrpl-rpc-spec/0.1.23#56e8946f5b3fb949a3732e1a51135ca2%1790977482.197086",
"xrpl/3.4.0#e06b127b3ba92806a43fc7a53fc05fd3%1789577552.219154",
"sqlite3/3.53.0#324ada52333108388a9a6108bfa96734%1782392403.185447",
"spdlog/1.17.0#bcbaaf7147bda6ad24ffbd1ac3d7142c%1782736610.443882",
Expand Down
2 changes: 1 addition & 1 deletion conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class ClioConan(ConanFile):
"fmt/12.1.0",
"libbacktrace/cci.20210118",
"spdlog/1.17.0",
"xrpl-rpc-spec/0.1.21",
"xrpl-rpc-spec/0.1.23",
"xrpl/3.4.0",
]

Expand Down
2 changes: 1 addition & 1 deletion src/rpc/handlers/AccountCurrencies.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ AccountCurrenciesHandler::process(
return Error{expectedLgrInfo.error()};

auto const& lgrInfo = *expectedLgrInfo;
auto const& accountID = input.account;
auto const& accountID = *input.account;
Comment thread
godexsoft marked this conversation as resolved.

auto const accountLedgerObject = sharedPtrBackend_->fetchLedgerObject(
xrpl::keylet::account(accountID).key, lgrInfo.seq, ctx.yield
Expand Down
2 changes: 1 addition & 1 deletion src/rpc/handlers/AccountOffers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ AccountOffersHandler::process(AccountOffersHandler::Input const& input, Context
return Error{expectedLgrInfo.error()};

auto const& lgrInfo = *expectedLgrInfo;
auto const& accountID = input.account;
auto const& accountID = *input.account;
auto const accountLedgerObject = sharedPtrBackend_->fetchLedgerObject(
xrpl::keylet::account(accountID).key, lgrInfo.seq, ctx.yield
);
Expand Down
90 changes: 90 additions & 0 deletions tests/unit/rpc/handlers/GetAggregatePriceTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,96 @@ generateTestValuesForParametersTest()
.expectedError = "invalidParams",
.expectedErrorMessage = "Invalid parameters."
},
GetAggregatePriceParamTestCaseBundle{
.testName = "oracleDocumentIdNegative",
.testJson = R"JSON({
"base_asset": "USD",
"quote_asset": "XRP",
"oracles": [
{
"account": "rGh1VZCRBJY6rJiaFpD4LZtyHiuCkC8aeD",
"oracle_document_id": -1
}
]
})JSON",
.expectedError = "invalidParams",
.expectedErrorMessage = "Invalid parameters."
},
GetAggregatePriceParamTestCaseBundle{
.testName = "oracleDocumentIdNull",
.testJson = R"JSON({
"base_asset": "USD",
"quote_asset": "XRP",
"oracles": [
{
"account": "rGh1VZCRBJY6rJiaFpD4LZtyHiuCkC8aeD",
"oracle_document_id": null
}
]
})JSON",
.expectedError = "invalidParams",
.expectedErrorMessage = "Invalid parameters."
},
GetAggregatePriceParamTestCaseBundle{
.testName = "oracleDocumentIdFloat",
.testJson = R"JSON({
"base_asset": "USD",
"quote_asset": "XRP",
"oracles": [
{
"account": "rGh1VZCRBJY6rJiaFpD4LZtyHiuCkC8aeD",
"oracle_document_id": 2.3
}
]
})JSON",
.expectedError = "invalidParams",
.expectedErrorMessage = "Invalid parameters."
},
GetAggregatePriceParamTestCaseBundle{
.testName = "oracleDocumentIdBool",
.testJson = R"JSON({
"base_asset": "USD",
"quote_asset": "XRP",
"oracles": [
{
"account": "rGh1VZCRBJY6rJiaFpD4LZtyHiuCkC8aeD",
"oracle_document_id": true
}
]
})JSON",
.expectedError = "invalidParams",
.expectedErrorMessage = "Invalid parameters."
},
GetAggregatePriceParamTestCaseBundle{
.testName = "oracleDocumentIdObject",
.testJson = R"JSON({
"base_asset": "USD",
"quote_asset": "XRP",
"oracles": [
{
"account": "rGh1VZCRBJY6rJiaFpD4LZtyHiuCkC8aeD",
"oracle_document_id": {}
}
]
})JSON",
.expectedError = "invalidParams",
.expectedErrorMessage = "Invalid parameters."
},
GetAggregatePriceParamTestCaseBundle{
.testName = "oracleDocumentIdTooLarge",
.testJson = R"JSON({
"base_asset": "USD",
"quote_asset": "XRP",
"oracles": [
{
"account": "rGh1VZCRBJY6rJiaFpD4LZtyHiuCkC8aeD",
"oracle_document_id": 4294967296
}
]
})JSON",
.expectedError = "invalidParams",
.expectedErrorMessage = "Invalid parameters."
},
GetAggregatePriceParamTestCaseBundle{
.testName = "oracleMissingAccount",
.testJson = R"JSON({
Expand Down
Loading