Skip to content

fix: missing basic validation in route params #720

fix: missing basic validation in route params

fix: missing basic validation in route params #720

Re-run triggered August 23, 2024 12:05
Status Failure
Total duration 1m 12s
Artifacts

test.yaml

on: pull_request
Matrix: test
Fit to window
Zoom out
Zoom in

Annotations

8 errors and 1 warning
test/routes/token.test.ts > `/token/generate` - without params: test/routes/token.test.ts#L35
Error: Snapshot ``/token/generate` - without params 1` mismatched - Expected + Received - "[ - { - "code": "invalid_type", - "expected": "object", - "received": "null", - "path": [], - "message": "Expected object, received null" - } - ]" + "Invalid : Expected object, received null" ❯ test/routes/token.test.ts:35:24
test/routes/rgbpp/address.test.ts > /:btc_address/activity: test/routes/rgbpp/address.test.ts#L189
Error: Snapshot `/:btc_address/activity 1` mismatched - Expected + Received @@ -1683,11 +1683,111 @@ "value": 642308, }, ], "weight": 1128, }, - "isRgbpp": false, + "isRgbpp": true, + "isomorphicTx": { + "ckbTx": { + "cellDeps": [ + { + "depType": "code", + "outPoint": { + "index": "0x0", + "txHash": "0xf1de59e973b85791ec32debbba08dff80c63197e895eb95d67fc1e9f6b413e00", + }, + }, + { + "depType": "code", + "outPoint": { + "index": "0x0", + "txHash": "0xbf6fb538763efec2a70a6a3dcb7242787087e1030c4e7d86585bc63a9d337f5f", + }, + }, + { + "depType": "code", + "outPoint": { + "index": "0x1", + "txHash": "0xf1de59e973b85791ec32debbba08dff80c63197e895eb95d67fc1e9f6b413e00", + }, + }, + { + "depType": "code", + "outPoint": { + "index": "0x1", + "txHash": "0x49153359c02d71b50097ca3580f16df9f58456e1336e0d91652d433590f2b163", + }, + }, + ], + "hash": "0x296978f0952148ab9b4828f875e7cb646cfd2d8cd56702113d50d9cdf7c7dc86", + "headerDeps": [], + "inputs": [ + { + "previousOutput": { + "index": "0x0", + "txHash": "0xcfd5296560be20bc424d758206b28e9744e6446079f3b58351e31596c3e6e0fa", + }, + "since": "0x0", + }, + ], + "outputs": [ + { + "capacity": "0x5e9e620d3", + "lock": { + "args": "0x02000000128e230d269fd2244072847616f7ea34e72deb8d0a9864beda2aae6caf9cb1af", + "codeHash": "0x61ca7a4796a4eb19ca4f0d065cb9b10ddcf002f10f7cbb810c706cb6bb5c3248", + "hashType": "type", + }, + "type": { + "args": "0x1ba116c119d1cfd98a53e9d1a615cf2af2bb87d95515c9d217d367054cfc696b", + "codeHash": "0x25c29dc317811a6f6f3985a7a9ebc4838bd388d19d0feeecf0bcd60f6c0975bb", + "hashType": "type", + }, + }, + ], + "outputsData": [ + "0x02000000000000000000000000000000", + ], + "version": "0x0", + "witnesses": [ + "0x0d060000100000000d0600000d060000f9050000f90500001400000016000000180000000001000000000101e40000000200000002e058567c33fea3eb8381f62b3903b70434a1edcea29d536a5f21660908667bcb0300000000ffffffff658637f4d90e67bc6b86bf68f884ebc7232e85c09fad1e1403f6d3f1ee3cb47b0000000000ffffffff040000000000000000226a206eb1ead0366a45ce9926ac5bc7165e32b3efd2ddc642be71b3b483acc83e5f6444040000000000001600149c76450de82d1ce126b3a90846775b60f343631a2202000000000000160014f138466e1a154a06ea8c76d7f0f6a30a86d5c67b04cd090000000000160014f138466e1a154a06ea8c76d7f0f6a30a86d5c67b00000000f5040000f504000014000000180000001c000000d9010000970200002d0f2b00b90100009b4de420185884460bf1e676a191c406b51d9e41cc6dc590e73085fc03e7efe500000000da15626c16e0afbf86dc42a3284a6718ca935ecd0c7282ad1784338efefaf94800397566ffff001d698cd301870300000b6ee76436d3aa142ec9976e5ca9cec455443ea94c8c7623330d1c9f719d273f7686f8ff6827acf1711b2bec40e74347958f48f9d4921e6ab816dc322b2e473d2daefaf3dfc33a66bcbe9e6ebbca5a038bf3ce88fd84c4224fc91400502eb02582a890cb10aa46516251db23b10bc20407ec325fbe0097bc3d8cc08e851ef9da92295f45274efc91968c02c50badd1a22b38de65c7b096109307e4c15a0cc0033e467b123e705aca56a3dac625721eb66170952da945ab5aa0856506fa2feb16a2128e230d269fd2244072847616f7ea34e72deb8d0a9864beda2aae6caf9cb1af6b3d80c77b58ec2dae1eedfa4430855a22df004ad2e73d27849a2cd24386189df10310b48aeb69fa2e620491356590fc7c60525eb741038aeb65931d3c0a2a41dcfdee9c752b5910528d76cd3c13c1c26e720236cd14cfbe15b4fae7bd1039ea533e9d8188fc6be9272eb0ae2685399f91a3c738c208f2751f9643875d644cee0
test (mempool)
Process completed with exit code 1.
test (electrs)
The job was canceled because "mempool" failed.
test/routes/token.test.ts > `/token/generate` - without params: test/routes/token.test.ts#L35
Error: Snapshot ``/token/generate` - without params 1` mismatched - Expected + Received - "[ - { - "code": "invalid_type", - "expected": "object", - "received": "null", - "path": [], - "message": "Expected object, received null" - } - ]" + "Invalid : Expected object, received null" ❯ test/routes/token.test.ts:35:24
test/services/transaction.test.ts > transactionProcessor > enqueueTransaction: should be add transaction request to queue: test/services/transaction.test.ts#L130
AssertionError: expected 2 to be 1 // Object.is equality - Expected + Received - 1 + 2 ❯ test/services/transaction.test.ts:130:27
test/routes/rgbpp/address.test.ts > /:btc_address/activity: test/routes/rgbpp/address.test.ts#L189
Error: Snapshot `/:btc_address/activity 1` mismatched - Expected + Received @@ -1683,11 +1683,111 @@ "value": 642308, }, ], "weight": 1128, }, - "isRgbpp": false, + "isRgbpp": true, + "isomorphicTx": { + "ckbTx": { + "cellDeps": [ + { + "depType": "code", + "outPoint": { + "index": "0x0", + "txHash": "0xf1de59e973b85791ec32debbba08dff80c63197e895eb95d67fc1e9f6b413e00", + }, + }, + { + "depType": "code", + "outPoint": { + "index": "0x0", + "txHash": "0xbf6fb538763efec2a70a6a3dcb7242787087e1030c4e7d86585bc63a9d337f5f", + }, + }, + { + "depType": "code", + "outPoint": { + "index": "0x1", + "txHash": "0xf1de59e973b85791ec32debbba08dff80c63197e895eb95d67fc1e9f6b413e00", + }, + }, + { + "depType": "code", + "outPoint": { + "index": "0x1", + "txHash": "0x49153359c02d71b50097ca3580f16df9f58456e1336e0d91652d433590f2b163", + }, + }, + ], + "hash": "0x296978f0952148ab9b4828f875e7cb646cfd2d8cd56702113d50d9cdf7c7dc86", + "headerDeps": [], + "inputs": [ + { + "previousOutput": { + "index": "0x0", + "txHash": "0xcfd5296560be20bc424d758206b28e9744e6446079f3b58351e31596c3e6e0fa", + }, + "since": "0x0", + }, + ], + "outputs": [ + { + "capacity": "0x5e9e620d3", + "lock": { + "args": "0x02000000128e230d269fd2244072847616f7ea34e72deb8d0a9864beda2aae6caf9cb1af", + "codeHash": "0x61ca7a4796a4eb19ca4f0d065cb9b10ddcf002f10f7cbb810c706cb6bb5c3248", + "hashType": "type", + }, + "type": { + "args": "0x1ba116c119d1cfd98a53e9d1a615cf2af2bb87d95515c9d217d367054cfc696b", + "codeHash": "0x25c29dc317811a6f6f3985a7a9ebc4838bd388d19d0feeecf0bcd60f6c0975bb", + "hashType": "type", + }, + }, + ], + "outputsData": [ + "0x02000000000000000000000000000000", + ], + "version": "0x0", + "witnesses": [ + "0x0d060000100000000d0600000d060000f9050000f90500001400000016000000180000000001000000000101e40000000200000002e058567c33fea3eb8381f62b3903b70434a1edcea29d536a5f21660908667bcb0300000000ffffffff658637f4d90e67bc6b86bf68f884ebc7232e85c09fad1e1403f6d3f1ee3cb47b0000000000ffffffff040000000000000000226a206eb1ead0366a45ce9926ac5bc7165e32b3efd2ddc642be71b3b483acc83e5f6444040000000000001600149c76450de82d1ce126b3a90846775b60f343631a2202000000000000160014f138466e1a154a06ea8c76d7f0f6a30a86d5c67b04cd090000000000160014f138466e1a154a06ea8c76d7f0f6a30a86d5c67b00000000f5040000f504000014000000180000001c000000d9010000970200002d0f2b00b90100009b4de420185884460bf1e676a191c406b51d9e41cc6dc590e73085fc03e7efe500000000da15626c16e0afbf86dc42a3284a6718ca935ecd0c7282ad1784338efefaf94800397566ffff001d698cd301870300000b6ee76436d3aa142ec9976e5ca9cec455443ea94c8c7623330d1c9f719d273f7686f8ff6827acf1711b2bec40e74347958f48f9d4921e6ab816dc322b2e473d2daefaf3dfc33a66bcbe9e6ebbca5a038bf3ce88fd84c4224fc91400502eb02582a890cb10aa46516251db23b10bc20407ec325fbe0097bc3d8cc08e851ef9da92295f45274efc91968c02c50badd1a22b38de65c7b096109307e4c15a0cc0033e467b123e705aca56a3dac625721eb66170952da945ab5aa0856506fa2feb16a2128e230d269fd2244072847616f7ea34e72deb8d0a9864beda2aae6caf9cb1af6b3d80c77b58ec2dae1eedfa4430855a22df004ad2e73d27849a2cd24386189df10310b48aeb69fa2e620491356590fc7c60525eb741038aeb65931d3c0a2a41dcfdee9c752b5910528d76cd3c13c1c26e720236cd14cfbe15b4fae7bd1039ea533e9d8188fc6be9272eb0ae2685399f91a3c738c208f2751f9643875d644cee0
test (electrs)
Process completed with exit code 1.
test (mempool)
The following actions use a deprecated Node.js version and will be forced to run on node20: actions/checkout@v3, actions/setup-node@v3. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/