paltalabs / soroban-react

@soroban-react is a simple, powerful framework for building modern Soroban dApps using React.
https://soroban-react.paltalabs.io/
Apache License 2.0
30 stars 15 forks source link

Allow users to specify custom source for 'useContractValue', or use connected wallet #20

Closed paulbellamy closed 1 year ago

paulbellamy commented 1 year ago

Particularly with auth, useContractValue might return different results depending on who is invoking the call. To support this, we need to allow the user to specify a custom source to use (or maybe just address?), and should default to the connected wallet if there is one. Additionally, I set the default to be a more neutral account (32 bytes of 0).

Thoughts?

esteblock commented 1 year ago

Will check today

esteblock commented 1 year ago

Was breaking when building. Fixed by adding source also as parameter in the fetchContractValue function

esteblock commented 1 year ago

Published in @soroban-react/contracts v3.5.0