diff options
Diffstat (limited to 'ui/app/components/send')
-rw-r--r-- | ui/app/components/send/send.component.js | 5 | ||||
-rw-r--r-- | ui/app/components/send/send.container.js | 8 |
2 files changed, 11 insertions, 2 deletions
diff --git a/ui/app/components/send/send.component.js b/ui/app/components/send/send.component.js index 8305a288e..80b50fad4 100644 --- a/ui/app/components/send/send.component.js +++ b/ui/app/components/send/send.component.js @@ -179,6 +179,11 @@ export default class SendTransactionScreen extends PersistentForm { // Show QR Scanner modal if ?scan=true if (window.location.search === '?scan=true') { this.props.scanQrCode() + + // Clear the queryString param after showing the modal + const cleanUrl = location.href.split('?')[0] + history.pushState({}, null, `${cleanUrl}`) + window.location.hash = '#send' } } diff --git a/ui/app/components/send/send.container.js b/ui/app/components/send/send.container.js index 1fb771974..25abb706c 100644 --- a/ui/app/components/send/send.container.js +++ b/ui/app/components/send/send.container.js @@ -28,7 +28,7 @@ import { updateSendTokenBalance, updateGasData, setGasTotal, - showModal, + showQrScanner, } from '../../actions' import { resetSendState, @@ -38,6 +38,10 @@ import { calcGasTotal, } from './send.utils.js' +import { + SEND_ROUTE, +} from '../../routes' + module.exports = compose( withRouter, connect(mapStateToProps, mapDispatchToProps) @@ -93,7 +97,7 @@ function mapDispatchToProps (dispatch) { }, updateSendErrors: newError => dispatch(updateSendErrors(newError)), resetSendState: () => dispatch(resetSendState()), - scanQrCode: () => dispatch(showModal({ name: 'QR_SCANNER' })), + scanQrCode: () => dispatch(showQrScanner(SEND_ROUTE)), updateSendTo: (to, nickname) => dispatch(updateSendTo(to, nickname)), } } |