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

On task completion, getting error "send transactions from field must be defined!" #24

Open
shivi28 opened this issue Apr 17, 2022 · 1 comment

Comments

@shivi28
Copy link

shivi28 commented Apr 17, 2022

After completing the task, when I toggle the task checkbox I am getting below error.

app.js:126 Uncaught (in promise) Error: The send transactions "from" field must be defined!
    at HTMLInputElement.toggleCompleted (app.js:124:28)
    at HTMLInputElement.dispatch (jquery.min.js:3:12444)
    at HTMLInputElement.r.handle (jquery.min.js:3:9173)
@shivi28
Copy link
Author

shivi28 commented Apr 17, 2022

To resolve this issue update the toggleCompleted() in app.js

Older code

toggleCompleted: async (e) => {
        App.setLoading(true)
        const taskId = e.target.name
        await App.todoList.toggleCompleted(taskId)
        window.location.reload()
    }

Updated code:

toggleCompleted: async (e) => {
        App.setLoading(true)
        const taskId = e.target.name
        await App.todoList.toggleCompleted(taskId,{ from: App.account })
        window.location.reload()
    }

In the updated code, added {from: App.account} argument in App.todoList.toggleCompleted()

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

No branches or pull requests

1 participant