Skip to content

Commit

Permalink
Remove some debug logging
Browse files Browse the repository at this point in the history
  • Loading branch information
svk31 committed May 1, 2018
1 parent 85cf556 commit c69f297
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 29 deletions.
7 changes: 0 additions & 7 deletions app/components/Utility/BindToChainState.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -517,13 +517,6 @@ function BindToChainState(Component, options = {}) {

render() {
const props = omit(this.props, this.all_chain_props);
if (Component.name === "ExchangeSubscriber")
console.log(
"props:",
this.all_chain_props,
"state:",
this.state
);
for (let prop of this.required_props) {
if (this.state[prop] === undefined) {
if (typeof options !== "undefined" && options.show_loader) {
Expand Down
38 changes: 16 additions & 22 deletions app/components/Utility/ChainTypes.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,28 +9,22 @@ const {object_type} = grapheneChainTypes;
function createChainableTypeChecker(validate) {
function checkType(isRequired, props, propName, componentName, location) {
componentName = componentName || ANONYMOUS;
if (componentName === "ExchangeSubscriber")
console.log(
componentName,
propName,
props[propName],
validate(props, propName, componentName, location)
);
// if (props[propName] == null) {
// if (isRequired) {
// return new Error(
// "Required " +
// location +
// " `" +
// propName +
// "` was not specified in " +
// ("`" + componentName + "`.")
// );
// }
// return null;
// } else {
return validate(props, propName, componentName, location);
// }

if (props[propName] == null) {
if (isRequired) {
return new Error(
"Required " +
location +
" `" +
propName +
"` was not specified in " +
("`" + componentName + "`.")
);
}
return null;
} else {
return validate(props, propName, componentName, location);
}
}

let chainedCheckType = checkType.bind(null, false);
Expand Down

0 comments on commit c69f297

Please sign in to comment.