Skip to content

Commit

Permalink
Fixed encoding tests.
Browse files Browse the repository at this point in the history
No idea how 32-byte ethereum addresses happened. The improved error
reporting in the constructor caught it.
  • Loading branch information
RmbRT committed Oct 10, 2024
1 parent 851c8e6 commit fbdefdd
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/api/transactions/transaction.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,8 @@ const testTrade =
const testError = '{"id":"an-id","error":"could not get proof"}';

const testSubscribeTXs =
'{"id":"an-id","data":{"type":"SubscribeTXs","data":{"who":{"type":"ethereum","data":"0x165803a9e8ae54dd4e8da44a8d19897c19cb91aeaea6afc67a7e8c6f35323716"}, "cancel": false}}}';
'{"id":"an-id","data":{"type":"SubscribeTXs","data":{"who":{"type":"ethereum","data":"0x8d19897c19cb91aeaea6afc67a7e8c6f35323716"}, "cancel": false}}}';
const testSubscribeBalanceProofs =
'{"id":"an-id","data":{"type":"SubscribeBalanceProofs","data":{"who":{"type":"ethereum","data":"0x165803a9e8ae54dd4e8da44a8d19897c19cb91aeaea6afc67a7e8c6f35323716"}}}}';
'{"id":"an-id","data":{"type":"SubscribeBalanceProofs","data":{"who":{"type":"ethereum","data":"0x8d19897c19cb91aeaea6afc67a7e8c6f35323716"}}}}';
const testSubscribePhaseShifts =
'{"id":"an-id","data":{"type":"SubscribePhaseShifts","data":{"cancel": false}}}';

const testHashing =
'{"sig":{"type":"test","data":{"address":{"type":"test","data":"0x11342d7d8ae3c7ead6845ade6838864c64197ec6a3f9ea8b6e91d6e95cbd1b80"},"msg":"eyJ2YWx1ZSI6eyJkYXRhIjp7Im5vbmNlIjoiMjEyNTY5MzA0NDkxNjI0OTIyOSIsInJlY2lwaWVudCI6eyJkYXRhIjoiOWZkNGJlYjE5MzYzYWE4NTg2MzIzNTQ0NTA2MmJjMzc5NTU1NjFjNDMyOGIxMzhmYTc0ZDQ2NTljYzgxODdkMCIsInR5cGUiOiJ0ZXN0In0sInNlbmRlciI6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ade6838864c64197ec6a3f9ea8b6e91d6e95cbd1b80"},"nonce":"2125693044916249229","recipient":{"type":"test","data":"0x9fd4beb19363aa85863235445062bc37955561c4328b138fa74d4659cc8187d0"},"values":{"30810":{"nfts":{"9c394d17b2b6b9dc5b571898916f40d9ceb9646e51cf41acece5484399501aa6":["0x6a89bf4c7ada3248a507620e85bc30f0473b26d707bde1debd109ce3ca1bd94d","0xf1665d81caab813a29d91f52128c8d8b709d60b42e078a9ab861b9ad4d312805","0xfe7734c3db19d3f9cf65a2b68e5f2b2b9cdb981e27dbc54dded4b4f6e7805715"]}},"37676":{"fungibles":{"7c9de034fab6eb957d3f73f9e9e168a89a7e1ddfb31c5429f1441d4dd0f4b940":"0x949c1867c7fde0a6f81e2f62caacd9a11a5232fbfac9bd3fa90e9eb18f43963"}},"46832":{"fungibles":{"4319e8f196ce3c5a773ee3e377d3fd8f218810a3fb03efad7c751316018883c9":"0xf02dff2deb0bd98076afb3f91b8b5f63db67e3ad68ad2104fb8e70dfb603cc27"}}}}';
'{"id":"an-id","data":{"type":"SubscribePhaseShifts","data":{"cancel": false}}}';

0 comments on commit fbdefdd

Please sign in to comment.