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

useContractCall msg.sender doesn't work #419

Closed
chichke opened this issue Nov 27, 2021 · 5 comments
Closed

useContractCall msg.sender doesn't work #419

chichke opened this issue Nov 27, 2021 · 5 comments
Labels
enhancement New feature or request

Comments

@chichke
Copy link

chichke commented Nov 27, 2021

While you cannot specify a msg.sender with the useContractCall function some of my function like withdraw doesn't work.

https://github.com/EthWorks/useDApp/blob/485530a40eeb50b7ed5d7fedce00ff12a5d93a1c/packages/core/src/hooks/useContractCall.ts#L26-L31

I had to change my function from this :

    function getBet()
        external
        view
        onlyCurrentACPI
        returns (uint256)
    {
        return _balance[msg.sender][_currentRound];
    }

to this:

    function getBet(address account)
        external
        view
        onlyCurrentACPI
        returns (uint256)
    {
        return _balance[account][_currentRound];
    }

Looking for help :)

@rzadp rzadp added the enhancement New feature or request label Jun 8, 2022
@mj426382
Copy link
Contributor

mj426382 commented Jun 8, 2022

We are going to add connectors to useDapp soon which solve that problem:0

@gsteenkamp89
Copy link
Contributor

yeah being able to pass in overrides object is quite important.

@rzadp
Copy link
Contributor

rzadp commented Aug 10, 2022

I'm going to close this one and merge it with #897 as it is the same problem.

There might be problems with implementing this feature - #897 (comment)

@rzadp rzadp closed this as completed Aug 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants
@rzadp @chichke @gsteenkamp89 @mj426382 and others