Page MenuHomePhabricator

[mock-chronik-client] Return numTxs key in history() calls
ClosedPublic

Authored by bytesofman on Aug 9 2024, 22:48.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABC94d8d224a8fe: [mock-chronik-client] Return numTxs key in history() calls
Summary

This is missing, although it is actually returned by chronik.

Since this key is to be used in a token-server feature, need it tested (ref D16615).

Test Plan

npm test

Event Timeline

Failed tests logs:

====== CashTab Unit Tests: Correctly prepares Cashtab mocked chronik client and localforage environment for Cashtab pre 1.7.* for unit tests initializeCashtabStateAtLegacyWalletKeysForTests: Wallet with xec and tokens ======
Error: expect(received).toEqual(expected) // deep equality

- Expected  - 0
+ Received  + 1

@@ -1,7 +1,8 @@
  Object {
    "numPages": 1,
+   "numTxs": 10,
    "txs": Array [
      Object {
        "inputs": Array [
          Object {
            "inputScript": "483045022100b8699595913167f3abd5c6dde588fe9dd89e56e811436d0cc02e81a6623a93c1022043954f663eb37a4e0a7cb28bd8ff857d0913cc771832b0e7ccf2b2fbaa9f3ae0412103318d0e1109f32debc66952d0e3ec21b1cf96575ea4c2a97a6535628f7f8b10e6",
    at Object.toEqual (/work/cashtab/src/components/App/fixtures/__tests__/index.test.js:94:15)

Each failure log is accessible here:
CashTab Unit Tests: Correctly prepares Cashtab mocked chronik client and localforage environment for Cashtab pre 1.7.* for unit tests initializeCashtabStateAtLegacyWalletKeysForTests: Wallet with xec and tokens

bytesofman published this revision for review.Aug 9 2024, 23:15
This revision is now accepted and ready to land.Aug 10 2024, 05:38