Skip to content

Commit

Permalink
Fix last
Browse files Browse the repository at this point in the history
  • Loading branch information
timothymorse committed Sep 20, 2022
1 parent 21c49bf commit c0a8332
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions demo/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,13 @@ class Demo extends React.Component {
console.log(`${name} prop callback called for PSClickwrap with parameters: `, [...args]);
};

static onError = (...args) => {
if (args[0] === 'Command aborted on: validationTask, Error: missing_signer_id') {
alert('Please enter a signer ID (email address) before agreeing.');
}
Demo.onEventMethod('onError', ...args);
};

handleChangeSignerId = (e) => {
this.setState({ signerIdValue: e.target.value });
};
Expand Down Expand Up @@ -61,13 +68,6 @@ class Demo extends React.Component {
Demo.onEventMethod('onInvalid', ...args);
};

onError = (...args) => {
if (args[0] === 'Command aborted on: validationTask, Error: missing_signer_id') {
alert('Please enter a signer ID (email address) before agreeing.');
}
Demo.onEventMethod('onError', ...args);
};

onClickSubmit = () => {
const { hasAgreed } = this.state;
if (hasAgreed) {
Expand Down Expand Up @@ -179,7 +179,7 @@ class Demo extends React.Component {
onSent={(...args) => Demo.onEventMethod('onSent', ...args)}
onInvalid={this.onInvalid}
onDisplayed={(...args) => Demo.onEventMethod('onDisplayed', ...args)}
onError={this.onError}
onError={Demo.onError}
onSetSignerId={this.onUpdateSignerId}
onSet={(...args) => Demo.onEventMethod('onSet', ...args)}
onRendered={(...args) => Demo.onEventMethod('onRendered', ...args)}
Expand Down

0 comments on commit c0a8332

Please sign in to comment.