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

TypeError: Expected features to be of type Feature[], but received Feature[] | "SendTransaction" #22

Open
liketurbo opened this issue Apr 28, 2023 · 0 comments

Comments

@liketurbo
Copy link

I am trying to parse the payload of WalletEvent, specifically ConnectEventSuccess.
In the futures of DeviceInfo, I received [ "SendTransaction", { "name": "SendTransaction", "maxMessages": 4 } ], when I expected a plain Feature[] type.
Can you confirm if this is intended, or if it is a bug? In the specification, you left a comment saying:

// Currently there is only one feature -- 'SendTransaction'

Does this mean that the features type is actually Features[] | "SendTransaction"?

Here's the full response:

{
  "id": 65,
  "event": "connect",
  "payload": {
    "items": [
      {
        "name": "ton_addr",
        "address": "0:dc69be3a989b1513f14e9e4ecc46ff6753770a2b199138708ff66238c2719e99",
        "network": "-239",
        "publicKey": "321b717a3a455096b6c3d20ad3f66207125557dacbb888fca9e00023aa89bfff",
        "walletStateInit": "te6cckECFgEAAwQAAgE0ARUBFP8A9KQT9LzyyAsCAgEgAxACAUgEBwLm0AHQ0wMhcbCSXwTgItdJwSCSXwTgAtMfIYIQcGx1Z70ighBkc3RyvbCSXwXgA/pAMCD6RAHIygfL/8nQ7UTQgQFA1yH0BDBcgQEI9ApvoTGzkl8H4AXTP8glghBwbHVnupI4MOMNA4IQZHN0crqSXwbjDQUGAHgB+gD0BDD4J28iMFAKoSG+8uBQghBwbHVngx6xcIAYUATLBSbPFlj6Ahn0AMtpF8sfUmDLPyDJgED7AAYAilAEgQEI9Fkw7UTQgQFA1yDIAc8W9ADJ7VQBcrCOI4IQZHN0coMesXCAGFAFywVQA88WI/oCE8tqyx/LP8mAQPsAkl8D4gIBIAgPAgEgCQ4CAVgKCwA9sp37UTQgQFA1yH0BDACyMoHy//J0AGBAQj0Cm+hMYAIBIAwNABmtznaiaEAga5Drhf/AABmvHfaiaEAQa5DrhY/AABG4yX7UTQ1wsfgAWb0kK29qJoQICga5D6AhhHDUCAhHpJN9KZEM5pA+n/mDeBKAG3gQFImHFZ8xhAT48oMI1xgg0x/TH9MfAvgju/Jk7UTQ0x/TH9P/9ATRUUO68qFRUbryogX5AVQQZPkQ8qP4ACSkyMsfUkDLH1Iwy/9SEPQAye1U+A8B0wchwACfbFGTINdKltMH1AL7AOgw4CHAAeMAIcAC4wABwAORMOMNA6TIyx8Syx/L/xESExQAbtIH+gDU1CL5AAXIygcVy//J0Hd0gBjIywXLAiLPFlAF+gIUy2sSzMzJc/sAyEAUgQEI9FHypwIAcIEBCNcY+gDTP8hUIEeBAQj0UfKnghBub3RlcHSAGMjLBcsCUAbPFlAE+gIUy2oSyx/LP8lz+wACAGyBAQjXGPoA0z8wUiSBAQj0WfKnghBkc3RycHSAGMjLBcsCUAXPFlAD+gITy2rLHxLLP8lz+wAACvQAye1UAFEAAAAAKamjFzIbcXo6RVCWtsPSCtP2YgcSVVfay7iI/KngACOqib//QMgBKq8="
      }
    ],
    "device": {
      "platform": "iphone",
      "appName": "Tonkeeper",
      "appVersion": "3.0.304",
      "maxProtocolVersion": 2,
      "features": [
        "SendTransaction",
        {
          "name": "SendTransaction",
          "maxMessages": 4
        }
      ]
    }
  }
}
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