Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Mailformed response when using TonClient4.getAccountTransactionsParsed #41

Open
0xcuonghx opened this issue Jun 10, 2024 · 0 comments

Comments

@0xcuonghx
Copy link

Query to endpoint https://testnet-v4.tonhubapi.com/account/EQAbB-ykyJKBtL17EUxDOyL2H55aakn05uDVW06aH0wJNO-E/tx/parsed/22378444000001/wOQMLWEc4NzPQLAsyFg-D2Iz6O1ZnmtG41tGWIV3FJs return data.

  • Using TonClient4.getAccountTransactionsParsed throw Error: Mailformed response
const accountAddress = "UQAbB-ykyJKBtL17EUxDOyL2H55aakn05uDVW06aH0wJNLJB"
const offsetTransactionLT= 22378444000001
const offsetTransactionHash wOQMLWEc4NzPQLAsyFg+D2Iz6O1ZnmtG41tGWIV3FJs

const accountTransactionsParsed =
          await this.ton.getAccountTransactionsParsed(
            Address.parse(this.accountAddress),
            BigInt(offsetTransactionLT),
            Buffer.from(offsetTransactionHash, 'base64'),
            COUNT,
          );
  • Error
ZodError: [
  {
    "code": "invalid_union",
    "unionErrors": [
      {
        "issues": [
          {
            "code": "invalid_union",
            "unionErrors": [
              {
                "issues": [
                  {
                    "code": "invalid_type",
                    "expected": "number",
                    "received": "undefined",
                    "path": [
                      "transactions",
                      4,
                      "outMessages",
                      0,
                      "init",
                      "splitDepth"
                    ],
                    "message": "Required"
                  }
                ],
                "name": "ZodError"
              },
              {
                "issues": [
                  {
                    "code": "invalid_type",
                    "expected": "null",
                    "received": "undefined",
                    "path": [
                      "transactions",
                      4,
                      "outMessages",
                      0,
                      "init",
                      "splitDepth"
                    ],
                    "message": "Required"
                  }
                ],
                "name": "ZodError"
              }
            ],
            "path": [
              "transactions",
              4,
              "outMessages",
              0,
              "init",
              "splitDepth"
            ],
            "message": "Invalid input"
          },
          {
            "code": "invalid_union",
            "unionErrors": [
              {
                "issues": [
                  {
                    "code": "invalid_type",
                    "expected": "object",
                    "received": "undefined",
                    "path": [
                      "transactions",
                      4,
                      "outMessages",
                      0,
                      "init",
                      "special"
                    ],
                    "message": "Required"
                  }
                ],
                "name": "ZodError"
              },
              {
                "issues": [
                  {
                    "code": "invalid_type",
                    "expected": "null",
                    "received": "undefined",
                    "path": [
                      "transactions",
                      4,
                      "outMessages",
                      0,
                      "init",
                      "special"
                    ],
                    "message": "Required"
                  }
                ],
                "name": "ZodError"
              }
            ],
            "path": [
              "transactions",
              4,
              "outMessages",
              0,
              "init",
              "special"
            ],
            "message": "Invalid input"
          }
        ],
        "name": "ZodError"
      },
      {
        "issues": [
          {
            "code": "invalid_type",
            "expected": "null",
            "received": "object",
            "path": [
              "transactions",
              4,
              "outMessages",
              0,
              "init"
            ],
            "message": "Expected null, received object"
          }
        ],
        "name": "ZodError"
      }
    ],
    "path": [
      "transactions",
      4,
      "outMessages",
      0,
      "init"
    ],
    "message": "Invalid input"
  }
]

Transaction found on TON Scan: https://testnet.tonscan.org/tx/wOQMLWEc4NzPQLAsyFg-D2Iz6O1ZnmtG41tGWIV3FJs=

@0xcuonghx 0xcuonghx reopened this Jun 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant