Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Check if the current state address equals input value before updating address state #203

Merged
merged 4 commits into from
Jul 12, 2022

Conversation

mmv08
Copy link
Member

@mmv08 mmv08 commented Jul 8, 2022

To avoid a mini infinite loop I'm facing in transaction builder I added a check for address/input value equality before firing updateAddressState.

The mini infinite loop looks like following:

  1. address (passed from controlling component) = '', inputValue = "ABC" --> onChangeAddress is called
  2. address (passed from controlling component) = 'ABC', inputValue = "ABC" --> updateAddressState is called because address has changed, and it calls onChangeAddress again

I also disabled webpack minimizing because this is a developer-facing library and it's way cooler to debug non-minified code

@github-actions
Copy link

github-actions bot commented Jul 8, 2022

ESLint Summary View Full Report

Annotations are provided inline on the Files Changed tab. You can also see all annotations that were generated on the annotations page.

Type Occurrences Fixable
Errors 0 0
Warnings 0 0
Ignored 0 N/A
  • Result: ✅ success
  • Annotations: 0 total

Report generated by eslint-plus-action

@mmv08 mmv08 requested review from DaniSomoza, dasanra and yagopv July 8, 2022 18:40
@mmv08 mmv08 marked this pull request as ready for review July 8, 2022 18:41
@github-actions
Copy link

📚 Storybook review

@mmv08 mmv08 force-pushed the bug/addressinput-onchange-called-twice branch from 58c7c67 to 8e4b0bb Compare July 12, 2022 08:53
@mmv08 mmv08 force-pushed the bug/addressinput-onchange-called-twice branch from 8e4b0bb to 6494f08 Compare July 12, 2022 09:00
@mmv08 mmv08 merged commit 1894f3c into main Jul 12, 2022
@mmv08 mmv08 deleted the bug/addressinput-onchange-called-twice branch July 12, 2022 11:01
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants