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

SDK13 and 14 have issues with decoding addresses in react #2029

Closed
kenodressel opened this issue Nov 11, 2024 · 3 comments
Closed

SDK13 and 14 have issues with decoding addresses in react #2029

kenodressel opened this issue Nov 11, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@kenodressel
Copy link
Member

kenodressel commented Nov 11, 2024

Describe the bug

When running a contract call (static or stateful) where the parameter or return value is an address the following error is produced:

base58check.js:19 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'decode')
    at Object.decode (base58check.js:19:1)
    at ApiEncoder.decode (ApiEncoder.js:79:1)
    at ApiEncoder.decodeWithType (ApiEncoder.js:106:1)
    at InternalMapper.toAddress (InternalMapper.js:39:1)
    at InternalMapper.toInternal (InternalMapper.js:20:1)
    at ExternalDataFactory.create (ExternalDataFactory.js:12:1)
    at CompositeDataFactory.js:36:1
    at Array.map (<anonymous>)
    at ExternalDataFactory.createMultiple (CompositeDataFactory.js:36:1)
    at CallDataFactory.create (CallDataFactory.js:19:1)

To Reproduce

https://github.com/kenodressel/sdk-react-issue

Expected behavior

I would love to do any contract call.

Please tell us about your environment:

  • Node Version: v20-v23 tested
  • Protocol Version: 7.1
  • Compiler version: latest
  • SDK Version: v13 + v14

CC: @thepiwo @yusufseyrek

@kenodressel kenodressel added the bug Something isn't working label Nov 11, 2024
@davidyuk
Copy link
Member

should be fixed by aeternity/aepp-calldata-js#296
related issue facebook/create-react-app#12700

@yusufseyrek
Copy link

When should we expect this to be fixed?

@davidyuk
Copy link
Member

It works with the new release of calldata
In the above reproduction I did npm i @aeternity/aepp-calldata@1.9.0 and it worked after that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants