diff --git a/js/src/modals/Transfer/store.js b/js/src/modals/Transfer/store.js
index cbb10f17f..3a8f54f92 100644
--- a/js/src/modals/Transfer/store.js
+++ b/js/src/modals/Transfer/store.js
@@ -107,10 +107,9 @@ export default class TransferStore {
constructor (api, props) {
this.api = api;
- const { account, balance, gasLimit, senders, onClose, newError, sendersBalances } = props;
+ const { account, balance, gasLimit, senders, newError, sendersBalances } = props;
this.account = account;
this.balance = balance;
- this.onClose = onClose;
this.isWallet = account && account.wallet;
this.newError = newError;
@@ -136,8 +135,7 @@ export default class TransferStore {
this.stage -= 1;
}
- @action onClose = () => {
- this.onClose && this.onClose();
+ @action handleClose = () => {
this.stage = 0;
}
diff --git a/js/src/modals/Transfer/transfer.js b/js/src/modals/Transfer/transfer.js
index 00e84adaf..0c96a1168 100644
--- a/js/src/modals/Transfer/transfer.js
+++ b/js/src/modals/Transfer/transfer.js
@@ -208,7 +208,7 @@ class Transfer extends Component {
}
label='Cancel'
- onClick={ this.store.onClose } />
+ onClick={ this.handleClose } />
);
const nextBtn = (
}
label='Close'
- onClick={ this.store.onClose } />
+ onClick={ this.handleClose } />
);
switch (stage) {
@@ -264,6 +264,13 @@ class Transfer extends Component {
);
}
+
+ handleClose = () => {
+ const { onClose } = this.props;
+
+ this.store.handleClose();
+ typeof onClose === 'function' && onClose();
+ }
}
function mapStateToProps (initState, initProps) {