Skip to content

Commit

Permalink
feat(handle bitcoin links for payment)
Browse files Browse the repository at this point in the history
  • Loading branch information
sixtedemaupeou committed Jun 11, 2018
1 parent bf3fd7c commit 4ba6b5b
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
Expand Up @@ -16,7 +16,6 @@ class ActionsContainer extends React.PureComponent {

componentWillMount () {
const { payload } = this.props.match.params

try {
if (startsWith('bitcoin', payload)) {
// Special case to handle bitcoin bip21 link integration
Expand Down
@@ -1,7 +1,6 @@

import React from 'react'
import ui from 'redux-ui'
import config from 'config'

import BitcoinLinkHandling from './template.js'

Expand All @@ -14,7 +13,7 @@ class BitcoinLinkHandlingContainer extends React.PureComponent {
handleClick () {
this.props.updateUI({ warningDisplayed: true })
// Register bitcoin links
window.navigator.registerProtocolHandler('bitcoin', `${config.ROOT_URL}a/%s`, 'Blockchain')
window.navigator.registerProtocolHandler('bitcoin', '/open/%s', 'Blockchain')
}

render () {
Expand Down
2 changes: 1 addition & 1 deletion packages/blockchain-wallet-v4-frontend/src/scenes/app.js
Expand Up @@ -43,7 +43,7 @@ class App extends React.PureComponent {
<ThemeProvider>
<ConnectedRouter history={history}>
<Switch>
<PublicLayout path='/a/:payload' component={Goals} />
<PublicLayout path='/open/:payload' component={Goals} />
<PublicLayout path='/login' component={Login} />
<PublicLayout path='/help' component={Help} />
<PublicLayout path='/open' component={Open} />
Expand Down

0 comments on commit 4ba6b5b

Please sign in to comment.