Skip to content

Prevent duplicate click listeners, prepare for gh-pages#4

Merged
rekmarks merged 14 commits intomasterfrom
update-test-dapp
Jan 17, 2020
Merged

Prevent duplicate click listeners, prepare for gh-pages#4
rekmarks merged 14 commits intomasterfrom
update-test-dapp

Conversation

@rekmarks
Copy link
Copy Markdown
Member

@rekmarks rekmarks commented Jan 10, 2020

  • Copy latest test dapp from metamask-extension#develop
  • Add @metamask/onboarding dependency
  • Prevent duplicate click listeners: s/addEventListener('click', /onclick(
  • Prepare for gh-pages deployment
    • add deploy script that pushes relevant files to gh-pages branch
    • use unpkg.com/metamask-onboarding as source for onboarding dependency in gh-pages

@whymarrh
Copy link
Copy Markdown
Contributor

How does this work? The onlick can b a function but is it assigned anywhere?

@rekmarks
Copy link
Copy Markdown
Member Author

rekmarks commented Jan 16, 2020

How does this work? The onlick can b a function but is it assigned anywhere?

@whymarrh I'm not sure what you mean. We're just replacing addEventListener('click', callback) with onclick(callback). The former adds a new event listener for the given event on the target object; the latter sets a click listener, replacing the existing one, if any.

This is to address a bug in e2e tests caused by duplicate listeners.

Note that these changes are very outdated, and are about to be replaced.

Edit: I am a dumb-dumb. Fixed.

@rekmarks rekmarks force-pushed the update-test-dapp branch 3 times, most recently from 63abbf1 to d1f39ae Compare January 16, 2020 20:17
@rekmarks rekmarks changed the title Prevent duplicate click listeners Prevent duplicate click listeners, prepare for gh-pages Jan 16, 2020
@rekmarks rekmarks requested review from Gudahtt and whymarrh January 16, 2020 20:22
@rekmarks rekmarks requested a review from Gudahtt January 16, 2020 20:42
rekmarks and others added 2 commits January 16, 2020 13:39
Co-Authored-By: Mark Stacey <markjstacey@gmail.com>
Co-Authored-By: Mark Stacey <markjstacey@gmail.com>
@rekmarks rekmarks requested a review from Gudahtt January 16, 2020 22:54
rekmarks and others added 2 commits January 16, 2020 17:50
Co-Authored-By: Mark Stacey <markjstacey@gmail.com>
@rekmarks rekmarks requested a review from Gudahtt January 17, 2020 01:56
Copy link
Copy Markdown
Member

@Gudahtt Gudahtt left a comment

Choose a reason for hiding this comment

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

LGTM!

@Gudahtt
Copy link
Copy Markdown
Member

Gudahtt commented Jan 17, 2020

I just updated the metamask-extension version of this test dapp slightly (MetaMask/metamask-extension@3a2c81d) but I can update that here in a subsequent PR

@rekmarks rekmarks merged commit 09c8d64 into master Jan 17, 2020
@whymarrh whymarrh deleted the update-test-dapp branch January 17, 2020 22:57
jennypollack pushed a commit that referenced this pull request Apr 1, 2020
refactored contract, send eth, and send tokens section
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.

3 participants