mirror of
https://github.com/XRPLF/clio.git
synced 2025-12-06 17:27:58 +00:00
style: Fix JSON colon style in C++ code (#2484)
This commit is contained in:
@@ -621,8 +621,7 @@ TEST_F(RPCBaseTest, SubscribeStreamValidator)
|
||||
auto const spec = RpcSpec{{"streams", CustomValidators::subscribeStreamValidator}};
|
||||
auto passingInput = json::parse(
|
||||
R"JSON({
|
||||
"streams":
|
||||
[
|
||||
"streams": [
|
||||
"ledger",
|
||||
"transactions_proposed",
|
||||
"validations",
|
||||
|
||||
@@ -64,8 +64,7 @@ using namespace util::config;
|
||||
|
||||
namespace {
|
||||
constexpr auto kFORWARD_REPLY = R"JSON({
|
||||
"result":
|
||||
{
|
||||
"result": {
|
||||
"status": "success",
|
||||
"forwarded": true
|
||||
}
|
||||
@@ -347,8 +346,7 @@ generateCacheTestValuesForParametersTest()
|
||||
.config = R"JSON({
|
||||
"server": {"max_queue_size": 2},
|
||||
"workers": 4,
|
||||
"rpc":
|
||||
{"cache_timeout": 10}
|
||||
"rpc": {"cache_timeout": 10}
|
||||
})JSON",
|
||||
.method = "server_info",
|
||||
.isAdmin = false,
|
||||
|
||||
@@ -355,8 +355,7 @@ TEST_F(RPCAccountInfoHandlerTest, SignerListsTrueV2)
|
||||
{
|
||||
auto const expectedOutput = fmt::format(
|
||||
R"JSON({{
|
||||
"account_data":
|
||||
{{
|
||||
"account_data": {{
|
||||
"Account": "{}",
|
||||
"Balance": "200",
|
||||
"Flags": 0,
|
||||
@@ -368,26 +367,22 @@ TEST_F(RPCAccountInfoHandlerTest, SignerListsTrueV2)
|
||||
"TransferRate": 0,
|
||||
"index": "13F1A95D7AAB7108D5CE7EEAF504B2894B8C674E6D68499076441C4837282BF8"
|
||||
}},
|
||||
"signer_lists":
|
||||
[
|
||||
"signer_lists": [
|
||||
{{
|
||||
"Flags": 0,
|
||||
"LedgerEntryType": "SignerList",
|
||||
"OwnerNode": "0",
|
||||
"PreviousTxnID": "0000000000000000000000000000000000000000000000000000000000000000",
|
||||
"PreviousTxnLgrSeq": 0,
|
||||
"SignerEntries":
|
||||
[
|
||||
"SignerEntries": [
|
||||
{{
|
||||
"SignerEntry":
|
||||
{{
|
||||
"SignerEntry": {{
|
||||
"Account": "{}",
|
||||
"SignerWeight": 1
|
||||
}}
|
||||
}},
|
||||
{{
|
||||
"SignerEntry":
|
||||
{{
|
||||
"SignerEntry": {{
|
||||
"Account": "{}",
|
||||
"SignerWeight": 1
|
||||
}}
|
||||
@@ -398,8 +393,7 @@ TEST_F(RPCAccountInfoHandlerTest, SignerListsTrueV2)
|
||||
"index": "A9C28A28B85CD533217F5C0A0C7767666B093FA58A0F2D80026FCC4CD932DDC7"
|
||||
}}
|
||||
],
|
||||
"account_flags":
|
||||
{{
|
||||
"account_flags": {{
|
||||
"defaultRipple": false,
|
||||
"depositAuth": false,
|
||||
"disableMasterKey": false,
|
||||
@@ -459,8 +453,7 @@ TEST_F(RPCAccountInfoHandlerTest, SignerListsTrueV1)
|
||||
{
|
||||
auto const expectedOutput = fmt::format(
|
||||
R"JSON({{
|
||||
"account_data":
|
||||
{{
|
||||
"account_data": {{
|
||||
"Account": "{}",
|
||||
"Balance": "200",
|
||||
"Flags": 0,
|
||||
@@ -471,26 +464,22 @@ TEST_F(RPCAccountInfoHandlerTest, SignerListsTrueV1)
|
||||
"Sequence": 2,
|
||||
"TransferRate": 0,
|
||||
"index": "13F1A95D7AAB7108D5CE7EEAF504B2894B8C674E6D68499076441C4837282BF8",
|
||||
"signer_lists":
|
||||
[
|
||||
"signer_lists": [
|
||||
{{
|
||||
"Flags": 0,
|
||||
"LedgerEntryType": "SignerList",
|
||||
"OwnerNode": "0",
|
||||
"PreviousTxnID": "0000000000000000000000000000000000000000000000000000000000000000",
|
||||
"PreviousTxnLgrSeq": 0,
|
||||
"SignerEntries":
|
||||
[
|
||||
"SignerEntries": [
|
||||
{{
|
||||
"SignerEntry":
|
||||
{{
|
||||
"SignerEntry": {{
|
||||
"Account": "{}",
|
||||
"SignerWeight": 1
|
||||
}}
|
||||
}},
|
||||
{{
|
||||
"SignerEntry":
|
||||
{{
|
||||
"SignerEntry": {{
|
||||
"Account": "{}",
|
||||
"SignerWeight": 1
|
||||
}}
|
||||
@@ -502,8 +491,7 @@ TEST_F(RPCAccountInfoHandlerTest, SignerListsTrueV1)
|
||||
}}
|
||||
]
|
||||
}},
|
||||
"account_flags":
|
||||
{{
|
||||
"account_flags": {{
|
||||
"defaultRipple": false,
|
||||
"depositAuth": false,
|
||||
"disableMasterKey": false,
|
||||
|
||||
@@ -287,15 +287,13 @@ TEST_F(RPCAccountOffersHandlerTest, DefaultParams)
|
||||
"ledger_index": 30,
|
||||
"validated": true,
|
||||
"account": "{}",
|
||||
"offers":
|
||||
[
|
||||
"offers": [
|
||||
{{
|
||||
"seq": 0,
|
||||
"flags": 0,
|
||||
"quality": "0.000000024999999374023",
|
||||
"taker_pays": "20",
|
||||
"taker_gets":
|
||||
{{
|
||||
"taker_gets": {{
|
||||
"currency": "USD",
|
||||
"issuer": "{}",
|
||||
"value": "10"
|
||||
|
||||
@@ -188,8 +188,7 @@ struct AccountTxParameterTest : public RPCAccountTxHandlerTest,
|
||||
.testName = "MarkerLedgerNotInt",
|
||||
.testJson = R"JSON({
|
||||
"account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
|
||||
"marker":
|
||||
{
|
||||
"marker": {
|
||||
"seq": "string",
|
||||
"ledger": 1
|
||||
}
|
||||
@@ -201,8 +200,7 @@ struct AccountTxParameterTest : public RPCAccountTxHandlerTest,
|
||||
.testName = "MarkerSeqNotInt",
|
||||
.testJson = R"JSON({
|
||||
"account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
|
||||
"marker":
|
||||
{
|
||||
"marker": {
|
||||
"ledger": "string",
|
||||
"seq": 1
|
||||
}
|
||||
@@ -1176,25 +1174,19 @@ TEST_F(RPCAccountTxHandlerTest, NFTTxs_API_v1)
|
||||
"transactions": [
|
||||
{
|
||||
"meta": {
|
||||
"AffectedNodes":
|
||||
[
|
||||
"AffectedNodes": [
|
||||
{
|
||||
"ModifiedNode":
|
||||
{
|
||||
"FinalFields":
|
||||
{
|
||||
"NFTokens":
|
||||
[
|
||||
"ModifiedNode": {
|
||||
"FinalFields": {
|
||||
"NFTokens": [
|
||||
{
|
||||
"NFToken":
|
||||
{
|
||||
"NFToken": {
|
||||
"NFTokenID": "05FB0EB4B899F056FA095537C5817163801F544BAFCEA39C995D76DB4D16F9DF",
|
||||
"URI": "7465737475726C"
|
||||
}
|
||||
},
|
||||
{
|
||||
"NFToken":
|
||||
{
|
||||
"NFToken": {
|
||||
"NFTokenID": "1B8590C01B0006EDFA9ED60296DD052DC5E90F99659B25014D08E1BC983515BC",
|
||||
"URI": "7465737475726C"
|
||||
}
|
||||
@@ -1202,13 +1194,10 @@ TEST_F(RPCAccountTxHandlerTest, NFTTxs_API_v1)
|
||||
]
|
||||
},
|
||||
"LedgerEntryType": "NFTokenPage",
|
||||
"PreviousFields":
|
||||
{
|
||||
"NFTokens":
|
||||
[
|
||||
"PreviousFields": {
|
||||
"NFTokens": [
|
||||
{
|
||||
"NFToken":
|
||||
{
|
||||
"NFToken": {
|
||||
"NFTokenID": "1B8590C01B0006EDFA9ED60296DD052DC5E90F99659B25014D08E1BC983515BC",
|
||||
"URI": "7465737475726C"
|
||||
}
|
||||
@@ -1222,8 +1211,7 @@ TEST_F(RPCAccountTxHandlerTest, NFTTxs_API_v1)
|
||||
"TransactionResult": "tesSUCCESS",
|
||||
"nftoken_id": "05FB0EB4B899F056FA095537C5817163801F544BAFCEA39C995D76DB4D16F9DF"
|
||||
},
|
||||
"tx":
|
||||
{
|
||||
"tx": {
|
||||
"Account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
|
||||
"Fee": "50",
|
||||
"NFTokenTaxon": 123,
|
||||
@@ -1239,15 +1227,11 @@ TEST_F(RPCAccountTxHandlerTest, NFTTxs_API_v1)
|
||||
"validated": true
|
||||
},
|
||||
{
|
||||
"meta":
|
||||
{
|
||||
"AffectedNodes":
|
||||
[
|
||||
"meta": {
|
||||
"AffectedNodes": [
|
||||
{
|
||||
"DeletedNode":
|
||||
{
|
||||
"FinalFields":
|
||||
{
|
||||
"DeletedNode": {
|
||||
"FinalFields": {
|
||||
"NFTokenID": "05FB0EB4B899F056FA095537C5817163801F544BAFCEA39C995D76DB4D16F9DA",
|
||||
"Owner": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn"
|
||||
|
||||
@@ -1261,8 +1245,7 @@ TEST_F(RPCAccountTxHandlerTest, NFTTxs_API_v1)
|
||||
"TransactionResult": "tesSUCCESS",
|
||||
"nftoken_id": "05FB0EB4B899F056FA095537C5817163801F544BAFCEA39C995D76DB4D16F9DA"
|
||||
},
|
||||
"tx":
|
||||
{
|
||||
"tx": {
|
||||
"Account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
|
||||
"Fee": "50",
|
||||
"NFTokenBuyOffer": "E6DBAFC99223B42257915A63DFC6B0C032D4070F9A574B255AD97466726FC322",
|
||||
@@ -1278,24 +1261,19 @@ TEST_F(RPCAccountTxHandlerTest, NFTTxs_API_v1)
|
||||
"validated": true
|
||||
},
|
||||
{
|
||||
"meta":
|
||||
{
|
||||
"AffectedNodes":
|
||||
[
|
||||
"meta": {
|
||||
"AffectedNodes": [
|
||||
{
|
||||
"DeletedNode": {
|
||||
"FinalFields":
|
||||
{
|
||||
"FinalFields": {
|
||||
"NFTokenID": "05FB0EB4B899F056FA095537C5817163801F544BAFCEA39C995D76DB4D16F9DA"
|
||||
},
|
||||
"LedgerEntryType": "NFTokenOffer"
|
||||
}
|
||||
},
|
||||
{
|
||||
"DeletedNode":
|
||||
{
|
||||
"FinalFields":
|
||||
{
|
||||
"DeletedNode": {
|
||||
"FinalFields": {
|
||||
"NFTokenID": "15FB0EB4B899F056FA095537C5817163801F544BAFCEA39C995D76DB4D16F9DF"
|
||||
},
|
||||
"LedgerEntryType": "NFTokenOffer"
|
||||
@@ -1304,18 +1282,15 @@ TEST_F(RPCAccountTxHandlerTest, NFTTxs_API_v1)
|
||||
],
|
||||
"TransactionIndex": 0,
|
||||
"TransactionResult": "tesSUCCESS",
|
||||
"nftoken_ids":
|
||||
[
|
||||
"nftoken_ids": [
|
||||
"05FB0EB4B899F056FA095537C5817163801F544BAFCEA39C995D76DB4D16F9DA",
|
||||
"15FB0EB4B899F056FA095537C5817163801F544BAFCEA39C995D76DB4D16F9DF"
|
||||
]
|
||||
},
|
||||
"tx":
|
||||
{
|
||||
"tx": {
|
||||
"Account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
|
||||
"Fee": "50",
|
||||
"NFTokenOffers":
|
||||
[
|
||||
"NFTokenOffers": [
|
||||
"05FB0EB4B899F056FA095537C5817163801F544BAFCEA39C995D76DB4D16F9DA",
|
||||
"15FB0EB4B899F056FA095537C5817163801F544BAFCEA39C995D76DB4D16F9DF"
|
||||
],
|
||||
@@ -1331,13 +1306,10 @@ TEST_F(RPCAccountTxHandlerTest, NFTTxs_API_v1)
|
||||
"validated": true
|
||||
},
|
||||
{
|
||||
"meta":
|
||||
{
|
||||
"AffectedNodes":
|
||||
[
|
||||
"meta": {
|
||||
"AffectedNodes": [
|
||||
{
|
||||
"CreatedNode":
|
||||
{
|
||||
"CreatedNode": {
|
||||
"LedgerEntryType": "NFTokenOffer",
|
||||
"LedgerIndex": "05FB0EB4B899F056FA095537C5817163801F544BAFCEA39C995D76DB4D16F9DA"
|
||||
}
|
||||
@@ -1347,8 +1319,7 @@ TEST_F(RPCAccountTxHandlerTest, NFTTxs_API_v1)
|
||||
"TransactionResult": "tesSUCCESS",
|
||||
"offer_id": "05FB0EB4B899F056FA095537C5817163801F544BAFCEA39C995D76DB4D16F9DA"
|
||||
},
|
||||
"tx":
|
||||
{
|
||||
"tx": {
|
||||
"Account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
|
||||
"Amount": "123",
|
||||
"Fee": "50",
|
||||
@@ -1366,8 +1337,7 @@ TEST_F(RPCAccountTxHandlerTest, NFTTxs_API_v1)
|
||||
}
|
||||
],
|
||||
"validated": true,
|
||||
"marker":
|
||||
{
|
||||
"marker": {
|
||||
"ledger": 12,
|
||||
"seq": 34
|
||||
}
|
||||
@@ -1416,25 +1386,19 @@ TEST_F(RPCAccountTxHandlerTest, NFTTxs_API_v2)
|
||||
"transactions": [
|
||||
{
|
||||
"meta": {
|
||||
"AffectedNodes":
|
||||
[
|
||||
"AffectedNodes": [
|
||||
{
|
||||
"ModifiedNode":
|
||||
{
|
||||
"FinalFields":
|
||||
{
|
||||
"NFTokens":
|
||||
[
|
||||
"ModifiedNode": {
|
||||
"FinalFields": {
|
||||
"NFTokens": [
|
||||
{
|
||||
"NFToken":
|
||||
{
|
||||
"NFToken": {
|
||||
"NFTokenID": "05FB0EB4B899F056FA095537C5817163801F544BAFCEA39C995D76DB4D16F9DF",
|
||||
"URI": "7465737475726C"
|
||||
}
|
||||
},
|
||||
{
|
||||
"NFToken":
|
||||
{
|
||||
"NFToken": {
|
||||
"NFTokenID": "1B8590C01B0006EDFA9ED60296DD052DC5E90F99659B25014D08E1BC983515BC",
|
||||
"URI": "7465737475726C"
|
||||
}
|
||||
@@ -1442,13 +1406,10 @@ TEST_F(RPCAccountTxHandlerTest, NFTTxs_API_v2)
|
||||
]
|
||||
},
|
||||
"LedgerEntryType": "NFTokenPage",
|
||||
"PreviousFields":
|
||||
{
|
||||
"NFTokens":
|
||||
[
|
||||
"PreviousFields": {
|
||||
"NFTokens": [
|
||||
{
|
||||
"NFToken":
|
||||
{
|
||||
"NFToken": {
|
||||
"NFTokenID": "1B8590C01B0006EDFA9ED60296DD052DC5E90F99659B25014D08E1BC983515BC",
|
||||
"URI": "7465737475726C"
|
||||
}
|
||||
@@ -1466,8 +1427,7 @@ TEST_F(RPCAccountTxHandlerTest, NFTTxs_API_v2)
|
||||
"ledger_index": 11,
|
||||
"ledger_hash": "4BC50C9B0D8515D3EAAE1E74B29A95804346C491EE1A95BF25E4AAB854A6A652",
|
||||
"close_time_iso": "2000-01-01T00:00:00Z",
|
||||
"tx_json":
|
||||
{
|
||||
"tx_json": {
|
||||
"Account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
|
||||
"Fee": "50",
|
||||
"NFTokenTaxon": 123,
|
||||
@@ -1481,15 +1441,11 @@ TEST_F(RPCAccountTxHandlerTest, NFTTxs_API_v2)
|
||||
"validated": true
|
||||
},
|
||||
{
|
||||
"meta":
|
||||
{
|
||||
"AffectedNodes":
|
||||
[
|
||||
"meta": {
|
||||
"AffectedNodes": [
|
||||
{
|
||||
"DeletedNode":
|
||||
{
|
||||
"FinalFields":
|
||||
{
|
||||
"DeletedNode": {
|
||||
"FinalFields": {
|
||||
"NFTokenID": "05FB0EB4B899F056FA095537C5817163801F544BAFCEA39C995D76DB4D16F9DA",
|
||||
"Owner": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn"
|
||||
},
|
||||
@@ -1506,8 +1462,7 @@ TEST_F(RPCAccountTxHandlerTest, NFTTxs_API_v2)
|
||||
"ledger_index": 11,
|
||||
"ledger_hash": "4BC50C9B0D8515D3EAAE1E74B29A95804346C491EE1A95BF25E4AAB854A6A652",
|
||||
"close_time_iso": "2000-01-01T00:00:00Z",
|
||||
"tx_json":
|
||||
{
|
||||
"tx_json": {
|
||||
"Account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
|
||||
"Fee": "50",
|
||||
"NFTokenBuyOffer": "E6DBAFC99223B42257915A63DFC6B0C032D4070F9A574B255AD97466726FC322",
|
||||
@@ -1521,24 +1476,19 @@ TEST_F(RPCAccountTxHandlerTest, NFTTxs_API_v2)
|
||||
"validated": true
|
||||
},
|
||||
{
|
||||
"meta":
|
||||
{
|
||||
"AffectedNodes":
|
||||
[
|
||||
"meta": {
|
||||
"AffectedNodes": [
|
||||
{
|
||||
"DeletedNode": {
|
||||
"FinalFields":
|
||||
{
|
||||
"FinalFields": {
|
||||
"NFTokenID": "05FB0EB4B899F056FA095537C5817163801F544BAFCEA39C995D76DB4D16F9DA"
|
||||
},
|
||||
"LedgerEntryType": "NFTokenOffer"
|
||||
}
|
||||
},
|
||||
{
|
||||
"DeletedNode":
|
||||
{
|
||||
"FinalFields":
|
||||
{
|
||||
"DeletedNode": {
|
||||
"FinalFields": {
|
||||
"NFTokenID": "15FB0EB4B899F056FA095537C5817163801F544BAFCEA39C995D76DB4D16F9DF"
|
||||
},
|
||||
"LedgerEntryType": "NFTokenOffer"
|
||||
@@ -1547,8 +1497,7 @@ TEST_F(RPCAccountTxHandlerTest, NFTTxs_API_v2)
|
||||
],
|
||||
"TransactionIndex": 0,
|
||||
"TransactionResult": "tesSUCCESS",
|
||||
"nftoken_ids":
|
||||
[
|
||||
"nftoken_ids": [
|
||||
"05FB0EB4B899F056FA095537C5817163801F544BAFCEA39C995D76DB4D16F9DA",
|
||||
"15FB0EB4B899F056FA095537C5817163801F544BAFCEA39C995D76DB4D16F9DF"
|
||||
]
|
||||
@@ -1557,12 +1506,10 @@ TEST_F(RPCAccountTxHandlerTest, NFTTxs_API_v2)
|
||||
"ledger_index": 11,
|
||||
"ledger_hash": "4BC50C9B0D8515D3EAAE1E74B29A95804346C491EE1A95BF25E4AAB854A6A652",
|
||||
"close_time_iso": "2000-01-01T00:00:00Z",
|
||||
"tx_json":
|
||||
{
|
||||
"tx_json": {
|
||||
"Account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
|
||||
"Fee": "50",
|
||||
"NFTokenOffers":
|
||||
[
|
||||
"NFTokenOffers": [
|
||||
"05FB0EB4B899F056FA095537C5817163801F544BAFCEA39C995D76DB4D16F9DA",
|
||||
"15FB0EB4B899F056FA095537C5817163801F544BAFCEA39C995D76DB4D16F9DF"
|
||||
],
|
||||
@@ -1576,13 +1523,10 @@ TEST_F(RPCAccountTxHandlerTest, NFTTxs_API_v2)
|
||||
"validated": true
|
||||
},
|
||||
{
|
||||
"meta":
|
||||
{
|
||||
"AffectedNodes":
|
||||
[
|
||||
"meta": {
|
||||
"AffectedNodes": [
|
||||
{
|
||||
"CreatedNode":
|
||||
{
|
||||
"CreatedNode": {
|
||||
"LedgerEntryType": "NFTokenOffer",
|
||||
"LedgerIndex": "05FB0EB4B899F056FA095537C5817163801F544BAFCEA39C995D76DB4D16F9DA"
|
||||
}
|
||||
@@ -1596,8 +1540,7 @@ TEST_F(RPCAccountTxHandlerTest, NFTTxs_API_v2)
|
||||
"ledger_index": 11,
|
||||
"ledger_hash": "4BC50C9B0D8515D3EAAE1E74B29A95804346C491EE1A95BF25E4AAB854A6A652",
|
||||
"close_time_iso": "2000-01-01T00:00:00Z",
|
||||
"tx_json":
|
||||
{
|
||||
"tx_json": {
|
||||
"Account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
|
||||
"Amount": "123",
|
||||
"Fee": "50",
|
||||
@@ -1613,8 +1556,7 @@ TEST_F(RPCAccountTxHandlerTest, NFTTxs_API_v2)
|
||||
}
|
||||
],
|
||||
"validated": true,
|
||||
"marker":
|
||||
{
|
||||
"marker": {
|
||||
"ledger": 12,
|
||||
"seq": 34
|
||||
}
|
||||
|
||||
@@ -114,8 +114,7 @@ generateParameterBookOffersTestBundles()
|
||||
ParameterTestBundle{
|
||||
.testName = "MissingTakerGets",
|
||||
.testJson = R"JSON({
|
||||
"taker_pays":
|
||||
{
|
||||
"taker_pays": {
|
||||
"currency": "USD",
|
||||
"issuer": "rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B"
|
||||
}
|
||||
@@ -126,8 +125,7 @@ generateParameterBookOffersTestBundles()
|
||||
ParameterTestBundle{
|
||||
.testName = "MissingTakerPays",
|
||||
.testJson = R"JSON({
|
||||
"taker_gets":
|
||||
{
|
||||
"taker_gets": {
|
||||
"currency": "USD",
|
||||
"issuer": "rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B"
|
||||
}
|
||||
@@ -139,8 +137,7 @@ generateParameterBookOffersTestBundles()
|
||||
.testName = "WrongTypeTakerPays",
|
||||
.testJson = R"JSON({
|
||||
"taker_pays": "wrong",
|
||||
"taker_gets":
|
||||
{
|
||||
"taker_gets": {
|
||||
"currency": "XRP"
|
||||
}
|
||||
})JSON",
|
||||
@@ -151,8 +148,7 @@ generateParameterBookOffersTestBundles()
|
||||
.testName = "WrongTypeTakerGets",
|
||||
.testJson = R"JSON({
|
||||
"taker_gets": "wrong",
|
||||
"taker_pays":
|
||||
{
|
||||
"taker_pays": {
|
||||
"currency": "XRP"
|
||||
}
|
||||
})JSON",
|
||||
@@ -163,8 +159,7 @@ generateParameterBookOffersTestBundles()
|
||||
.testName = "TakerPaysMissingCurrency",
|
||||
.testJson = R"JSON({
|
||||
"taker_pays": {},
|
||||
"taker_gets":
|
||||
{
|
||||
"taker_gets": {
|
||||
"currency": "XRP"
|
||||
}
|
||||
})JSON",
|
||||
@@ -175,8 +170,7 @@ generateParameterBookOffersTestBundles()
|
||||
.testName = "TakerGetsMissingCurrency",
|
||||
.testJson = R"JSON({
|
||||
"taker_gets": {},
|
||||
"taker_pays":
|
||||
{
|
||||
"taker_pays": {
|
||||
"currency": "XRP"
|
||||
}
|
||||
})JSON",
|
||||
@@ -186,13 +180,11 @@ generateParameterBookOffersTestBundles()
|
||||
ParameterTestBundle{
|
||||
.testName = "TakerGetsWrongCurrency",
|
||||
.testJson = R"JSON({
|
||||
"taker_gets":
|
||||
{
|
||||
"taker_gets": {
|
||||
"currency": "CNYY",
|
||||
"issuer": "rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B"
|
||||
},
|
||||
"taker_pays":
|
||||
{
|
||||
"taker_pays": {
|
||||
"currency": "XRP"
|
||||
}
|
||||
})JSON",
|
||||
@@ -202,13 +194,11 @@ generateParameterBookOffersTestBundles()
|
||||
ParameterTestBundle{
|
||||
.testName = "TakerPaysWrongCurrency",
|
||||
.testJson = R"JSON({
|
||||
"taker_pays":
|
||||
{
|
||||
"taker_pays": {
|
||||
"currency": "CNYY",
|
||||
"issuer": "rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B"
|
||||
},
|
||||
"taker_gets":
|
||||
{
|
||||
"taker_gets": {
|
||||
"currency": "XRP"
|
||||
}
|
||||
})JSON",
|
||||
@@ -218,13 +208,11 @@ generateParameterBookOffersTestBundles()
|
||||
ParameterTestBundle{
|
||||
.testName = "TakerGetsCurrencyNotString",
|
||||
.testJson = R"JSON({
|
||||
"taker_gets":
|
||||
{
|
||||
"taker_gets": {
|
||||
"currency": 123,
|
||||
"issuer": "rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B"
|
||||
},
|
||||
"taker_pays":
|
||||
{
|
||||
"taker_pays": {
|
||||
"currency": "XRP"
|
||||
}
|
||||
})JSON",
|
||||
@@ -234,13 +222,11 @@ generateParameterBookOffersTestBundles()
|
||||
ParameterTestBundle{
|
||||
.testName = "TakerPaysCurrencyNotString",
|
||||
.testJson = R"JSON({
|
||||
"taker_pays":
|
||||
{
|
||||
"taker_pays": {
|
||||
"currency": 123,
|
||||
"issuer": "rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B"
|
||||
},
|
||||
"taker_gets":
|
||||
{
|
||||
"taker_gets": {
|
||||
"currency": "XRP"
|
||||
}
|
||||
})JSON",
|
||||
@@ -250,13 +236,11 @@ generateParameterBookOffersTestBundles()
|
||||
ParameterTestBundle{
|
||||
.testName = "TakerGetsWrongIssuer",
|
||||
.testJson = R"JSON({
|
||||
"taker_gets":
|
||||
{
|
||||
"taker_gets": {
|
||||
"currency": "CNY",
|
||||
"issuer": "rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs5"
|
||||
},
|
||||
"taker_pays":
|
||||
{
|
||||
"taker_pays": {
|
||||
"currency": "XRP"
|
||||
}
|
||||
})JSON",
|
||||
@@ -266,13 +250,11 @@ generateParameterBookOffersTestBundles()
|
||||
ParameterTestBundle{
|
||||
.testName = "TakerPaysWrongIssuer",
|
||||
.testJson = R"JSON({
|
||||
"taker_pays":
|
||||
{
|
||||
"taker_pays": {
|
||||
"currency": "CNY",
|
||||
"issuer": "rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs5"
|
||||
},
|
||||
"taker_gets":
|
||||
{
|
||||
"taker_gets": {
|
||||
"currency": "XRP"
|
||||
}
|
||||
})JSON",
|
||||
@@ -282,13 +264,11 @@ generateParameterBookOffersTestBundles()
|
||||
ParameterTestBundle{
|
||||
.testName = "InvalidTaker",
|
||||
.testJson = R"JSON({
|
||||
"taker_pays":
|
||||
{
|
||||
"taker_pays": {
|
||||
"currency": "CNY",
|
||||
"issuer": "rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B"
|
||||
},
|
||||
"taker_gets":
|
||||
{
|
||||
"taker_gets": {
|
||||
"currency": "XRP"
|
||||
},
|
||||
"taker": "123"
|
||||
@@ -299,13 +279,11 @@ generateParameterBookOffersTestBundles()
|
||||
ParameterTestBundle{
|
||||
.testName = "TakerNotString",
|
||||
.testJson = R"JSON({
|
||||
"taker_pays":
|
||||
{
|
||||
"taker_pays": {
|
||||
"currency": "CNY",
|
||||
"issuer": "rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B"
|
||||
},
|
||||
"taker_gets":
|
||||
{
|
||||
"taker_gets": {
|
||||
"currency": "XRP"
|
||||
},
|
||||
"taker": 123
|
||||
@@ -316,13 +294,11 @@ generateParameterBookOffersTestBundles()
|
||||
ParameterTestBundle{
|
||||
.testName = "Domain_InvalidType",
|
||||
.testJson = R"JSON({
|
||||
"taker_pays":
|
||||
{
|
||||
"taker_pays": {
|
||||
"currency": "CNY",
|
||||
"issuer": "rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B"
|
||||
},
|
||||
"taker_gets":
|
||||
{
|
||||
"taker_gets": {
|
||||
"currency": "XRP"
|
||||
},
|
||||
"domain": 0
|
||||
@@ -333,13 +309,11 @@ generateParameterBookOffersTestBundles()
|
||||
ParameterTestBundle{
|
||||
.testName = "Domain_InvalidInt",
|
||||
.testJson = R"JSON({
|
||||
"taker_pays":
|
||||
{
|
||||
"taker_pays": {
|
||||
"currency": "CNY",
|
||||
"issuer": "rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B"
|
||||
},
|
||||
"taker_gets":
|
||||
{
|
||||
"taker_gets": {
|
||||
"currency": "XRP"
|
||||
},
|
||||
"domain": "123"
|
||||
@@ -350,13 +324,11 @@ generateParameterBookOffersTestBundles()
|
||||
ParameterTestBundle{
|
||||
.testName = "Domain_InvalidObject",
|
||||
.testJson = R"JSON({
|
||||
"taker_pays":
|
||||
{
|
||||
"taker_pays": {
|
||||
"currency": "CNY",
|
||||
"issuer": "rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B"
|
||||
},
|
||||
"taker_gets":
|
||||
{
|
||||
"taker_gets": {
|
||||
"currency": "XRP"
|
||||
},
|
||||
"domain": {}
|
||||
@@ -367,13 +339,11 @@ generateParameterBookOffersTestBundles()
|
||||
ParameterTestBundle{
|
||||
.testName = "LimitNotInt",
|
||||
.testJson = R"JSON({
|
||||
"taker_pays":
|
||||
{
|
||||
"taker_pays": {
|
||||
"currency": "CNY",
|
||||
"issuer": "rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B"
|
||||
},
|
||||
"taker_gets":
|
||||
{
|
||||
"taker_gets": {
|
||||
"currency": "XRP"
|
||||
},
|
||||
"limit": "123"
|
||||
@@ -384,13 +354,11 @@ generateParameterBookOffersTestBundles()
|
||||
ParameterTestBundle{
|
||||
.testName = "LimitNegative",
|
||||
.testJson = R"JSON({
|
||||
"taker_pays":
|
||||
{
|
||||
"taker_pays": {
|
||||
"currency": "CNY",
|
||||
"issuer": "rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B"
|
||||
},
|
||||
"taker_gets":
|
||||
{
|
||||
"taker_gets": {
|
||||
"currency": "XRP"
|
||||
},
|
||||
"limit": -1
|
||||
@@ -401,13 +369,11 @@ generateParameterBookOffersTestBundles()
|
||||
ParameterTestBundle{
|
||||
.testName = "LimitZero",
|
||||
.testJson = R"JSON({
|
||||
"taker_pays":
|
||||
{
|
||||
"taker_pays": {
|
||||
"currency": "CNY",
|
||||
"issuer": "rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B"
|
||||
},
|
||||
"taker_gets":
|
||||
{
|
||||
"taker_gets": {
|
||||
"currency": "XRP"
|
||||
},
|
||||
"limit": 0
|
||||
@@ -418,13 +384,11 @@ generateParameterBookOffersTestBundles()
|
||||
ParameterTestBundle{
|
||||
.testName = "LedgerIndexInvalid",
|
||||
.testJson = R"JSON({
|
||||
"taker_pays":
|
||||
{
|
||||
"taker_pays": {
|
||||
"currency": "CNY",
|
||||
"issuer": "rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B"
|
||||
},
|
||||
"taker_gets":
|
||||
{
|
||||
"taker_gets": {
|
||||
"currency": "XRP"
|
||||
},
|
||||
"ledger_index": "xxx"
|
||||
@@ -435,13 +399,11 @@ generateParameterBookOffersTestBundles()
|
||||
ParameterTestBundle{
|
||||
.testName = "LedgerHashInvalid",
|
||||
.testJson = R"JSON({
|
||||
"taker_pays":
|
||||
{
|
||||
"taker_pays": {
|
||||
"currency": "CNY",
|
||||
"issuer": "rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B"
|
||||
},
|
||||
"taker_gets":
|
||||
{
|
||||
"taker_gets": {
|
||||
"currency": "XRP"
|
||||
},
|
||||
"ledger_hash": "xxx"
|
||||
@@ -452,13 +414,11 @@ generateParameterBookOffersTestBundles()
|
||||
ParameterTestBundle{
|
||||
.testName = "LedgerHashNotString",
|
||||
.testJson = R"JSON({
|
||||
"taker_pays":
|
||||
{
|
||||
"taker_pays": {
|
||||
"currency": "CNY",
|
||||
"issuer": "rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B"
|
||||
},
|
||||
"taker_gets":
|
||||
{
|
||||
"taker_gets": {
|
||||
"currency": "XRP"
|
||||
},
|
||||
"ledger_hash": 123
|
||||
@@ -469,13 +429,11 @@ generateParameterBookOffersTestBundles()
|
||||
ParameterTestBundle{
|
||||
.testName = "GetsPaysXRPWithIssuer",
|
||||
.testJson = R"JSON({
|
||||
"taker_pays":
|
||||
{
|
||||
"taker_pays": {
|
||||
"currency": "XRP",
|
||||
"issuer": "rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B"
|
||||
},
|
||||
"taker_gets":
|
||||
{
|
||||
"taker_gets": {
|
||||
"currency": "CNY",
|
||||
"issuer": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn"
|
||||
}
|
||||
@@ -486,12 +444,10 @@ generateParameterBookOffersTestBundles()
|
||||
ParameterTestBundle{
|
||||
.testName = "PaysCurrencyWithXRPIssuer",
|
||||
.testJson = R"JSON({
|
||||
"taker_pays":
|
||||
{
|
||||
"taker_pays": {
|
||||
"currency": "JPY"
|
||||
},
|
||||
"taker_gets":
|
||||
{
|
||||
"taker_gets": {
|
||||
"currency": "CNY",
|
||||
"issuer": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn"
|
||||
}
|
||||
@@ -502,12 +458,10 @@ generateParameterBookOffersTestBundles()
|
||||
ParameterTestBundle{
|
||||
.testName = "GetsCurrencyWithXRPIssuer",
|
||||
.testJson = R"JSON({
|
||||
"taker_pays":
|
||||
{
|
||||
"taker_pays": {
|
||||
"currency": "XRP"
|
||||
},
|
||||
"taker_gets":
|
||||
{
|
||||
"taker_gets": {
|
||||
"currency": "CNY"
|
||||
}
|
||||
})JSON",
|
||||
@@ -517,13 +471,11 @@ generateParameterBookOffersTestBundles()
|
||||
ParameterTestBundle{
|
||||
.testName = "GetsXRPWithIssuer",
|
||||
.testJson = R"JSON({
|
||||
"taker_pays":
|
||||
{
|
||||
"taker_pays": {
|
||||
"currency": "CNY",
|
||||
"issuer": "rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B"
|
||||
},
|
||||
"taker_gets":
|
||||
{
|
||||
"taker_gets": {
|
||||
"currency": "XRP",
|
||||
"issuer": "rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B"
|
||||
}
|
||||
@@ -534,13 +486,11 @@ generateParameterBookOffersTestBundles()
|
||||
ParameterTestBundle{
|
||||
.testName = "BadMarket",
|
||||
.testJson = R"JSON({
|
||||
"taker_pays":
|
||||
{
|
||||
"taker_pays": {
|
||||
"currency": "CNY",
|
||||
"issuer": "rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B"
|
||||
},
|
||||
"taker_gets":
|
||||
{
|
||||
"taker_gets": {
|
||||
"currency": "CNY",
|
||||
"issuer": "rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B"
|
||||
}
|
||||
@@ -687,12 +637,10 @@ generateNormalPathBookOffersTestBundles()
|
||||
|
||||
auto const getsXRPPaysUSDInputJson = fmt::format(
|
||||
R"JSON({{
|
||||
"taker_gets":
|
||||
{{
|
||||
"taker_gets": {{
|
||||
"currency": "XRP"
|
||||
}},
|
||||
"taker_pays":
|
||||
{{
|
||||
"taker_pays": {{
|
||||
"currency": "USD",
|
||||
"issuer": "{}"
|
||||
}}
|
||||
@@ -702,12 +650,10 @@ generateNormalPathBookOffersTestBundles()
|
||||
|
||||
auto const getsXRPPaysUSDInputJsonWithDomain = fmt::format(
|
||||
R"JSON({{
|
||||
"taker_gets":
|
||||
{{
|
||||
"taker_gets": {{
|
||||
"currency": "XRP"
|
||||
}},
|
||||
"taker_pays":
|
||||
{{
|
||||
"taker_pays": {{
|
||||
"currency": "USD",
|
||||
"issuer": "{}"
|
||||
}},
|
||||
@@ -719,12 +665,10 @@ generateNormalPathBookOffersTestBundles()
|
||||
|
||||
auto const paysXRPGetsUSDInputJson = fmt::format(
|
||||
R"JSON({{
|
||||
"taker_pays":
|
||||
{{
|
||||
"taker_pays": {{
|
||||
"currency": "XRP"
|
||||
}},
|
||||
"taker_gets":
|
||||
{{
|
||||
"taker_gets": {{
|
||||
"currency": "USD",
|
||||
"issuer": "{}"
|
||||
}}
|
||||
@@ -832,8 +776,7 @@ generateNormalPathBookOffersTestBundles()
|
||||
R"JSON({{
|
||||
"ledger_hash": "{}",
|
||||
"ledger_index": 300,
|
||||
"offers":
|
||||
[
|
||||
"offers": [
|
||||
{{
|
||||
"Account": "{}",
|
||||
"BookDirectory": "43B83ADC452B85FCBADA6CAEAC5181C255A213630D58FFD455071AFD498D0000",
|
||||
@@ -894,8 +837,7 @@ generateNormalPathBookOffersTestBundles()
|
||||
R"JSON({{
|
||||
"ledger_hash": "{}",
|
||||
"ledger_index": 300,
|
||||
"offers":
|
||||
[
|
||||
"offers": [
|
||||
{{
|
||||
"Account": "{}",
|
||||
"BookDirectory": "43B83ADC452B85FCBADA6CAEAC5181C255A213630D58FFD455071AFD498D0000",
|
||||
@@ -956,8 +898,7 @@ generateNormalPathBookOffersTestBundles()
|
||||
R"JSON({{
|
||||
"ledger_hash": "{}",
|
||||
"ledger_index": 300,
|
||||
"offers":
|
||||
[
|
||||
"offers": [
|
||||
{{
|
||||
"Account": "{}",
|
||||
"BookDirectory": "43B83ADC452B85FCBADA6CAEAC5181C255A213630D58FFD455071AFD498D0000",
|
||||
@@ -1021,8 +962,7 @@ generateNormalPathBookOffersTestBundles()
|
||||
R"JSON({{
|
||||
"ledger_hash": "{}",
|
||||
"ledger_index": 300,
|
||||
"offers":
|
||||
[
|
||||
"offers": [
|
||||
{{
|
||||
"Account": "{}",
|
||||
"BookDirectory": "{}",
|
||||
@@ -1087,8 +1027,7 @@ generateNormalPathBookOffersTestBundles()
|
||||
R"JSON({{
|
||||
"ledger_hash": "{}",
|
||||
"ledger_index": 300,
|
||||
"offers":
|
||||
[
|
||||
"offers": [
|
||||
{{
|
||||
"Account": "{}",
|
||||
"BookDirectory": "{}",
|
||||
@@ -1163,8 +1102,7 @@ generateNormalPathBookOffersTestBundles()
|
||||
R"JSON({{
|
||||
"ledger_hash": "{}",
|
||||
"ledger_index": 300,
|
||||
"offers":
|
||||
[
|
||||
"offers": [
|
||||
{{
|
||||
"Account": "{}",
|
||||
"BookDirectory": "{}",
|
||||
@@ -1249,8 +1187,7 @@ generateNormalPathBookOffersTestBundles()
|
||||
R"JSON({{
|
||||
"ledger_hash": "{}",
|
||||
"ledger_index": 300,
|
||||
"offers":
|
||||
[
|
||||
"offers": [
|
||||
{{
|
||||
"Account": "{}",
|
||||
"BookDirectory": "{}",
|
||||
@@ -1309,8 +1246,7 @@ generateNormalPathBookOffersTestBundles()
|
||||
R"JSON({{
|
||||
"ledger_hash": "{}",
|
||||
"ledger_index": 300,
|
||||
"offers":
|
||||
[
|
||||
"offers": [
|
||||
{{
|
||||
"Account": "{}",
|
||||
"BookDirectory": "{}",
|
||||
@@ -1374,8 +1310,7 @@ generateNormalPathBookOffersTestBundles()
|
||||
R"JSON({{
|
||||
"ledger_hash": "{}",
|
||||
"ledger_index": 300,
|
||||
"offers":
|
||||
[
|
||||
"offers": [
|
||||
{{
|
||||
"Account": "{}",
|
||||
"BookDirectory": "{}",
|
||||
@@ -1442,8 +1377,7 @@ generateNormalPathBookOffersTestBundles()
|
||||
R"JSON({{
|
||||
"ledger_hash": "{}",
|
||||
"ledger_index": 300,
|
||||
"offers":
|
||||
[
|
||||
"offers": [
|
||||
{{
|
||||
"Account": "{}",
|
||||
"BookDirectory": "{}",
|
||||
@@ -1500,12 +1434,10 @@ TEST_F(RPCBookOffersHandlerTest, LedgerNonExistViaIntSequence)
|
||||
fmt::format(
|
||||
R"JSON({{
|
||||
"ledger_index": 30,
|
||||
"taker_gets":
|
||||
{{
|
||||
"taker_gets": {{
|
||||
"currency": "XRP"
|
||||
}},
|
||||
"taker_pays":
|
||||
{{
|
||||
"taker_pays": {{
|
||||
"currency": "USD",
|
||||
"issuer": "{}"
|
||||
}}
|
||||
@@ -1533,12 +1465,10 @@ TEST_F(RPCBookOffersHandlerTest, LedgerNonExistViaSequence)
|
||||
fmt::format(
|
||||
R"JSON({{
|
||||
"ledger_index": "30",
|
||||
"taker_gets":
|
||||
{{
|
||||
"taker_gets": {{
|
||||
"currency": "XRP"
|
||||
}},
|
||||
"taker_pays":
|
||||
{{
|
||||
"taker_pays": {{
|
||||
"currency": "USD",
|
||||
"issuer": "{}"
|
||||
}}
|
||||
@@ -1567,12 +1497,10 @@ TEST_F(RPCBookOffersHandlerTest, LedgerNonExistViaHash)
|
||||
fmt::format(
|
||||
R"JSON({{
|
||||
"ledger_hash": "{}",
|
||||
"taker_gets":
|
||||
{{
|
||||
"taker_gets": {{
|
||||
"currency": "XRP"
|
||||
}},
|
||||
"taker_pays":
|
||||
{{
|
||||
"taker_pays": {{
|
||||
"currency": "USD",
|
||||
"issuer": "{}"
|
||||
}}
|
||||
@@ -1645,12 +1573,10 @@ TEST_F(RPCBookOffersHandlerTest, Limit)
|
||||
static auto const kINPUT = json::parse(
|
||||
fmt::format(
|
||||
R"JSON({{
|
||||
"taker_gets":
|
||||
{{
|
||||
"taker_gets": {{
|
||||
"currency": "XRP"
|
||||
}},
|
||||
"taker_pays":
|
||||
{{
|
||||
"taker_pays": {{
|
||||
"currency": "USD",
|
||||
"issuer": "{}"
|
||||
}},
|
||||
@@ -1721,12 +1647,10 @@ TEST_F(RPCBookOffersHandlerTest, LimitMoreThanMax)
|
||||
static auto const kINPUT = json::parse(
|
||||
fmt::format(
|
||||
R"JSON({{
|
||||
"taker_gets":
|
||||
{{
|
||||
"taker_gets": {{
|
||||
"currency": "XRP"
|
||||
}},
|
||||
"taker_pays":
|
||||
{{
|
||||
"taker_pays": {{
|
||||
"currency": "USD",
|
||||
"issuer": "{}"
|
||||
}},
|
||||
|
||||
@@ -286,8 +286,7 @@ TEST_F(RPCFeatureHandlerTest, SuccessPathViaNameWithSingleSupportedAndEnabledRes
|
||||
|
||||
auto const expectedOutput = fmt::format(
|
||||
R"JSON({{
|
||||
"2E2FB9CF8A44EB80F4694D38AADAE9B8B7ADAFD2F092E10068E61C98C4F092B0":
|
||||
{{
|
||||
"2E2FB9CF8A44EB80F4694D38AADAE9B8B7ADAFD2F092E10068E61C98C4F092B0": {{
|
||||
"name": "fixUniversalNumber",
|
||||
"enabled": true,
|
||||
"supported": true
|
||||
@@ -337,8 +336,7 @@ TEST_F(RPCFeatureHandlerTest, SuccessPathViaHashWithSingleResult)
|
||||
|
||||
auto const expectedOutput = fmt::format(
|
||||
R"JSON({{
|
||||
"2E2FB9CF8A44EB80F4694D38AADAE9B8B7ADAFD2F092E10068E61C98C4F092B0":
|
||||
{{
|
||||
"2E2FB9CF8A44EB80F4694D38AADAE9B8B7ADAFD2F092E10068E61C98C4F092B0": {{
|
||||
"name": "fixUniversalNumber",
|
||||
"enabled": true,
|
||||
"supported": true
|
||||
@@ -424,14 +422,12 @@ TEST_F(RPCFeatureHandlerTest, SuccessPathWithMultipleResults)
|
||||
auto const expectedOutput = fmt::format(
|
||||
R"JSON({{
|
||||
"features": {{
|
||||
"2E2FB9CF8A44EB80F4694D38AADAE9B8B7ADAFD2F092E10068E61C98C4F092B0":
|
||||
{{
|
||||
"2E2FB9CF8A44EB80F4694D38AADAE9B8B7ADAFD2F092E10068E61C98C4F092B0": {{
|
||||
"name": "fixUniversalNumber",
|
||||
"enabled": true,
|
||||
"supported": true
|
||||
}},
|
||||
"DF8B4536989BDACE3F934F29423848B9F1D76D09BE6A1FCFE7E7F06AA26ABEAD":
|
||||
{{
|
||||
"DF8B4536989BDACE3F934F29423848B9F1D76D09BE6A1FCFE7E7F06AA26ABEAD": {{
|
||||
"name": "fixRemoveNFTokenAutoTrustLine",
|
||||
"enabled": false,
|
||||
"supported": false
|
||||
|
||||
@@ -141,8 +141,7 @@ generateTestValuesForParametersTest()
|
||||
.testName = "no_base_asset",
|
||||
.testJson = R"JSON({
|
||||
"quote_asset": "USD",
|
||||
"oracles":
|
||||
[
|
||||
"oracles": [
|
||||
{
|
||||
"account": "rGh1VZCRBJY6rJiaFpD4LZtyHiuCkC8aeD",
|
||||
"oracle_document_id": 2
|
||||
@@ -157,8 +156,7 @@ generateTestValuesForParametersTest()
|
||||
.testJson = R"JSON({
|
||||
"quote_asset": "USD",
|
||||
"base_asset": "asdf",
|
||||
"oracles":
|
||||
[
|
||||
"oracles": [
|
||||
{
|
||||
"account": "rGh1VZCRBJY6rJiaFpD4LZtyHiuCkC8aeD",
|
||||
"oracle_document_id": 2
|
||||
@@ -173,8 +171,7 @@ generateTestValuesForParametersTest()
|
||||
.testJson = R"JSON({
|
||||
"quote_asset": "USD",
|
||||
"base_asset": "",
|
||||
"oracles":
|
||||
[
|
||||
"oracles": [
|
||||
{
|
||||
"account": "rGh1VZCRBJY6rJiaFpD4LZtyHiuCkC8aeD",
|
||||
"oracle_document_id": 2
|
||||
@@ -189,8 +186,7 @@ generateTestValuesForParametersTest()
|
||||
.testJson = R"JSON({
|
||||
"quote_asset": "USD",
|
||||
"base_asset": "+aa",
|
||||
"oracles":
|
||||
[
|
||||
"oracles": [
|
||||
{
|
||||
"account": "rGh1VZCRBJY6rJiaFpD4LZtyHiuCkC8aeD",
|
||||
"oracle_document_id": 2
|
||||
@@ -204,8 +200,7 @@ generateTestValuesForParametersTest()
|
||||
.testName = "no_quote_asset",
|
||||
.testJson = R"JSON({
|
||||
"base_asset": "USD",
|
||||
"oracles":
|
||||
[
|
||||
"oracles": [
|
||||
{
|
||||
"account": "rGh1VZCRBJY6rJiaFpD4LZtyHiuCkC8aeD",
|
||||
"oracle_document_id": 2
|
||||
@@ -220,8 +215,7 @@ generateTestValuesForParametersTest()
|
||||
.testJson = R"JSON({
|
||||
"quote_asset": "asdf",
|
||||
"base_asset": "USD",
|
||||
"oracles":
|
||||
[
|
||||
"oracles": [
|
||||
{
|
||||
"account": "rGh1VZCRBJY6rJiaFpD4LZtyHiuCkC8aeD",
|
||||
"oracle_document_id": 2
|
||||
@@ -236,8 +230,7 @@ generateTestValuesForParametersTest()
|
||||
.testJson = R"JSON({
|
||||
"quote_asset": "",
|
||||
"base_asset": "USD",
|
||||
"oracles":
|
||||
[
|
||||
"oracles": [
|
||||
{
|
||||
"account": "rGh1VZCRBJY6rJiaFpD4LZtyHiuCkC8aeD",
|
||||
"oracle_document_id": 2
|
||||
@@ -252,8 +245,7 @@ generateTestValuesForParametersTest()
|
||||
.testJson = R"JSON({
|
||||
"quote_asset": "+aa",
|
||||
"base_asset": "USD",
|
||||
"oracles":
|
||||
[
|
||||
"oracles": [
|
||||
{
|
||||
"account": "rGh1VZCRBJY6rJiaFpD4LZtyHiuCkC8aeD",
|
||||
"oracle_document_id": 2
|
||||
@@ -288,8 +280,7 @@ generateTestValuesForParametersTest()
|
||||
.testJson = R"JSON({
|
||||
"base_asset": "USD",
|
||||
"quote_asset": "XRP",
|
||||
"oracles":
|
||||
[
|
||||
"oracles": [
|
||||
{
|
||||
"account": "rGh1VZCRBJY6rJiaFpD4LZtyHiuCkC8aeD",
|
||||
"oracle_document_id": 2
|
||||
@@ -305,8 +296,7 @@ generateTestValuesForParametersTest()
|
||||
.testJson = R"JSON({
|
||||
"base_asset": "USD",
|
||||
"quote_asset": "XRP",
|
||||
"oracles":
|
||||
[
|
||||
"oracles": [
|
||||
{
|
||||
"account": "rGh1VZCRBJY6rJiaFpD4LZtyHiuCkC8aeD",
|
||||
"oracle_document_id": 2
|
||||
@@ -322,8 +312,7 @@ generateTestValuesForParametersTest()
|
||||
.testJson = R"JSON({
|
||||
"base_asset": "USD",
|
||||
"quote_asset": "XRP",
|
||||
"oracles":
|
||||
[
|
||||
"oracles": [
|
||||
{
|
||||
"account": "rGh1VZCRBJY6rJiaFpD4LZtyHiuCkC8aeD",
|
||||
"oracle_document_id": 2
|
||||
@@ -339,8 +328,7 @@ generateTestValuesForParametersTest()
|
||||
.testJson = R"JSON({
|
||||
"base_asset": "USD",
|
||||
"quote_asset": "XRP",
|
||||
"oracles":
|
||||
[
|
||||
"oracles": [
|
||||
{
|
||||
"account": "rGh1VZCRBJY6rJiaFpD4LZtyHiuCkC8aeD",
|
||||
"oracle_document_id": 2
|
||||
@@ -356,8 +344,7 @@ generateTestValuesForParametersTest()
|
||||
.testJson = R"JSON({
|
||||
"base_asset": "USD",
|
||||
"quote_asset": "XRP",
|
||||
"oracles":
|
||||
[
|
||||
"oracles": [
|
||||
{
|
||||
"account": "invalid",
|
||||
"oracle_document_id": 2
|
||||
@@ -372,8 +359,7 @@ generateTestValuesForParametersTest()
|
||||
.testJson = R"JSON({
|
||||
"base_asset": "USD",
|
||||
"quote_asset": "XRP",
|
||||
"oracles":
|
||||
[
|
||||
"oracles": [
|
||||
{
|
||||
"account": "rGh1VZCRBJY6rJiaFpD4LZtyHiuCkC8aeD",
|
||||
"oracle_document_id": "a"
|
||||
@@ -462,8 +448,7 @@ TEST_F(RPCGetAggregatePriceHandlerTest, LedgerNotFound)
|
||||
R"JSON({{
|
||||
"base_asset": "USD",
|
||||
"quote_asset": "XRP",
|
||||
"oracles":
|
||||
[
|
||||
"oracles": [
|
||||
{{
|
||||
"account": "{}",
|
||||
"oracle_document_id": {}
|
||||
@@ -498,8 +483,7 @@ TEST_F(RPCGetAggregatePriceHandlerTest, OracleLedgerEntrySinglePriceData)
|
||||
R"JSON({{
|
||||
"base_asset": "USD",
|
||||
"quote_asset": "XRP",
|
||||
"oracles":
|
||||
[
|
||||
"oracles": [
|
||||
{{
|
||||
"account": "{}",
|
||||
"oracle_document_id": {}
|
||||
@@ -514,8 +498,7 @@ TEST_F(RPCGetAggregatePriceHandlerTest, OracleLedgerEntrySinglePriceData)
|
||||
auto const expected = json::parse(
|
||||
fmt::format(
|
||||
R"JSON({{
|
||||
"entire_set":
|
||||
{{
|
||||
"entire_set": {{
|
||||
"mean": "10",
|
||||
"size": 1,
|
||||
"standard_deviation": "0"
|
||||
@@ -551,8 +534,7 @@ TEST_F(RPCGetAggregatePriceHandlerTest, OracleLedgerEntryStrOracleDocumentId)
|
||||
R"JSON({{
|
||||
"base_asset": "USD",
|
||||
"quote_asset": "XRP",
|
||||
"oracles":
|
||||
[
|
||||
"oracles": [
|
||||
{{
|
||||
"account": "{}",
|
||||
"oracle_document_id": "{}"
|
||||
@@ -567,8 +549,7 @@ TEST_F(RPCGetAggregatePriceHandlerTest, OracleLedgerEntryStrOracleDocumentId)
|
||||
auto const expected = json::parse(
|
||||
fmt::format(
|
||||
R"JSON({{
|
||||
"entire_set":
|
||||
{{
|
||||
"entire_set": {{
|
||||
"mean": "10",
|
||||
"size": 1,
|
||||
"standard_deviation": "0"
|
||||
@@ -604,8 +585,7 @@ TEST_F(RPCGetAggregatePriceHandlerTest, PreviousTxNotFound)
|
||||
R"JSON({{
|
||||
"base_asset": "JPY",
|
||||
"quote_asset": "XRP",
|
||||
"oracles":
|
||||
[
|
||||
"oracles": [
|
||||
{{
|
||||
"account": "{}",
|
||||
"oracle_document_id": {}
|
||||
@@ -620,8 +600,7 @@ TEST_F(RPCGetAggregatePriceHandlerTest, PreviousTxNotFound)
|
||||
auto const expected = json::parse(
|
||||
fmt::format(
|
||||
R"JSON({{
|
||||
"entire_set":
|
||||
{{
|
||||
"entire_set": {{
|
||||
"mean": "10",
|
||||
"size": 1,
|
||||
"standard_deviation": "0"
|
||||
@@ -674,8 +653,7 @@ TEST_F(RPCGetAggregatePriceHandlerTest, NewLedgerObjectHasNoPricePair)
|
||||
R"JSON({{
|
||||
"base_asset": "JPY",
|
||||
"quote_asset": "XRP",
|
||||
"oracles":
|
||||
[
|
||||
"oracles": [
|
||||
{{
|
||||
"account": "{}",
|
||||
"oracle_document_id": {}
|
||||
@@ -690,8 +668,7 @@ TEST_F(RPCGetAggregatePriceHandlerTest, NewLedgerObjectHasNoPricePair)
|
||||
auto const expected = json::parse(
|
||||
fmt::format(
|
||||
R"JSON({{
|
||||
"entire_set":
|
||||
{{
|
||||
"entire_set": {{
|
||||
"mean": "10",
|
||||
"size": 1,
|
||||
"standard_deviation": "0"
|
||||
@@ -734,8 +711,7 @@ TEST_F(RPCGetAggregatePriceHandlerTest, OracleLedgerEntryMultipleOraclesOdd)
|
||||
R"JSON({{
|
||||
"base_asset": "USD",
|
||||
"quote_asset": "XRP",
|
||||
"oracles":
|
||||
[
|
||||
"oracles": [
|
||||
{{
|
||||
"account": "{}",
|
||||
"oracle_document_id": {}
|
||||
@@ -762,8 +738,7 @@ TEST_F(RPCGetAggregatePriceHandlerTest, OracleLedgerEntryMultipleOraclesOdd)
|
||||
auto const expected = json::parse(
|
||||
fmt::format(
|
||||
R"JSON({{
|
||||
"entire_set":
|
||||
{{
|
||||
"entire_set": {{
|
||||
"mean": "110",
|
||||
"size": 3,
|
||||
"standard_deviation": "164.6207763315433"
|
||||
@@ -806,8 +781,7 @@ TEST_F(RPCGetAggregatePriceHandlerTest, OracleLedgerEntryMultipleOraclesEven)
|
||||
R"JSON({{
|
||||
"base_asset": "USD",
|
||||
"quote_asset": "XRP",
|
||||
"oracles":
|
||||
[
|
||||
"oracles": [
|
||||
{{
|
||||
"account": "{}",
|
||||
"oracle_document_id": {}
|
||||
@@ -840,8 +814,7 @@ TEST_F(RPCGetAggregatePriceHandlerTest, OracleLedgerEntryMultipleOraclesEven)
|
||||
auto const expected = json::parse(
|
||||
fmt::format(
|
||||
R"JSON({{
|
||||
"entire_set":
|
||||
{{
|
||||
"entire_set": {{
|
||||
"mean": "92.5",
|
||||
"size": 4,
|
||||
"standard_deviation": "138.8944443333378"
|
||||
@@ -885,8 +858,7 @@ TEST_F(RPCGetAggregatePriceHandlerTest, OracleLedgerEntryTrim)
|
||||
"base_asset": "USD",
|
||||
"quote_asset": "XRP",
|
||||
"trim": {},
|
||||
"oracles":
|
||||
[
|
||||
"oracles": [
|
||||
{{
|
||||
"account": "{}",
|
||||
"oracle_document_id": {}
|
||||
@@ -920,14 +892,12 @@ TEST_F(RPCGetAggregatePriceHandlerTest, OracleLedgerEntryTrim)
|
||||
auto const expected = json::parse(
|
||||
fmt::format(
|
||||
R"JSON({{
|
||||
"entire_set":
|
||||
{{
|
||||
"entire_set": {{
|
||||
"mean": "92.5",
|
||||
"size": 4,
|
||||
"standard_deviation": "138.8944443333378"
|
||||
}},
|
||||
"trimmed_set":
|
||||
{{
|
||||
"trimmed_set": {{
|
||||
"mean": "30",
|
||||
"size": 2,
|
||||
"standard_deviation": "14.14213562373095"
|
||||
@@ -964,8 +934,7 @@ TEST_F(RPCGetAggregatePriceHandlerTest, NoOracleEntryFound)
|
||||
R"JSON({{
|
||||
"base_asset": "USD",
|
||||
"quote_asset": "XRP",
|
||||
"oracles":
|
||||
[
|
||||
"oracles": [
|
||||
{{
|
||||
"account": "{}",
|
||||
"oracle_document_id": {}
|
||||
@@ -1000,8 +969,7 @@ TEST_F(RPCGetAggregatePriceHandlerTest, NoMatchAssetPair)
|
||||
R"JSON({{
|
||||
"base_asset": "JPY",
|
||||
"quote_asset": "XRP",
|
||||
"oracles":
|
||||
[
|
||||
"oracles": [
|
||||
{{
|
||||
"account": "{}",
|
||||
"oracle_document_id": {}
|
||||
@@ -1047,8 +1015,7 @@ TEST_F(RPCGetAggregatePriceHandlerTest, TimeThresholdIsZero)
|
||||
"base_asset": "USD",
|
||||
"quote_asset": "XRP",
|
||||
"time_threshold": {},
|
||||
"oracles":
|
||||
[
|
||||
"oracles": [
|
||||
{{
|
||||
"account": "{}",
|
||||
"oracle_document_id": {}
|
||||
@@ -1082,8 +1049,7 @@ TEST_F(RPCGetAggregatePriceHandlerTest, TimeThresholdIsZero)
|
||||
auto const expected = json::parse(
|
||||
fmt::format(
|
||||
R"JSON({{
|
||||
"entire_set":
|
||||
{{
|
||||
"entire_set": {{
|
||||
"mean": "10",
|
||||
"size": 1,
|
||||
"standard_deviation": "0"
|
||||
@@ -1131,8 +1097,7 @@ TEST_F(RPCGetAggregatePriceHandlerTest, ValidTimeThreshold)
|
||||
"base_asset": "USD",
|
||||
"quote_asset": "XRP",
|
||||
"time_threshold": {},
|
||||
"oracles":
|
||||
[
|
||||
"oracles": [
|
||||
{{
|
||||
"account": "{}",
|
||||
"oracle_document_id": {}
|
||||
@@ -1166,8 +1131,7 @@ TEST_F(RPCGetAggregatePriceHandlerTest, ValidTimeThreshold)
|
||||
auto const expected = json::parse(
|
||||
fmt::format(
|
||||
R"JSON({{
|
||||
"entire_set":
|
||||
{{
|
||||
"entire_set": {{
|
||||
"mean": "15",
|
||||
"size": 2,
|
||||
"standard_deviation": "7.071067811865475"
|
||||
@@ -1215,8 +1179,7 @@ TEST_F(RPCGetAggregatePriceHandlerTest, TimeThresholdTooLong)
|
||||
"base_asset": "USD",
|
||||
"quote_asset": "XRP",
|
||||
"time_threshold": {},
|
||||
"oracles":
|
||||
[
|
||||
"oracles": [
|
||||
{{
|
||||
"account": "{}",
|
||||
"oracle_document_id": {}
|
||||
@@ -1250,8 +1213,7 @@ TEST_F(RPCGetAggregatePriceHandlerTest, TimeThresholdTooLong)
|
||||
auto const expected = json::parse(
|
||||
fmt::format(
|
||||
R"JSON({{
|
||||
"entire_set":
|
||||
{{
|
||||
"entire_set": {{
|
||||
"mean": "92.5",
|
||||
"size": 4,
|
||||
"standard_deviation": "138.8944443333378"
|
||||
@@ -1298,8 +1260,7 @@ TEST_F(RPCGetAggregatePriceHandlerTest, TimeThresholdIncludeOldest)
|
||||
"base_asset": "USD",
|
||||
"quote_asset": "XRP",
|
||||
"time_threshold": {},
|
||||
"oracles":
|
||||
[
|
||||
"oracles": [
|
||||
{{
|
||||
"account": "{}",
|
||||
"oracle_document_id": {}
|
||||
@@ -1333,8 +1294,7 @@ TEST_F(RPCGetAggregatePriceHandlerTest, TimeThresholdIncludeOldest)
|
||||
auto const expected = json::parse(
|
||||
fmt::format(
|
||||
R"JSON({{
|
||||
"entire_set":
|
||||
{{
|
||||
"entire_set": {{
|
||||
"mean": "92.5",
|
||||
"size": 4,
|
||||
"standard_deviation": "138.8944443333378"
|
||||
@@ -1387,8 +1347,7 @@ TEST_F(RPCGetAggregatePriceHandlerTest, FromTx)
|
||||
R"JSON({{
|
||||
"base_asset": "JPY",
|
||||
"quote_asset": "XRP",
|
||||
"oracles":
|
||||
[
|
||||
"oracles": [
|
||||
{{
|
||||
"account": "{}",
|
||||
"oracle_document_id": {}
|
||||
@@ -1403,8 +1362,7 @@ TEST_F(RPCGetAggregatePriceHandlerTest, FromTx)
|
||||
auto const expected = json::parse(
|
||||
fmt::format(
|
||||
R"JSON({{
|
||||
"entire_set":
|
||||
{{
|
||||
"entire_set": {{
|
||||
"mean": "10",
|
||||
"size": 1,
|
||||
"standard_deviation": "0"
|
||||
@@ -1470,8 +1428,7 @@ TEST_F(RPCGetAggregatePriceHandlerTest, NotFoundInTxHistory)
|
||||
R"JSON({{
|
||||
"base_asset": "JPY",
|
||||
"quote_asset": "XRP",
|
||||
"oracles":
|
||||
[
|
||||
"oracles": [
|
||||
{{
|
||||
"account": "{}",
|
||||
"oracle_document_id": {}
|
||||
|
||||
@@ -912,11 +912,9 @@ generateTestValuesForParametersTest()
|
||||
.testName = "EmptyAMMAssetJson",
|
||||
.testJson = fmt::format(
|
||||
R"JSON({{
|
||||
"amm":
|
||||
{{
|
||||
"amm": {{
|
||||
"asset": {{}},
|
||||
"asset2":
|
||||
{{
|
||||
"asset2": {{
|
||||
"currency": "USD",
|
||||
"issuer": "{}"
|
||||
}}
|
||||
@@ -932,11 +930,9 @@ generateTestValuesForParametersTest()
|
||||
.testName = "EmptyAMMAsset2Json",
|
||||
.testJson = fmt::format(
|
||||
R"JSON({{
|
||||
"amm":
|
||||
{{
|
||||
"amm": {{
|
||||
"asset2": {{}},
|
||||
"asset":
|
||||
{{
|
||||
"asset": {{
|
||||
"currency": "USD",
|
||||
"issuer": "{}"
|
||||
}}
|
||||
@@ -952,10 +948,8 @@ generateTestValuesForParametersTest()
|
||||
.testName = "MissingAMMAsset2Json",
|
||||
.testJson = fmt::format(
|
||||
R"JSON({{
|
||||
"amm":
|
||||
{{
|
||||
"asset":
|
||||
{{
|
||||
"amm": {{
|
||||
"asset": {{
|
||||
"currency": "USD",
|
||||
"issuer": "{}"
|
||||
}}
|
||||
@@ -971,10 +965,8 @@ generateTestValuesForParametersTest()
|
||||
.testName = "MissingAMMAssetJson",
|
||||
.testJson = fmt::format(
|
||||
R"JSON({{
|
||||
"amm":
|
||||
{{
|
||||
"asset2":
|
||||
{{
|
||||
"amm": {{
|
||||
"asset2": {{
|
||||
"currency": "USD",
|
||||
"issuer": "{}"
|
||||
}}
|
||||
@@ -990,11 +982,9 @@ generateTestValuesForParametersTest()
|
||||
.testName = "AMMAssetNotJson",
|
||||
.testJson = fmt::format(
|
||||
R"JSON({{
|
||||
"amm":
|
||||
{{
|
||||
"amm": {{
|
||||
"asset": "invalid",
|
||||
"asset2":
|
||||
{{
|
||||
"asset2": {{
|
||||
"currency": "USD",
|
||||
"issuer": "{}"
|
||||
}}
|
||||
@@ -1010,11 +1000,9 @@ generateTestValuesForParametersTest()
|
||||
.testName = "AMMAsset2NotJson",
|
||||
.testJson = fmt::format(
|
||||
R"JSON({{
|
||||
"amm":
|
||||
{{
|
||||
"amm": {{
|
||||
"asset2": "invalid",
|
||||
"asset":
|
||||
{{
|
||||
"asset": {{
|
||||
"currency": "USD",
|
||||
"issuer": "{}"
|
||||
}}
|
||||
@@ -1030,14 +1018,11 @@ generateTestValuesForParametersTest()
|
||||
.testName = "WrongAMMAssetCurrency",
|
||||
.testJson = fmt::format(
|
||||
R"JSON({{
|
||||
"amm":
|
||||
{{
|
||||
"asset2":
|
||||
{{
|
||||
"amm": {{
|
||||
"asset2": {{
|
||||
"currency": "XRP"
|
||||
}},
|
||||
"asset":
|
||||
{{
|
||||
"asset": {{
|
||||
"currency": "USD2",
|
||||
"issuer": "{}"
|
||||
}}
|
||||
@@ -1053,14 +1038,11 @@ generateTestValuesForParametersTest()
|
||||
.testName = "WrongAMMAssetIssuer",
|
||||
.testJson = fmt::format(
|
||||
R"JSON({{
|
||||
"amm":
|
||||
{{
|
||||
"asset2":
|
||||
{{
|
||||
"amm": {{
|
||||
"asset2": {{
|
||||
"currency": "XRP"
|
||||
}},
|
||||
"asset":
|
||||
{{
|
||||
"asset": {{
|
||||
"currency": "USD",
|
||||
"issuer": "aa{}"
|
||||
}}
|
||||
@@ -1076,14 +1058,11 @@ generateTestValuesForParametersTest()
|
||||
.testName = "MissingAMMAssetIssuerForNonXRP",
|
||||
.testJson = fmt::format(
|
||||
R"JSON({{
|
||||
"amm":
|
||||
{{
|
||||
"asset2":
|
||||
{{
|
||||
"amm": {{
|
||||
"asset2": {{
|
||||
"currency": "JPY"
|
||||
}},
|
||||
"asset":
|
||||
{{
|
||||
"asset": {{
|
||||
"currency": "USD",
|
||||
"issuer": "{}"
|
||||
}}
|
||||
@@ -1099,15 +1078,12 @@ generateTestValuesForParametersTest()
|
||||
.testName = "AMMAssetHasIssuerForXRP",
|
||||
.testJson = fmt::format(
|
||||
R"JSON({{
|
||||
"amm":
|
||||
{{
|
||||
"asset2":
|
||||
{{
|
||||
"amm": {{
|
||||
"asset2": {{
|
||||
"currency": "XRP",
|
||||
"issuer": "{}"
|
||||
}},
|
||||
"asset":
|
||||
{{
|
||||
"asset": {{
|
||||
"currency": "USD",
|
||||
"issuer": "{}"
|
||||
}}
|
||||
@@ -1124,14 +1100,11 @@ generateTestValuesForParametersTest()
|
||||
.testName = "MissingAMMAssetCurrency",
|
||||
.testJson = fmt::format(
|
||||
R"JSON({{
|
||||
"amm":
|
||||
{{
|
||||
"asset2":
|
||||
{{
|
||||
"amm": {{
|
||||
"asset2": {{
|
||||
"currency": "XRP"
|
||||
}},
|
||||
"asset":
|
||||
{{
|
||||
"asset": {{
|
||||
"issuer": "{}"
|
||||
}}
|
||||
}}
|
||||
@@ -1145,16 +1118,13 @@ generateTestValuesForParametersTest()
|
||||
.testName = "BridgeMissingBridgeAccount",
|
||||
.testJson = fmt::format(
|
||||
R"JSON({{
|
||||
"bridge":
|
||||
{{
|
||||
"bridge": {{
|
||||
"LockingChainDoor": "{}",
|
||||
"IssuingChainDoor": "{}",
|
||||
"LockingChainIssue":
|
||||
{{
|
||||
"LockingChainIssue": {{
|
||||
"currency": "XRP"
|
||||
}},
|
||||
"IssuingChainIssue":
|
||||
{{
|
||||
"IssuingChainIssue": {{
|
||||
"currency": "{}",
|
||||
"issuer": "{}"
|
||||
}}
|
||||
@@ -1173,16 +1143,13 @@ generateTestValuesForParametersTest()
|
||||
.testJson = fmt::format(
|
||||
R"JSON({{
|
||||
"bridge_account": "{}",
|
||||
"bridge":
|
||||
{{
|
||||
"bridge": {{
|
||||
"LockingChainDoor": "{}",
|
||||
"IssuingChainDoor": "{}",
|
||||
"LockingChainIssue":
|
||||
{{
|
||||
"LockingChainIssue": {{
|
||||
"currency": "XRP"
|
||||
}},
|
||||
"IssuingChainIssue":
|
||||
{{
|
||||
"IssuingChainIssue": {{
|
||||
"currency": {},
|
||||
"issuer": "{}"
|
||||
}}
|
||||
@@ -1202,16 +1169,13 @@ generateTestValuesForParametersTest()
|
||||
.testJson = fmt::format(
|
||||
R"JSON({{
|
||||
"bridge_account": "{}",
|
||||
"bridge":
|
||||
{{
|
||||
"bridge": {{
|
||||
"LockingChainDoor": "{}",
|
||||
"IssuingChainDoor": "{}",
|
||||
"LockingChainIssue":
|
||||
{{
|
||||
"LockingChainIssue": {{
|
||||
"currency": "XRP"
|
||||
}},
|
||||
"IssuingChainIssue":
|
||||
{{
|
||||
"IssuingChainIssue": {{
|
||||
"currency": "{}",
|
||||
"issuer": {}
|
||||
}}
|
||||
@@ -1231,12 +1195,10 @@ generateTestValuesForParametersTest()
|
||||
.testJson = fmt::format(
|
||||
R"JSON({{
|
||||
"bridge_account": "{}",
|
||||
"bridge":
|
||||
{{
|
||||
"bridge": {{
|
||||
"LockingChainDoor": "{}",
|
||||
"IssuingChainDoor": "{}",
|
||||
"LockingChainIssue":
|
||||
{{
|
||||
"LockingChainIssue": {{
|
||||
"currency": "XRP"
|
||||
}},
|
||||
"IssuingChainIssue": 1
|
||||
@@ -1254,16 +1216,13 @@ generateTestValuesForParametersTest()
|
||||
.testJson = fmt::format(
|
||||
R"JSON({{
|
||||
"bridge_account": "abcd",
|
||||
"bridge":
|
||||
{{
|
||||
"bridge": {{
|
||||
"LockingChainDoor": "{}",
|
||||
"IssuingChainDoor": "{}",
|
||||
"LockingChainIssue":
|
||||
{{
|
||||
"LockingChainIssue": {{
|
||||
"currency": "XRP"
|
||||
}},
|
||||
"IssuingChainIssue":
|
||||
{{
|
||||
"IssuingChainIssue": {{
|
||||
"currency": "{}",
|
||||
"issuer": "{}"
|
||||
}}
|
||||
@@ -1282,16 +1241,13 @@ generateTestValuesForParametersTest()
|
||||
.testJson = fmt::format(
|
||||
R"JSON({{
|
||||
"bridge_account": "{}",
|
||||
"bridge":
|
||||
{{
|
||||
"bridge": {{
|
||||
"LockingChainDoor": "{}",
|
||||
"IssuingChainDoor": "abcd",
|
||||
"LockingChainIssue":
|
||||
{{
|
||||
"LockingChainIssue": {{
|
||||
"currency": "XRP"
|
||||
}},
|
||||
"IssuingChainIssue":
|
||||
{{
|
||||
"IssuingChainIssue": {{
|
||||
"currency": "{}",
|
||||
"issuer": "{}"
|
||||
}}
|
||||
@@ -1310,16 +1266,13 @@ generateTestValuesForParametersTest()
|
||||
.testJson = fmt::format(
|
||||
R"JSON({{
|
||||
"bridge_account": "{}",
|
||||
"bridge":
|
||||
{{
|
||||
"bridge": {{
|
||||
"LockingChainDoor": "{}",
|
||||
"IssuingChainDoor": "{}",
|
||||
"LockingChainIssue":
|
||||
{{
|
||||
"LockingChainIssue": {{
|
||||
"currency": "XRP"
|
||||
}},
|
||||
"IssuingChainIssue":
|
||||
{{
|
||||
"IssuingChainIssue": {{
|
||||
"currency": "{}",
|
||||
"issuer": "invalid"
|
||||
}}
|
||||
@@ -1338,16 +1291,13 @@ generateTestValuesForParametersTest()
|
||||
.testJson = fmt::format(
|
||||
R"JSON({{
|
||||
"bridge_account": "{}",
|
||||
"bridge":
|
||||
{{
|
||||
"bridge": {{
|
||||
"LockingChainDoor": "{}",
|
||||
"IssuingChainDoor": "{}",
|
||||
"LockingChainIssue":
|
||||
{{
|
||||
"LockingChainIssue": {{
|
||||
"currency": "XRP"
|
||||
}},
|
||||
"IssuingChainIssue":
|
||||
{{
|
||||
"IssuingChainIssue": {{
|
||||
"currency": "JPJPJP",
|
||||
"issuer": "{}"
|
||||
}}
|
||||
@@ -1366,17 +1316,14 @@ generateTestValuesForParametersTest()
|
||||
.testJson = fmt::format(
|
||||
R"JSON({{
|
||||
"bridge_account": "{}",
|
||||
"bridge":
|
||||
{{
|
||||
"bridge": {{
|
||||
"LockingChainDoor": "{}",
|
||||
"IssuingChainDoor": "{}",
|
||||
"LockingChainIssue":
|
||||
{{
|
||||
"LockingChainIssue": {{
|
||||
"currency": "XRP",
|
||||
"issuer": "{}"
|
||||
}},
|
||||
"IssuingChainIssue":
|
||||
{{
|
||||
"IssuingChainIssue": {{
|
||||
"currency": "JPY",
|
||||
"issuer": "{}"
|
||||
}}
|
||||
@@ -1396,16 +1343,13 @@ generateTestValuesForParametersTest()
|
||||
.testJson = fmt::format(
|
||||
R"JSON({{
|
||||
"bridge_account": "{}",
|
||||
"bridge":
|
||||
{{
|
||||
"bridge": {{
|
||||
"LockingChainDoor": "{}",
|
||||
"IssuingChainDoor": "{}",
|
||||
"LockingChainIssue":
|
||||
{{
|
||||
"LockingChainIssue": {{
|
||||
"currency": "XRP"
|
||||
}},
|
||||
"IssuingChainIssue":
|
||||
{{
|
||||
"IssuingChainIssue": {{
|
||||
"currency": "JPY"
|
||||
}}
|
||||
}}
|
||||
@@ -1422,16 +1366,13 @@ generateTestValuesForParametersTest()
|
||||
.testJson = fmt::format(
|
||||
R"JSON({{
|
||||
"bridge_account": "{}",
|
||||
"bridge":
|
||||
{{
|
||||
"bridge": {{
|
||||
"IssuingChainDoor": "{}",
|
||||
"LockingChainIssue":
|
||||
{{
|
||||
"LockingChainIssue": {{
|
||||
"currency": "XRP",
|
||||
"issuer": "{}"
|
||||
}},
|
||||
"IssuingChainIssue":
|
||||
{{
|
||||
"IssuingChainIssue": {{
|
||||
"currency": "JPY",
|
||||
"issuer": "{}"
|
||||
}}
|
||||
@@ -1450,15 +1391,12 @@ generateTestValuesForParametersTest()
|
||||
.testJson = fmt::format(
|
||||
R"JSON({{
|
||||
"bridge_account": "{}",
|
||||
"bridge":
|
||||
{{
|
||||
"bridge": {{
|
||||
"LockingChainDoor": "{}",
|
||||
"LockingChainIssue":
|
||||
{{
|
||||
"LockingChainIssue": {{
|
||||
"currency": "XRP"
|
||||
}},
|
||||
"IssuingChainIssue":
|
||||
{{
|
||||
"IssuingChainIssue": {{
|
||||
"currency": "JPY",
|
||||
"issuer": "{}"
|
||||
}}
|
||||
@@ -1476,12 +1414,10 @@ generateTestValuesForParametersTest()
|
||||
.testJson = fmt::format(
|
||||
R"JSON({{
|
||||
"bridge_account": "{}",
|
||||
"bridge":
|
||||
{{
|
||||
"bridge": {{
|
||||
"IssuingChainDoor": "{}",
|
||||
"LockingChainDoor": "{}",
|
||||
"IssuingChainIssue":
|
||||
{{
|
||||
"IssuingChainIssue": {{
|
||||
"currency": "JPY",
|
||||
"issuer": "{}"
|
||||
}}
|
||||
@@ -1500,12 +1436,10 @@ generateTestValuesForParametersTest()
|
||||
.testJson = fmt::format(
|
||||
R"JSON({{
|
||||
"bridge_account": "{}",
|
||||
"bridge":
|
||||
{{
|
||||
"bridge": {{
|
||||
"IssuingChainDoor": "{}",
|
||||
"LockingChainDoor": "{}",
|
||||
"LockingChainIssue":
|
||||
{{
|
||||
"LockingChainIssue": {{
|
||||
"currency": "JPY",
|
||||
"issuer": "{}"
|
||||
}}
|
||||
@@ -1543,16 +1477,13 @@ generateTestValuesForParametersTest()
|
||||
.testName = "OwnedClaimIdJsonMissingClaimId",
|
||||
.testJson = fmt::format(
|
||||
R"JSON({{
|
||||
"xchain_owned_claim_id":
|
||||
{{
|
||||
"xchain_owned_claim_id": {{
|
||||
"LockingChainDoor": "{}",
|
||||
"IssuingChainDoor": "{}",
|
||||
"LockingChainIssue":
|
||||
{{
|
||||
"LockingChainIssue": {{
|
||||
"currency": "XRP"
|
||||
}},
|
||||
"IssuingChainIssue":
|
||||
{{
|
||||
"IssuingChainIssue": {{
|
||||
"currency": "{}",
|
||||
"issuer": "{}"
|
||||
}}
|
||||
@@ -1570,16 +1501,13 @@ generateTestValuesForParametersTest()
|
||||
.testName = "OwnedClaimIdJsonMissingDoor",
|
||||
.testJson = fmt::format(
|
||||
R"JSON({{
|
||||
"xchain_owned_claim_id":
|
||||
{{
|
||||
"xchain_owned_claim_id": {{
|
||||
"xchain_owned_claim_id": 10,
|
||||
"LockingChainDoor": "{}",
|
||||
"LockingChainIssue":
|
||||
{{
|
||||
"LockingChainIssue": {{
|
||||
"currency": "XRP"
|
||||
}},
|
||||
"IssuingChainIssue":
|
||||
{{
|
||||
"IssuingChainIssue": {{
|
||||
"currency": "{}",
|
||||
"issuer": "{}"
|
||||
}}
|
||||
@@ -1596,13 +1524,11 @@ generateTestValuesForParametersTest()
|
||||
.testName = "OwnedClaimIdJsonMissingIssue",
|
||||
.testJson = fmt::format(
|
||||
R"JSON({{
|
||||
"xchain_owned_claim_id":
|
||||
{{
|
||||
"xchain_owned_claim_id": {{
|
||||
"xchain_owned_claim_id": 10,
|
||||
"LockingChainDoor": "{}",
|
||||
"IssuingChainDoor": "{}",
|
||||
"LockingChainIssue":
|
||||
{{
|
||||
"LockingChainIssue": {{
|
||||
"currency": "XRP"
|
||||
}}
|
||||
}}
|
||||
@@ -1618,17 +1544,14 @@ generateTestValuesForParametersTest()
|
||||
.testName = "OwnedClaimIdJsonInvalidDoor",
|
||||
.testJson = fmt::format(
|
||||
R"JSON({{
|
||||
"xchain_owned_claim_id":
|
||||
{{
|
||||
"xchain_owned_claim_id": {{
|
||||
"xchain_owned_claim_id": 10,
|
||||
"LockingChainDoor": "abcd",
|
||||
"IssuingChainDoor": "{}",
|
||||
"LockingChainIssue":
|
||||
{{
|
||||
"LockingChainIssue": {{
|
||||
"currency": "XRP"
|
||||
}},
|
||||
"IssuingChainIssue":
|
||||
{{
|
||||
"IssuingChainIssue": {{
|
||||
"currency": "{}",
|
||||
"issuer": "{}"
|
||||
}}
|
||||
@@ -1645,17 +1568,14 @@ generateTestValuesForParametersTest()
|
||||
.testName = "OwnedClaimIdJsonInvalidIssue",
|
||||
.testJson = fmt::format(
|
||||
R"JSON({{
|
||||
"xchain_owned_claim_id":
|
||||
{{
|
||||
"xchain_owned_claim_id": {{
|
||||
"xchain_owned_claim_id": 10,
|
||||
"LockingChainDoor": "{}",
|
||||
"IssuingChainDoor": "{}",
|
||||
"LockingChainIssue":
|
||||
{{
|
||||
"LockingChainIssue": {{
|
||||
"currency": "XRP"
|
||||
}},
|
||||
"IssuingChainIssue":
|
||||
{{
|
||||
"IssuingChainIssue": {{
|
||||
"currency": "{}"
|
||||
}}
|
||||
}}
|
||||
@@ -1679,16 +1599,13 @@ generateTestValuesForParametersTest()
|
||||
.testName = "OwnedCreateAccountClaimIdJsonMissingClaimId",
|
||||
.testJson = fmt::format(
|
||||
R"JSON({{
|
||||
"xchain_owned_create_account_claim_id":
|
||||
{{
|
||||
"xchain_owned_create_account_claim_id": {{
|
||||
"LockingChainDoor": "{}",
|
||||
"IssuingChainDoor": "{}",
|
||||
"LockingChainIssue":
|
||||
{{
|
||||
"LockingChainIssue": {{
|
||||
"currency": "XRP"
|
||||
}},
|
||||
"IssuingChainIssue":
|
||||
{{
|
||||
"IssuingChainIssue": {{
|
||||
"currency": "{}",
|
||||
"issuer": "{}"
|
||||
}}
|
||||
@@ -1706,16 +1623,13 @@ generateTestValuesForParametersTest()
|
||||
.testName = "OwnedCreateAccountClaimIdJsonMissingDoor",
|
||||
.testJson = fmt::format(
|
||||
R"JSON({{
|
||||
"xchain_owned_create_account_claim_id":
|
||||
{{
|
||||
"xchain_owned_create_account_claim_id": {{
|
||||
"xchain_owned_create_account_claim_id": 10,
|
||||
"LockingChainDoor": "{}",
|
||||
"LockingChainIssue":
|
||||
{{
|
||||
"LockingChainIssue": {{
|
||||
"currency": "XRP"
|
||||
}},
|
||||
"IssuingChainIssue":
|
||||
{{
|
||||
"IssuingChainIssue": {{
|
||||
"currency": "{}",
|
||||
"issuer": "{}"
|
||||
}}
|
||||
@@ -1732,13 +1646,11 @@ generateTestValuesForParametersTest()
|
||||
.testName = "OwnedCreateAccountClaimIdJsonMissingIssue",
|
||||
.testJson = fmt::format(
|
||||
R"JSON({{
|
||||
"xchain_owned_create_account_claim_id":
|
||||
{{
|
||||
"xchain_owned_create_account_claim_id": {{
|
||||
"xchain_owned_create_account_claim_id": 10,
|
||||
"LockingChainDoor": "{}",
|
||||
"IssuingChainDoor": "{}",
|
||||
"LockingChainIssue":
|
||||
{{
|
||||
"LockingChainIssue": {{
|
||||
"currency": "XRP"
|
||||
}}
|
||||
}}
|
||||
@@ -1754,17 +1666,14 @@ generateTestValuesForParametersTest()
|
||||
.testName = "OwnedCreateAccountClaimIdJsonInvalidDoor",
|
||||
.testJson = fmt::format(
|
||||
R"JSON({{
|
||||
"xchain_owned_create_account_claim_id":
|
||||
{{
|
||||
"xchain_owned_create_account_claim_id": {{
|
||||
"xchain_owned_create_account_claim_id": 10,
|
||||
"LockingChainDoor": "abcd",
|
||||
"IssuingChainDoor": "{}",
|
||||
"LockingChainIssue":
|
||||
{{
|
||||
"LockingChainIssue": {{
|
||||
"currency": "XRP"
|
||||
}},
|
||||
"IssuingChainIssue":
|
||||
{{
|
||||
"IssuingChainIssue": {{
|
||||
"currency": "{}",
|
||||
"issuer": "{}"
|
||||
}}
|
||||
@@ -1781,17 +1690,14 @@ generateTestValuesForParametersTest()
|
||||
.testName = "OwnedCreateAccountClaimIdJsonInvalidIssue",
|
||||
.testJson = fmt::format(
|
||||
R"JSON({{
|
||||
"xchain_owned_create_account_claim_id":
|
||||
{{
|
||||
"xchain_owned_create_account_claim_id": {{
|
||||
"xchain_owned_create_account_claim_id": 10,
|
||||
"LockingChainDoor": "{}",
|
||||
"IssuingChainDoor": "{}",
|
||||
"LockingChainIssue":
|
||||
{{
|
||||
"LockingChainIssue": {{
|
||||
"currency": "XRP"
|
||||
}},
|
||||
"IssuingChainIssue":
|
||||
{{
|
||||
"IssuingChainIssue": {{
|
||||
"currency": "{}"
|
||||
}}
|
||||
}}
|
||||
|
||||
@@ -601,8 +601,7 @@ TEST_F(RPCLedgerHandlerTest, TransactionsExpandNotBinaryV2)
|
||||
"hash": "70436A9332F7CD928FAEC1A41269A677739D8B11F108CE23AE23CBF0C9113F8C",
|
||||
"ledger_hash": "4BC50C9B0D8515D3EAAE1E74B29A95804346C491EE1A95BF25E4AAB854A6A652",
|
||||
"ledger_index": 30,
|
||||
"tx_json":
|
||||
{
|
||||
"tx_json": {
|
||||
"Account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
|
||||
"DeliverMax": "100",
|
||||
"Destination": "rLEsXccBGNR3UPuPu2hUXPjziKC3qKSBun",
|
||||
@@ -614,10 +613,8 @@ TEST_F(RPCLedgerHandlerTest, TransactionsExpandNotBinaryV2)
|
||||
"meta": {
|
||||
"AffectedNodes": [
|
||||
{
|
||||
"ModifiedNode":
|
||||
{
|
||||
"FinalFields":
|
||||
{
|
||||
"ModifiedNode": {
|
||||
"FinalFields": {
|
||||
"Account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
|
||||
"Balance": "110"
|
||||
},
|
||||
@@ -625,10 +622,8 @@ TEST_F(RPCLedgerHandlerTest, TransactionsExpandNotBinaryV2)
|
||||
}
|
||||
},
|
||||
{
|
||||
"ModifiedNode":
|
||||
{
|
||||
"FinalFields":
|
||||
{
|
||||
"ModifiedNode": {
|
||||
"FinalFields": {
|
||||
"Account": "rLEsXccBGNR3UPuPu2hUXPjziKC3qKSBun",
|
||||
"Balance": "30"
|
||||
},
|
||||
|
||||
@@ -181,8 +181,7 @@ generateTestValuesForParametersTest()
|
||||
.testName = "MarkerLedgerNotInt",
|
||||
.testJson = R"JSON({
|
||||
"nft_id": "00010000A7CAD27B688D14BA1A9FA5366554D6ADCF9CE0875B974D9F00000004",
|
||||
"marker":
|
||||
{
|
||||
"marker": {
|
||||
"seq": "string",
|
||||
"ledger": 1
|
||||
}
|
||||
@@ -194,8 +193,7 @@ generateTestValuesForParametersTest()
|
||||
.testName = "MarkerSeqNotInt",
|
||||
.testJson = R"JSON({
|
||||
"nft_id": "00010000A7CAD27B688D14BA1A9FA5366554D6ADCF9CE0875B974D9F00000004",
|
||||
"marker":
|
||||
{
|
||||
"marker": {
|
||||
"ledger": "string",
|
||||
"seq": 1
|
||||
}
|
||||
@@ -340,13 +338,10 @@ TEST_F(RPCNFTHistoryHandlerTest, IndexSpecificForwardFalseV1)
|
||||
"nft_id": "00010000A7CAD27B688D14BA1A9FA5366554D6ADCF9CE0875B974D9F00000004",
|
||||
"ledger_index_min": 11,
|
||||
"ledger_index_max": 29,
|
||||
"transactions":
|
||||
[
|
||||
"transactions": [
|
||||
{
|
||||
"meta":
|
||||
{
|
||||
"AffectedNodes":
|
||||
[
|
||||
"meta": {
|
||||
"AffectedNodes": [
|
||||
{
|
||||
"ModifiedNode": {
|
||||
"FinalFields": {
|
||||
@@ -370,8 +365,7 @@ TEST_F(RPCNFTHistoryHandlerTest, IndexSpecificForwardFalseV1)
|
||||
"TransactionResult": "tesSUCCESS",
|
||||
"delivered_amount": "unavailable"
|
||||
},
|
||||
"tx":
|
||||
{
|
||||
"tx": {
|
||||
"Account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
|
||||
"Amount": "1",
|
||||
"Destination": "rLEsXccBGNR3UPuPu2hUXPjziKC3qKSBun",
|
||||
@@ -387,10 +381,8 @@ TEST_F(RPCNFTHistoryHandlerTest, IndexSpecificForwardFalseV1)
|
||||
"validated": true
|
||||
},
|
||||
{
|
||||
"meta":
|
||||
{
|
||||
"AffectedNodes":
|
||||
[
|
||||
"meta": {
|
||||
"AffectedNodes": [
|
||||
{
|
||||
"ModifiedNode": {
|
||||
"FinalFields": {
|
||||
@@ -414,8 +406,7 @@ TEST_F(RPCNFTHistoryHandlerTest, IndexSpecificForwardFalseV1)
|
||||
"TransactionResult": "tesSUCCESS",
|
||||
"delivered_amount": "unavailable"
|
||||
},
|
||||
"tx":
|
||||
{
|
||||
"tx": {
|
||||
"Account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
|
||||
"Amount": "1",
|
||||
"Destination": "rLEsXccBGNR3UPuPu2hUXPjziKC3qKSBun",
|
||||
@@ -432,8 +423,7 @@ TEST_F(RPCNFTHistoryHandlerTest, IndexSpecificForwardFalseV1)
|
||||
}
|
||||
],
|
||||
"validated": true,
|
||||
"marker":
|
||||
{
|
||||
"marker": {
|
||||
"ledger": 12,
|
||||
"seq": 34
|
||||
}
|
||||
@@ -481,18 +471,13 @@ TEST_F(RPCNFTHistoryHandlerTest, IndexSpecificForwardFalseV2)
|
||||
"nft_id": "00010000A7CAD27B688D14BA1A9FA5366554D6ADCF9CE0875B974D9F00000004",
|
||||
"ledger_index_min": 11,
|
||||
"ledger_index_max": 29,
|
||||
"transactions":
|
||||
[
|
||||
"transactions": [
|
||||
{
|
||||
"meta":
|
||||
{
|
||||
"AffectedNodes":
|
||||
[
|
||||
"meta": {
|
||||
"AffectedNodes": [
|
||||
{
|
||||
"ModifiedNode":
|
||||
{
|
||||
"FinalFields":
|
||||
{
|
||||
"ModifiedNode": {
|
||||
"FinalFields": {
|
||||
"Account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
|
||||
"Balance": "22"
|
||||
},
|
||||
@@ -500,10 +485,8 @@ TEST_F(RPCNFTHistoryHandlerTest, IndexSpecificForwardFalseV2)
|
||||
}
|
||||
},
|
||||
{
|
||||
"ModifiedNode":
|
||||
{
|
||||
"FinalFields":
|
||||
{
|
||||
"ModifiedNode": {
|
||||
"FinalFields": {
|
||||
"Account": "rLEsXccBGNR3UPuPu2hUXPjziKC3qKSBun",
|
||||
"Balance": "23"
|
||||
},
|
||||
@@ -515,8 +498,7 @@ TEST_F(RPCNFTHistoryHandlerTest, IndexSpecificForwardFalseV2)
|
||||
"TransactionResult": "tesSUCCESS",
|
||||
"delivered_amount": "unavailable"
|
||||
},
|
||||
"tx_json":
|
||||
{
|
||||
"tx_json": {
|
||||
"Account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
|
||||
"Destination": "rLEsXccBGNR3UPuPu2hUXPjziKC3qKSBun",
|
||||
"Fee": "1",
|
||||
@@ -534,15 +516,11 @@ TEST_F(RPCNFTHistoryHandlerTest, IndexSpecificForwardFalseV2)
|
||||
"validated": true
|
||||
},
|
||||
{
|
||||
"meta":
|
||||
{
|
||||
"AffectedNodes":
|
||||
[
|
||||
"meta": {
|
||||
"AffectedNodes": [
|
||||
{
|
||||
"ModifiedNode":
|
||||
{
|
||||
"FinalFields":
|
||||
{
|
||||
"ModifiedNode": {
|
||||
"FinalFields": {
|
||||
"Account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
|
||||
"Balance": "22"
|
||||
},
|
||||
@@ -550,10 +528,8 @@ TEST_F(RPCNFTHistoryHandlerTest, IndexSpecificForwardFalseV2)
|
||||
}
|
||||
},
|
||||
{
|
||||
"ModifiedNode":
|
||||
{
|
||||
"FinalFields":
|
||||
{
|
||||
"ModifiedNode": {
|
||||
"FinalFields": {
|
||||
"Account": "rLEsXccBGNR3UPuPu2hUXPjziKC3qKSBun",
|
||||
"Balance": "23"
|
||||
},
|
||||
@@ -565,8 +541,7 @@ TEST_F(RPCNFTHistoryHandlerTest, IndexSpecificForwardFalseV2)
|
||||
"TransactionResult": "tesSUCCESS",
|
||||
"delivered_amount": "unavailable"
|
||||
},
|
||||
"tx_json":
|
||||
{
|
||||
"tx_json": {
|
||||
"Account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
|
||||
"Destination": "rLEsXccBGNR3UPuPu2hUXPjziKC3qKSBun",
|
||||
"Fee": "1",
|
||||
@@ -585,8 +560,7 @@ TEST_F(RPCNFTHistoryHandlerTest, IndexSpecificForwardFalseV2)
|
||||
}
|
||||
],
|
||||
"validated": true,
|
||||
"marker":
|
||||
{
|
||||
"marker": {
|
||||
"ledger": 12,
|
||||
"seq": 34
|
||||
}
|
||||
|
||||
@@ -328,8 +328,7 @@ TEST_F(RPCNoRippleCheckTest, NormalPathRoleUserDefaultRippleSetTrustLineNoRipple
|
||||
R"JSON({
|
||||
"ledger_hash": "4BC50C9B0D8515D3EAAE1E74B29A95804346C491EE1A95BF25E4AAB854A6A652",
|
||||
"ledger_index": 30,
|
||||
"problems":
|
||||
[
|
||||
"problems": [
|
||||
"You appear to have set your default ripple flag even though you are not a gateway. This is not recommended unless you are experimenting"
|
||||
],
|
||||
"validated": true
|
||||
@@ -448,8 +447,7 @@ TEST_F(RPCNoRippleCheckTest, NormalPathRoleGatewayDefaultRippleSetTrustLineNoRip
|
||||
R"JSON({
|
||||
"ledger_hash": "4BC50C9B0D8515D3EAAE1E74B29A95804346C491EE1A95BF25E4AAB854A6A652",
|
||||
"ledger_index": 30,
|
||||
"problems":
|
||||
[
|
||||
"problems": [
|
||||
"You should clear the no ripple flag on your USD line to rLEsXccBGNR3UPuPu2hUXPjziKC3qKSBun",
|
||||
"You should clear the no ripple flag on your USD line to rLEsXccBGNR3UPuPu2hUXPjziKC3qKSBun"
|
||||
],
|
||||
@@ -512,8 +510,7 @@ TEST_F(RPCNoRippleCheckTest, NormalPathRoleGatewayDefaultRippleUnsetTrustLineNoR
|
||||
R"JSON({
|
||||
"ledger_hash": "4BC50C9B0D8515D3EAAE1E74B29A95804346C491EE1A95BF25E4AAB854A6A652",
|
||||
"ledger_index": 30,
|
||||
"problems":
|
||||
[
|
||||
"problems": [
|
||||
"You should immediately set your default ripple flag"
|
||||
],
|
||||
"validated": true
|
||||
|
||||
@@ -204,8 +204,7 @@ generateTestValuesForParametersTest()
|
||||
.testJson = R"JSON({
|
||||
"books": [
|
||||
{
|
||||
"taker_pays":
|
||||
{
|
||||
"taker_pays": {
|
||||
"currency": "XRP"
|
||||
},
|
||||
"taker_gets": "USD"
|
||||
@@ -220,8 +219,7 @@ generateTestValuesForParametersTest()
|
||||
.testJson = R"JSON({
|
||||
"books": [
|
||||
{
|
||||
"taker_gets":
|
||||
{
|
||||
"taker_gets": {
|
||||
"currency": "XRP"
|
||||
},
|
||||
"taker_pays": "USD"
|
||||
@@ -236,8 +234,7 @@ generateTestValuesForParametersTest()
|
||||
.testJson = R"JSON({
|
||||
"books": [
|
||||
{
|
||||
"taker_gets":
|
||||
{
|
||||
"taker_gets": {
|
||||
"currency": "XRP"
|
||||
},
|
||||
"taker_pays": {}
|
||||
@@ -252,8 +249,7 @@ generateTestValuesForParametersTest()
|
||||
.testJson = R"JSON({
|
||||
"books": [
|
||||
{
|
||||
"taker_pays":
|
||||
{
|
||||
"taker_pays": {
|
||||
"currency": "XRP"
|
||||
},
|
||||
"taker_gets": {}
|
||||
@@ -268,8 +264,7 @@ generateTestValuesForParametersTest()
|
||||
.testJson = R"JSON({
|
||||
"books": [
|
||||
{
|
||||
"taker_gets":
|
||||
{
|
||||
"taker_gets": {
|
||||
"currency": "XRP"
|
||||
},
|
||||
"taker_pays": {
|
||||
@@ -287,8 +282,7 @@ generateTestValuesForParametersTest()
|
||||
.testJson = R"JSON({
|
||||
"books": [
|
||||
{
|
||||
"taker_pays":
|
||||
{
|
||||
"taker_pays": {
|
||||
"currency": "XRP"
|
||||
},
|
||||
"taker_gets": {
|
||||
@@ -306,8 +300,7 @@ generateTestValuesForParametersTest()
|
||||
.testJson = R"JSON({
|
||||
"books": [
|
||||
{
|
||||
"taker_gets":
|
||||
{
|
||||
"taker_gets": {
|
||||
"currency": "XRP"
|
||||
},
|
||||
"taker_pays": {
|
||||
@@ -325,8 +318,7 @@ generateTestValuesForParametersTest()
|
||||
.testJson = R"JSON({
|
||||
"books": [
|
||||
{
|
||||
"taker_pays":
|
||||
{
|
||||
"taker_pays": {
|
||||
"currency": "XRP"
|
||||
},
|
||||
"taker_gets": {
|
||||
@@ -344,8 +336,7 @@ generateTestValuesForParametersTest()
|
||||
.testJson = R"JSON({
|
||||
"books": [
|
||||
{
|
||||
"taker_gets":
|
||||
{
|
||||
"taker_gets": {
|
||||
"currency": "XRP"
|
||||
},
|
||||
"taker_pays": {
|
||||
@@ -362,8 +353,7 @@ generateTestValuesForParametersTest()
|
||||
.testJson = R"JSON({
|
||||
"books": [
|
||||
{
|
||||
"taker_pays":
|
||||
{
|
||||
"taker_pays": {
|
||||
"currency": "XRP"
|
||||
},
|
||||
"taker_gets": {
|
||||
@@ -380,8 +370,7 @@ generateTestValuesForParametersTest()
|
||||
.testJson = R"JSON({
|
||||
"books": [
|
||||
{
|
||||
"taker_gets":
|
||||
{
|
||||
"taker_gets": {
|
||||
"currency": "XRP"
|
||||
},
|
||||
"taker_pays": {
|
||||
@@ -399,8 +388,7 @@ generateTestValuesForParametersTest()
|
||||
.testJson = R"JSON({
|
||||
"books": [
|
||||
{
|
||||
"taker_pays":
|
||||
{
|
||||
"taker_pays": {
|
||||
"currency": "XRP"
|
||||
},
|
||||
"taker_gets": {
|
||||
@@ -418,8 +406,7 @@ generateTestValuesForParametersTest()
|
||||
.testJson = R"JSON({
|
||||
"books": [
|
||||
{
|
||||
"taker_gets":
|
||||
{
|
||||
"taker_gets": {
|
||||
"currency": "XRP"
|
||||
},
|
||||
"taker_pays": {
|
||||
@@ -437,8 +424,7 @@ generateTestValuesForParametersTest()
|
||||
.testJson = R"JSON({
|
||||
"books": [
|
||||
{
|
||||
"taker_pays":
|
||||
{
|
||||
"taker_pays": {
|
||||
"currency": "XRP"
|
||||
},
|
||||
"taker_gets": {
|
||||
@@ -456,8 +442,7 @@ generateTestValuesForParametersTest()
|
||||
.testJson = R"JSON({
|
||||
"books": [
|
||||
{
|
||||
"taker_pays":
|
||||
{
|
||||
"taker_pays": {
|
||||
"currency": "USD",
|
||||
"issuer": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn"
|
||||
},
|
||||
@@ -476,8 +461,7 @@ generateTestValuesForParametersTest()
|
||||
.testJson = R"JSON({
|
||||
"books": [
|
||||
{
|
||||
"taker_pays":
|
||||
{
|
||||
"taker_pays": {
|
||||
"currency": "XRP",
|
||||
"issuer": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn"
|
||||
},
|
||||
@@ -496,8 +480,7 @@ generateTestValuesForParametersTest()
|
||||
.testJson = R"JSON({
|
||||
"books": [
|
||||
{
|
||||
"taker_pays":
|
||||
{
|
||||
"taker_pays": {
|
||||
"currency": "XRP"
|
||||
},
|
||||
"taker_gets": {
|
||||
@@ -514,8 +497,7 @@ generateTestValuesForParametersTest()
|
||||
.testJson = R"JSON({
|
||||
"books": [
|
||||
{
|
||||
"taker_pays":
|
||||
{
|
||||
"taker_pays": {
|
||||
"currency": "XRP"
|
||||
},
|
||||
"taker_gets": {
|
||||
@@ -534,8 +516,7 @@ generateTestValuesForParametersTest()
|
||||
.testJson = R"JSON({
|
||||
"books": [
|
||||
{
|
||||
"taker_pays":
|
||||
{
|
||||
"taker_pays": {
|
||||
"currency": "XRP"
|
||||
},
|
||||
"taker_gets": {
|
||||
@@ -554,8 +535,7 @@ generateTestValuesForParametersTest()
|
||||
.testJson = R"JSON({
|
||||
"books": [
|
||||
{
|
||||
"taker_pays":
|
||||
{
|
||||
"taker_pays": {
|
||||
"currency": "XRP"
|
||||
},
|
||||
"taker_gets": {
|
||||
@@ -574,8 +554,7 @@ generateTestValuesForParametersTest()
|
||||
.testJson = R"JSON({
|
||||
"books": [
|
||||
{
|
||||
"taker_pays":
|
||||
{
|
||||
"taker_pays": {
|
||||
"currency": "XRP"
|
||||
},
|
||||
"taker_gets": {
|
||||
@@ -738,15 +717,12 @@ TEST_F(RPCSubscribeHandlerTest, JustBooks)
|
||||
auto const input = json::parse(
|
||||
fmt::format(
|
||||
R"JSON({{
|
||||
"books":
|
||||
[
|
||||
"books": [
|
||||
{{
|
||||
"taker_pays":
|
||||
{{
|
||||
"taker_pays": {{
|
||||
"currency": "XRP"
|
||||
}},
|
||||
"taker_gets":
|
||||
{{
|
||||
"taker_gets": {{
|
||||
"currency": "USD",
|
||||
"issuer": "{}"
|
||||
}}
|
||||
@@ -772,15 +748,12 @@ TEST_F(RPCSubscribeHandlerTest, BooksBothSet)
|
||||
auto const input = json::parse(
|
||||
fmt::format(
|
||||
R"JSON({{
|
||||
"books":
|
||||
[
|
||||
"books": [
|
||||
{{
|
||||
"taker_pays":
|
||||
{{
|
||||
"taker_pays": {{
|
||||
"currency": "XRP"
|
||||
}},
|
||||
"taker_gets":
|
||||
{{
|
||||
"taker_gets": {{
|
||||
"currency": "USD",
|
||||
"issuer": "{}"
|
||||
}},
|
||||
@@ -807,15 +780,12 @@ TEST_F(RPCSubscribeHandlerTest, BooksBothSnapshotSet)
|
||||
auto const input = json::parse(
|
||||
fmt::format(
|
||||
R"JSON({{
|
||||
"books":
|
||||
[
|
||||
"books": [
|
||||
{{
|
||||
"taker_gets":
|
||||
{{
|
||||
"taker_gets": {{
|
||||
"currency": "XRP"
|
||||
}},
|
||||
"taker_pays":
|
||||
{{
|
||||
"taker_pays": {{
|
||||
"currency": "USD",
|
||||
"issuer": "{}"
|
||||
}},
|
||||
@@ -921,8 +891,7 @@ TEST_F(RPCSubscribeHandlerTest, BooksBothSnapshotSet)
|
||||
"PreviousTxnLgrSeq": 0,
|
||||
"Sequence": 0,
|
||||
"TakerGets": "10",
|
||||
"TakerPays":
|
||||
{{
|
||||
"TakerPays": {{
|
||||
"currency": "USD",
|
||||
"issuer": "{}",
|
||||
"value": "20"
|
||||
@@ -946,8 +915,7 @@ TEST_F(RPCSubscribeHandlerTest, BooksBothSnapshotSet)
|
||||
"PreviousTxnID": "0000000000000000000000000000000000000000000000000000000000000000",
|
||||
"PreviousTxnLgrSeq": 0,
|
||||
"Sequence": 0,
|
||||
"TakerGets":
|
||||
{{
|
||||
"TakerGets": {{
|
||||
"currency": "USD",
|
||||
"issuer": "{}",
|
||||
"value": "10"
|
||||
@@ -982,15 +950,12 @@ TEST_F(RPCSubscribeHandlerTest, BooksBothUnsetSnapshotSet)
|
||||
auto const input = json::parse(
|
||||
fmt::format(
|
||||
R"JSON({{
|
||||
"books":
|
||||
[
|
||||
"books": [
|
||||
{{
|
||||
"taker_gets":
|
||||
{{
|
||||
"taker_gets": {{
|
||||
"currency": "XRP"
|
||||
}},
|
||||
"taker_pays":
|
||||
{{
|
||||
"taker_pays": {{
|
||||
"currency": "USD",
|
||||
"issuer": "{}"
|
||||
}},
|
||||
@@ -1094,8 +1059,7 @@ TEST_F(RPCSubscribeHandlerTest, BooksBothUnsetSnapshotSet)
|
||||
"PreviousTxnLgrSeq": 0,
|
||||
"Sequence": 0,
|
||||
"TakerGets": "10",
|
||||
"TakerPays":
|
||||
{{
|
||||
"TakerPays": {{
|
||||
"currency": "USD",
|
||||
"issuer": "{}",
|
||||
"value": "20"
|
||||
|
||||
@@ -193,19 +193,14 @@ TEST_F(RPCTransactionEntryHandlerTest, LedgerSeqNotMatch)
|
||||
TEST_F(RPCTransactionEntryHandlerTest, NormalPath)
|
||||
{
|
||||
static constexpr auto kOUTPUT = R"JSON({
|
||||
"metadata":
|
||||
{
|
||||
"AffectedNodes":
|
||||
[
|
||||
"metadata": {
|
||||
"AffectedNodes": [
|
||||
{
|
||||
"CreatedNode":
|
||||
{
|
||||
"CreatedNode": {
|
||||
"LedgerEntryType": "Offer",
|
||||
"NewFields":
|
||||
{
|
||||
"NewFields": {
|
||||
"TakerGets": "200",
|
||||
"TakerPays":
|
||||
{
|
||||
"TakerPays": {
|
||||
"currency": "0158415500000000C1F76FF6ECB0BAC600000000",
|
||||
"issuer": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
|
||||
"value": "300"
|
||||
@@ -217,14 +212,12 @@ TEST_F(RPCTransactionEntryHandlerTest, NormalPath)
|
||||
"TransactionIndex": 100,
|
||||
"TransactionResult": "tesSUCCESS"
|
||||
},
|
||||
"tx_json":
|
||||
{
|
||||
"tx_json": {
|
||||
"Account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
|
||||
"Fee": "2",
|
||||
"Sequence": 100,
|
||||
"SigningPubKey": "74657374",
|
||||
"TakerGets":
|
||||
{
|
||||
"TakerGets": {
|
||||
"currency": "0158415500000000C1F76FF6ECB0BAC600000000",
|
||||
"issuer": "rLEsXccBGNR3UPuPu2hUXPjziKC3qKSBun",
|
||||
"value": "200"
|
||||
@@ -271,19 +264,14 @@ TEST_F(RPCTransactionEntryHandlerTest, NormalPath)
|
||||
TEST_F(RPCTransactionEntryHandlerTest, NormalPathV2)
|
||||
{
|
||||
static constexpr auto kOUTPUT = R"JSON({
|
||||
"meta":
|
||||
{
|
||||
"AffectedNodes":
|
||||
[
|
||||
"meta": {
|
||||
"AffectedNodes": [
|
||||
{
|
||||
"CreatedNode":
|
||||
{
|
||||
"CreatedNode": {
|
||||
"LedgerEntryType": "Offer",
|
||||
"NewFields":
|
||||
{
|
||||
"NewFields": {
|
||||
"TakerGets": "200",
|
||||
"TakerPays":
|
||||
{
|
||||
"TakerPays": {
|
||||
"currency": "0158415500000000C1F76FF6ECB0BAC600000000",
|
||||
"issuer": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
|
||||
"value": "300"
|
||||
@@ -295,14 +283,12 @@ TEST_F(RPCTransactionEntryHandlerTest, NormalPathV2)
|
||||
"TransactionIndex": 100,
|
||||
"TransactionResult": "tesSUCCESS"
|
||||
},
|
||||
"tx_json":
|
||||
{
|
||||
"tx_json": {
|
||||
"Account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
|
||||
"Fee": "2",
|
||||
"Sequence": 100,
|
||||
"SigningPubKey": "74657374",
|
||||
"TakerGets":
|
||||
{
|
||||
"TakerGets": {
|
||||
"currency": "0158415500000000C1F76FF6ECB0BAC600000000",
|
||||
"issuer": "rLEsXccBGNR3UPuPu2hUXPjziKC3qKSBun",
|
||||
"value": "200"
|
||||
|
||||
@@ -618,15 +618,13 @@ TEST_F(RPCTxTest, MintNFT)
|
||||
"FinalFields": {{
|
||||
"NFTokens": [
|
||||
{{
|
||||
"NFToken":
|
||||
{{
|
||||
"NFToken": {{
|
||||
"NFTokenID": "{}",
|
||||
"URI": "7465737475726C"
|
||||
}}
|
||||
}},
|
||||
{{
|
||||
"NFToken":
|
||||
{{
|
||||
"NFToken": {{
|
||||
"NFTokenID": "1B8590C01B0006EDFA9ED60296DD052DC5E90F99659B25014D08E1BC983515BC",
|
||||
"URI": "7465737475726C"
|
||||
}}
|
||||
@@ -637,8 +635,7 @@ TEST_F(RPCTxTest, MintNFT)
|
||||
"PreviousFields": {{
|
||||
"NFTokens": [
|
||||
{{
|
||||
"NFToken":
|
||||
{{
|
||||
"NFToken": {{
|
||||
"NFTokenID": "1B8590C01B0006EDFA9ED60296DD052DC5E90F99659B25014D08E1BC983515BC",
|
||||
"URI": "7465737475726C"
|
||||
}}
|
||||
@@ -890,8 +887,7 @@ TEST_F(RPCTxTest, ReturnCTIDForTxInput)
|
||||
"Fee": "2",
|
||||
"Sequence": 100,
|
||||
"SigningPubKey": "74657374",
|
||||
"TakerGets":
|
||||
{
|
||||
"TakerGets": {
|
||||
"currency": "0158415500000000C1F76FF6ECB0BAC600000000",
|
||||
"issuer": "rLEsXccBGNR3UPuPu2hUXPjziKC3qKSBun",
|
||||
"value": "200"
|
||||
@@ -900,19 +896,14 @@ TEST_F(RPCTxTest, ReturnCTIDForTxInput)
|
||||
"TakerPays": "300",
|
||||
"TransactionType": "OfferCreate",
|
||||
"hash": "2E2FBAAFF767227FE4381C4BE9855986A6B9F96C62F6E443731AB36F7BBB8A08",
|
||||
"meta":
|
||||
{
|
||||
"AffectedNodes":
|
||||
[
|
||||
"meta": {
|
||||
"AffectedNodes": [
|
||||
{
|
||||
"CreatedNode":
|
||||
{
|
||||
"CreatedNode": {
|
||||
"LedgerEntryType": "Offer",
|
||||
"NewFields":
|
||||
{
|
||||
"NewFields": {
|
||||
"TakerGets": "200",
|
||||
"TakerPays":
|
||||
{
|
||||
"TakerPays": {
|
||||
"currency": "0158415500000000C1F76FF6ECB0BAC600000000",
|
||||
"issuer": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
|
||||
"value": "300"
|
||||
@@ -966,8 +957,7 @@ TEST_F(RPCTxTest, NotReturnCTIDIfETLNotAvailable)
|
||||
"Fee": "2",
|
||||
"Sequence": 100,
|
||||
"SigningPubKey": "74657374",
|
||||
"TakerGets":
|
||||
{
|
||||
"TakerGets": {
|
||||
"currency": "0158415500000000C1F76FF6ECB0BAC600000000",
|
||||
"issuer": "rLEsXccBGNR3UPuPu2hUXPjziKC3qKSBun",
|
||||
"value": "200"
|
||||
@@ -975,19 +965,14 @@ TEST_F(RPCTxTest, NotReturnCTIDIfETLNotAvailable)
|
||||
"TakerPays": "300",
|
||||
"TransactionType": "OfferCreate",
|
||||
"hash": "2E2FBAAFF767227FE4381C4BE9855986A6B9F96C62F6E443731AB36F7BBB8A08",
|
||||
"meta":
|
||||
{
|
||||
"AffectedNodes":
|
||||
[
|
||||
"meta": {
|
||||
"AffectedNodes": [
|
||||
{
|
||||
"CreatedNode":
|
||||
{
|
||||
"CreatedNode": {
|
||||
"LedgerEntryType": "Offer",
|
||||
"NewFields":
|
||||
{
|
||||
"NewFields": {
|
||||
"TakerGets": "200",
|
||||
"TakerPays":
|
||||
{
|
||||
"TakerPays": {
|
||||
"currency": "0158415500000000C1F76FF6ECB0BAC600000000",
|
||||
"issuer": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
|
||||
"value": "300"
|
||||
@@ -1042,8 +1027,7 @@ TEST_F(RPCTxTest, ViaCTID)
|
||||
"Fee": "2",
|
||||
"Sequence": 100,
|
||||
"SigningPubKey": "74657374",
|
||||
"TakerGets":
|
||||
{{
|
||||
"TakerGets": {{
|
||||
"currency": "0158415500000000C1F76FF6ECB0BAC600000000",
|
||||
"issuer": "rLEsXccBGNR3UPuPu2hUXPjziKC3qKSBun",
|
||||
"value": "200"
|
||||
@@ -1052,19 +1036,14 @@ TEST_F(RPCTxTest, ViaCTID)
|
||||
"TakerPays": "300",
|
||||
"TransactionType": "OfferCreate",
|
||||
"hash": "2E2FBAAFF767227FE4381C4BE9855986A6B9F96C62F6E443731AB36F7BBB8A08",
|
||||
"meta":
|
||||
{{
|
||||
"AffectedNodes":
|
||||
[
|
||||
"meta": {{
|
||||
"AffectedNodes": [
|
||||
{{
|
||||
"CreatedNode":
|
||||
{{
|
||||
"CreatedNode": {{
|
||||
"LedgerEntryType": "Offer",
|
||||
"NewFields":
|
||||
{{
|
||||
"NewFields": {{
|
||||
"TakerGets": "200",
|
||||
"TakerPays":
|
||||
{{
|
||||
"TakerPays": {{
|
||||
"currency": "0158415500000000C1F76FF6ECB0BAC600000000",
|
||||
"issuer": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
|
||||
"value": "300"
|
||||
|
||||
@@ -167,11 +167,9 @@ generateTestValuesForParametersTest()
|
||||
UnsubscribeParamTestCaseBundle{
|
||||
.testName = "BooksItemTakerGetsNotObject",
|
||||
.testJson = R"JSON({
|
||||
"books":
|
||||
[
|
||||
"books": [
|
||||
{
|
||||
"taker_pays":
|
||||
{
|
||||
"taker_pays": {
|
||||
"currency": "XRP"
|
||||
},
|
||||
"taker_gets": "USD"
|
||||
@@ -184,11 +182,9 @@ generateTestValuesForParametersTest()
|
||||
UnsubscribeParamTestCaseBundle{
|
||||
.testName = "BooksItemTakerPaysNotObject",
|
||||
.testJson = R"JSON({
|
||||
"books":
|
||||
[
|
||||
"books": [
|
||||
{
|
||||
"taker_gets":
|
||||
{
|
||||
"taker_gets": {
|
||||
"currency": "XRP"
|
||||
},
|
||||
"taker_pays": "USD"
|
||||
@@ -201,11 +197,9 @@ generateTestValuesForParametersTest()
|
||||
UnsubscribeParamTestCaseBundle{
|
||||
.testName = "BooksItemTakerPaysMissingCurrency",
|
||||
.testJson = R"JSON({
|
||||
"books":
|
||||
[
|
||||
"books": [
|
||||
{
|
||||
"taker_gets":
|
||||
{
|
||||
"taker_gets": {
|
||||
"currency": "XRP"
|
||||
},
|
||||
"taker_pays": {}
|
||||
@@ -218,11 +212,9 @@ generateTestValuesForParametersTest()
|
||||
UnsubscribeParamTestCaseBundle{
|
||||
.testName = "BooksItemTakerGetsMissingCurrency",
|
||||
.testJson = R"JSON({
|
||||
"books":
|
||||
[
|
||||
"books": [
|
||||
{
|
||||
"taker_pays":
|
||||
{
|
||||
"taker_pays": {
|
||||
"currency": "XRP"
|
||||
},
|
||||
"taker_gets": {}
|
||||
@@ -235,11 +227,9 @@ generateTestValuesForParametersTest()
|
||||
UnsubscribeParamTestCaseBundle{
|
||||
.testName = "BooksItemTakerPaysCurrencyNotString",
|
||||
.testJson = R"JSON({
|
||||
"books":
|
||||
[
|
||||
"books": [
|
||||
{
|
||||
"taker_gets":
|
||||
{
|
||||
"taker_gets": {
|
||||
"currency": "XRP"
|
||||
},
|
||||
"taker_pays": {
|
||||
@@ -255,11 +245,9 @@ generateTestValuesForParametersTest()
|
||||
UnsubscribeParamTestCaseBundle{
|
||||
.testName = "BooksItemTakerGetsCurrencyNotString",
|
||||
.testJson = R"JSON({
|
||||
"books":
|
||||
[
|
||||
"books": [
|
||||
{
|
||||
"taker_pays":
|
||||
{
|
||||
"taker_pays": {
|
||||
"currency": "XRP"
|
||||
},
|
||||
"taker_gets": {
|
||||
@@ -275,11 +263,9 @@ generateTestValuesForParametersTest()
|
||||
UnsubscribeParamTestCaseBundle{
|
||||
.testName = "BooksItemTakerPaysInvalidCurrency",
|
||||
.testJson = R"JSON({
|
||||
"books":
|
||||
[
|
||||
"books": [
|
||||
{
|
||||
"taker_gets":
|
||||
{
|
||||
"taker_gets": {
|
||||
"currency": "XRP"
|
||||
},
|
||||
"taker_pays": {
|
||||
@@ -295,11 +281,9 @@ generateTestValuesForParametersTest()
|
||||
UnsubscribeParamTestCaseBundle{
|
||||
.testName = "BooksItemTakerGetsInvalidCurrency",
|
||||
.testJson = R"JSON({
|
||||
"books":
|
||||
[
|
||||
"books": [
|
||||
{
|
||||
"taker_pays":
|
||||
{
|
||||
"taker_pays": {
|
||||
"currency": "XRP"
|
||||
},
|
||||
"taker_gets": {
|
||||
@@ -315,11 +299,9 @@ generateTestValuesForParametersTest()
|
||||
UnsubscribeParamTestCaseBundle{
|
||||
.testName = "BooksItemTakerPaysMissingIssuer",
|
||||
.testJson = R"JSON({
|
||||
"books":
|
||||
[
|
||||
"books": [
|
||||
{
|
||||
"taker_gets":
|
||||
{
|
||||
"taker_gets": {
|
||||
"currency": "XRP"
|
||||
},
|
||||
"taker_pays": {
|
||||
@@ -334,11 +316,9 @@ generateTestValuesForParametersTest()
|
||||
UnsubscribeParamTestCaseBundle{
|
||||
.testName = "BooksItemTakerGetsMissingIssuer",
|
||||
.testJson = R"JSON({
|
||||
"books":
|
||||
[
|
||||
"books": [
|
||||
{
|
||||
"taker_pays":
|
||||
{
|
||||
"taker_pays": {
|
||||
"currency": "XRP"
|
||||
},
|
||||
"taker_gets": {
|
||||
@@ -353,11 +333,9 @@ generateTestValuesForParametersTest()
|
||||
UnsubscribeParamTestCaseBundle{
|
||||
.testName = "BooksItemTakerPaysIssuerNotString",
|
||||
.testJson = R"JSON({
|
||||
"books":
|
||||
[
|
||||
"books": [
|
||||
{
|
||||
"taker_gets":
|
||||
{
|
||||
"taker_gets": {
|
||||
"currency": "XRP"
|
||||
},
|
||||
"taker_pays": {
|
||||
@@ -373,11 +351,9 @@ generateTestValuesForParametersTest()
|
||||
UnsubscribeParamTestCaseBundle{
|
||||
.testName = "BooksItemTakerGetsIssuerNotString",
|
||||
.testJson = R"JSON({
|
||||
"books":
|
||||
[
|
||||
"books": [
|
||||
{
|
||||
"taker_pays":
|
||||
{
|
||||
"taker_pays": {
|
||||
"currency": "XRP"
|
||||
},
|
||||
"taker_gets": {
|
||||
@@ -393,11 +369,9 @@ generateTestValuesForParametersTest()
|
||||
UnsubscribeParamTestCaseBundle{
|
||||
.testName = "BooksItemTakerPaysInvalidIssuer",
|
||||
.testJson = R"JSON({
|
||||
"books":
|
||||
[
|
||||
"books": [
|
||||
{
|
||||
"taker_gets":
|
||||
{
|
||||
"taker_gets": {
|
||||
"currency": "XRP"
|
||||
},
|
||||
"taker_pays": {
|
||||
@@ -413,11 +387,9 @@ generateTestValuesForParametersTest()
|
||||
UnsubscribeParamTestCaseBundle{
|
||||
.testName = "BooksItemTakerGetsInvalidIssuer",
|
||||
.testJson = R"JSON({
|
||||
"books":
|
||||
[
|
||||
"books": [
|
||||
{
|
||||
"taker_pays":
|
||||
{
|
||||
"taker_pays": {
|
||||
"currency": "XRP"
|
||||
},
|
||||
"taker_gets": {
|
||||
@@ -433,11 +405,9 @@ generateTestValuesForParametersTest()
|
||||
UnsubscribeParamTestCaseBundle{
|
||||
.testName = "BooksItemTakerGetsXRPHasIssuer",
|
||||
.testJson = R"JSON({
|
||||
"books":
|
||||
[
|
||||
"books": [
|
||||
{
|
||||
"taker_pays":
|
||||
{
|
||||
"taker_pays": {
|
||||
"currency": "USD",
|
||||
"issuer": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn"
|
||||
},
|
||||
@@ -454,11 +424,9 @@ generateTestValuesForParametersTest()
|
||||
UnsubscribeParamTestCaseBundle{
|
||||
.testName = "BooksItemTakerPaysXRPHasIssuer",
|
||||
.testJson = R"JSON({
|
||||
"books":
|
||||
[
|
||||
"books": [
|
||||
{
|
||||
"taker_pays":
|
||||
{
|
||||
"taker_pays": {
|
||||
"currency": "XRP",
|
||||
"issuer": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn"
|
||||
},
|
||||
@@ -475,11 +443,9 @@ generateTestValuesForParametersTest()
|
||||
UnsubscribeParamTestCaseBundle{
|
||||
.testName = "BooksItemBadMartket",
|
||||
.testJson = R"JSON({
|
||||
"books":
|
||||
[
|
||||
"books": [
|
||||
{
|
||||
"taker_pays":
|
||||
{
|
||||
"taker_pays": {
|
||||
"currency": "XRP"
|
||||
},
|
||||
"taker_gets": {
|
||||
@@ -494,11 +460,9 @@ generateTestValuesForParametersTest()
|
||||
UnsubscribeParamTestCaseBundle{
|
||||
.testName = "BooksItemInvalidBoth",
|
||||
.testJson = R"JSON({
|
||||
"books":
|
||||
[
|
||||
"books": [
|
||||
{
|
||||
"taker_pays":
|
||||
{
|
||||
"taker_pays": {
|
||||
"currency": "XRP"
|
||||
},
|
||||
"taker_gets": {
|
||||
|
||||
Reference in New Issue
Block a user