vechain / thor-sync.electron

A browser that empowers DApps on VeChain
GNU Lesser General Public License v3.0
55 stars 28 forks source link

Returning Solidity structs #499

Closed silentlight closed 2 years ago

silentlight commented 2 years ago

Describe the bug We noticed that when our smart contract returns structs from view functions it fails on Sync but it works just fine on the browser

To Reproduce Steps to reproduce the behavior:

  1. Create a struct in your smart contract
  2. Create a function which returns struct or array of structs
  3. Use it with connex in your dapp

Actual result:

I receive array with no element.

Screenshot 2021-10-09 at 23 33 38

Expected result:

I receive array with price, from, createdAt properties.

Screenshot 2021-10-09 at 23 34 50

Desktop OS : MacOS 10.15.7

Sync Version:

image

Additional context In our web app we are using "@vechain/connex": "^2.0.5". I see that Sync browser is using version 1.4.2. Bumping version of connex packages to the newest one might fix this issue.

libotony commented 2 years ago

Fixed in v1.3.1