Skip to content

Commit

Permalink
update fixtures
Browse files Browse the repository at this point in the history
  • Loading branch information
oXtxNt9U committed Nov 28, 2024
1 parent 86084d2 commit 9305007
Show file tree
Hide file tree
Showing 7 changed files with 831 additions and 983 deletions.
6 changes: 2 additions & 4 deletions packages/api-http/integration/routes/delegates.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,8 @@ describe<{
await apiContext.walletRepository.save(delegates);
await apiContext.walletRepository.save(wallets);

const wallet = wallets[wallets.length - 1];

await assert.rejects(
async () => request(`/delegates/${wallet.address}/voters`, options),
async () => request(`/delegates/0x0000000000000000000000000000000000000001/voters`, options),
"Response code 404 (Not Found)",
);

Expand All @@ -99,7 +97,7 @@ describe<{
assert.equal(statusCode, 200);
assert.equal(
data.data,
wallets.filter((wallet) => wallet.attributes.vote === delegate.publicKey),
wallets.filter((wallet) => wallet.attributes.vote === delegate.address),
);
});

Expand Down
8 changes: 4 additions & 4 deletions packages/api-http/integration/routes/wallets.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,10 @@ describe<{
id: wallet.publicKey,
result: wallet,
},
{
id: wallet.attributes.username,
result: wallet,
},
// {
// id: wallet.attributes.username,
// result: wallet,
// },
];

for (const { id, result } of testCases) {
Expand Down
8 changes: 4 additions & 4 deletions packages/api-http/test/fixtures/blocks.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"payloadLength": 0,
"payloadHash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"stateHash": "0000000000000000000000000000000000000000000000000000000000000000",
"generatorAddress": "bc8686be38237cd1a9bb5efa85743b0ba594c5d433cdd1e6bfd804de11d92924",
"generatorAddress": "0xAe44ad925374b90B5f2A285461A70D6ba655EE28",
"signature": "a712a6168944f712a5c0797b9928e1b795780784356ff79f14f02af8bedaa6c81a8f263087cd8669baf699ea4982942714ab8485f785c273161fc58bef7036baa41ab6c42e4ea2d531200697c84fc3a6199de33af281ad437bf8e2734543f311",
"commitRound": 0,
"validatorSet": "9007199254740991",
Expand Down Expand Up @@ -959,7 +959,7 @@
"payloadLength": 0,
"payloadHash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"stateHash": "0000000000000000000000000000000000000000000000000000000000000000",
"generatorAddress": "9c633b08c5d3b384fdb4edaa30a6f5532216395e0af5d621715ee3417b1d8d54",
"generatorAddress": "0x58712FE2A757d2240510eAc42086601B21EA741A",
"signature": "a29a2acef8498991fe3a43891c42d539a229643b3fadadb78512b7ff91de929aa650f46d874612704aae8a3a4429643e0c152bf43715daa912bdabb1e97b07167e92d7127e1c1d9e11e458c1ac8d40b15f53ce3c77ce7a64ba048b33be34582c",
"commitRound": 0,
"validatorSet": "9007199254740991",
Expand All @@ -980,10 +980,10 @@
"payloadLength": 33646,
"payloadHash": "27bfa6b30158f909716179a1bc18ddbdd52f5c7115212953596eb70698eb424a",
"stateHash": "0000000000000000000000000000000000000000000000000000000000000000",
"generatorAddress": "9c633b08c5d3b384fdb4edaa30a6f5532216395e0af5d621715ee3417b1d8d54",
"generatorAddress": "0x58712FE2A757d2240510eAc42086601B21EA741A",
"signature": "",
"commitRound": 0,
"validatorSet": "9007199254740991",
"validatorRound": 1
}
]
]
6 changes: 3 additions & 3 deletions packages/api-http/test/fixtures/delegate_blocks.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"payloadLength": 0,
"payloadHash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"stateHash": "0000000000000000000000000000000000000000000000000000000000000000",
"generatorAddress": "9c633b08c5d3b384fdb4edaa30a6f5532216395e0af5d621715ee3417b1d8d54",
"generatorAddress": "0x58712FE2A757d2240510eAc42086601B21EA741A",
"signature": "a29a2acef8498991fe3a43891c42d539a229643b3fadadb78512b7ff91de929aa650f46d874612704aae8a3a4429643e0c152bf43715daa912bdabb1e97b07167e92d7127e1c1d9e11e458c1ac8d40b15f53ce3c77ce7a64ba048b33be34582c",
"commitRound": 0,
"validatorSet": "9007199254740991",
Expand All @@ -35,10 +35,10 @@
"reward": "0",
"payloadLength": 33646,
"payloadHash": "27bfa6b30158f909716179a1bc18ddbdd52f5c7115212953596eb70698eb424a",
"generatorAddress": "9c633b08c5d3b384fdb4edaa30a6f5532216395e0af5d621715ee3417b1d8d54",
"generatorAddress": "0x58712FE2A757d2240510eAc42086601B21EA741A",
"signature": "",
"commitRound": 0,
"validatorSet": "9007199254740991",
"validatorRound": 1
}
]
]
10 changes: 5 additions & 5 deletions packages/api-http/test/fixtures/delegates.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
[
{
"address": "9c633b08c5d3b384fdb4edaa30a6f5532216395e0af5d621715ee3417b1d8d54",
"publicKey": "9c633b08c5d3b384fdb4edaa30a6f5532216395e0af5d621715ee3417b1d8d54",
"address": "0x58712FE2A757d2240510eAc42086601B21EA741A",
"publicKey": "023fbcf58a4dcddfda8240fd9e8f92081f058719a3772f3bf3519d7d069ee45e74",
"balance": "0",
"nonce": "0",
"attributes": {
"vote": "9c633b08c5d3b384fdb4edaa30a6f5532216395e0af5d621715ee3417b1d8d54",
"vote": "0x58712FE2A757d2240510eAc42086601B21EA741A",
"nonce": "0",
"balance": "13",
"publicKey": "9c633b08c5d3b384fdb4edaa30a6f5532216395e0af5d621715ee3417b1d8d54",
"publicKey": "023fbcf58a4dcddfda8240fd9e8f92081f058719a3772f3bf3519d7d069ee45e74",
"validatorRank": 13,
"validatorApproval": 1.8867924528301887,
"username": "genesis_13",
Expand Down Expand Up @@ -215,4 +215,4 @@
},
"updated_at": "0"
}
]
]
16 changes: 8 additions & 8 deletions packages/api-http/test/fixtures/wallet_transactions.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"nonce": "3",
"senderPublicKey": "ac9a09dd85af1203cb5054d3f258e469ff831bf0ff1ee2cd90d6a46e52d11bae",
"senderAddress": "0xdB1A9acDd71eb5F846059034EF6D2CB144cCd1A9",
"recipientAddress": "0x522B3294E6d06aA25Ad0f1B8891242E335D3B459",
"recipientAddress": "0xAbd7A9c2054a362431F03a07104B262779e32ae4",
"amount": "1000000000",
"gasPrice": "5",
"gasLimit": "200000",
Expand All @@ -22,9 +22,9 @@
"sequence": 0,
"timestamp": "1695350059144",
"nonce": "2",
"senderPublicKey": "180ce525730360ffdd05cd0195baa545fe0dc0243dc1362f856475f8c0429d71",
"senderAddress": "0xB4e48Acd227b58B99425f482e55b9510BE40835B",
"recipientAddress": "0x522B3294E6d06aA25Ad0f1B8891242E335D3B459",
"senderPublicKey": "023fbcf58a4dcddfda8240fd9e8f92081f058719a3772f3bf3519d7d069ee45e74",
"senderAddress": "0x58712FE2A757d2240510eAc42086601B21EA741A",
"recipientAddress": "0xAbd7A9c2054a362431F03a07104B262779e32ae4",
"amount": "1000000000",
"gasPrice": "5",
"gasLimit": "200000",
Expand All @@ -38,13 +38,13 @@
"sequence": 0,
"timestamp": "1695350051134",
"nonce": "1",
"senderPublicKey": "180ce525730360ffdd05cd0195baa545fe0dc0243dc1362f856475f8c0429d71",
"senderAddress": "0xB4e48Acd227b58B99425f482e55b9510BE40835B",
"recipientAddress": "0x522B3294E6d06aA25Ad0f1B8891242E335D3B459",
"senderPublicKey": "023fbcf58a4dcddfda8240fd9e8f92081f058719a3772f3bf3519d7d069ee45e74",
"senderAddress": "0x58712FE2A757d2240510eAc42086601B21EA741A",
"recipientAddress": "0xAbd7A9c2054a362431F03a07104B262779e32ae4",
"amount": "1000000000",
"gasPrice": "5",
"gasLimit": "200000",
"data": null,
"signature": "55d946be668bb1b6ef5a3a82559c4fcf514938aec6de15a9afb9cd3b0c09b3efe4987549271dd1e6b141e837a3cc7f8487094b6bc478096132d4a1a501862214"
}
]
]
Loading

0 comments on commit 9305007

Please sign in to comment.