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

Use wsRpc in dao apps command #1578

Merged
merged 2 commits into from
Mar 27, 2020
Merged

Use wsRpc in dao apps command #1578

merged 2 commits into from
Mar 27, 2020

Conversation

macor161
Copy link
Contributor

@macor161 macor161 commented Mar 23, 2020

🦅 Pull Request Description

Rational

The wsRpc provider wasn't used to fetch permissionless apps.

@@ -115,7 +116,7 @@ export const handler = async function({
task: async (ctx, task) => {
appsWithoutPermissions = (
await getAllApps(daoAddress, {
web3,
web3: new Web3(wsProvider || web3.currentProvider),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need to initialize a new Web3 object? Shouldn't be the same as line 107 🤔

Copy link
Contributor Author

@macor161 macor161 Mar 23, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good question. Because the ensureWeb3() function that generates the Web3 object doesn't use wsProvider. I think this has been refactored in develop but not yet on master

@0xGabi 0xGabi merged commit 483664d into master Mar 27, 2020
@0xGabi 0xGabi deleted the fix-getallapps branch March 27, 2020 15:17
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

Successfully merging this pull request may close these issues.

2 participants