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

Cannot decode Tx memo on mainnet #8

Open
Sotatek-SinhVu opened this issue Jan 3, 2020 · 0 comments
Open

Cannot decode Tx memo on mainnet #8

Sotatek-SinhVu opened this issue Jan 3, 2020 · 0 comments

Comments

@Sotatek-SinhVu
Copy link
Contributor

Sotatek-SinhVu commented Jan 3, 2020

Here is my transaction detail in the mainnet:

https://dex.binance.org/api/v1/tx/16908395AE595CB6D3E33F857A7E1934F3A0BD7F920F73AE90232DB5A959AB0C?format=json

As you can see, the memo is:

"data": null,
"memo": "AVA_D_021189",

But, when I tried to decode raw tx above, it is:

3gHwYl3uClgqLIf6CigKFMm3DGlwDnrl8oUv/XuUcGS9pSBjEhAKB0FWQS02NDUQgICz/8QDEigKFEVc1zZPMVGEI/wwNXGZG6jdXLDSEhAKB0FWQS02NDUQgICz/8QDEm4KJuta6YchA5DMmRpyXoWfDeEKwECe+PVqqKEJHWQmGMhNou4rSireEkBccrwLsoJk8uNcl7GTVGhdwGdeyjugUfLnU1UeWoKJYT8D3LDWt2N6BU7yKadlWvJ/Lsh44xMJl3oXWS9m1LzXGJecFBoMQVZBX0RfMDIxMTg5IAI=

And here is the response after decode:

  memo: '',
  source: 0,
  data: '',
  msgType: 'StdTx' }

@antoncoding do you have any information about it?

Here is my source code:

    const bytes = Buffer.from(rawData, 'base64');
    // currently only supported transfer type
    try {
      const tx = bnbDecoder.decode(bytes.toString('hex'), config.network === 'testnet');
      console.log(`tx=========`, tx);
      return tx;
    } catch (err) {
      // if error, it mean it maybe not transfer tx
      return null;
    }
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