-
Notifications
You must be signed in to change notification settings - Fork 532
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
Feature/PL-bug-fixes #388
Feature/PL-bug-fixes #388
Conversation
092f393
to
9156291
Compare
@@ -8,7 +8,7 @@ import SelectBoxBitcoin from './template' | |||
|
|||
class SelectBoxBitcoinAddresses extends React.PureComponent { | |||
getLabel (coin) { | |||
return `All Bitcoin${coin === 'BCH' ? ' Cash' : ''} Wallets` | |||
return this.props.optional ? 'N/A' : `All Bitcoin${coin === 'BCH' ? ' Cash' : ''} Wallets` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why would you want to display 'N/A'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For importing external btc addrs, there needs to be an option to deselect if you've made a selection.
} | ||
|
||
const mapStateToProps = (state, ownProps) => ({ | ||
data: getData(state, ownProps.coin) | ||
data: getData(state, ownProps) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you do this, also replace the argument coin with props in the getData function
@@ -19,20 +19,21 @@ export const getData = (state, coin) => { | |||
return map(formatAddress, addressesData) | |||
} | |||
|
|||
const getAddressesData = (coin) => { | |||
const getAddressesData = (ownProps) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change should be on getData used in index.js, not getAddressesData used in selectors.js
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, also turns out defaultProps are not passed in ownProps
so I need to change this.
@sixtedemaupeou issues should be fixed now. I add a |
Description
Add a concise explanation of the changes.
Change Type
Please enter one or more of the following:
Testing Steps
Detail the steps required for the reviewer(s) to verify and test these changes.
PR Creator Checklist
yarn lint
)yarn test
)README.md
and other documentation (if necessary)PR Reviewer Checklist