diff options
author | bitpshr <mail@bitpshr.net> | 2018-09-28 02:19:09 +0800 |
---|---|---|
committer | Dan Finlay <542863+danfinlay@users.noreply.github.com> | 2018-11-06 07:07:09 +0800 |
commit | c76c9ca2c86317f902f443db2c5704d4bf6311c0 (patch) | |
tree | e6b182dd8b0eb849d93143ecbd1217640aa8f490 /ui/app/components/pages/home | |
parent | 2d4ff1dd82252cbe1abe06206fb2664f96905d91 (diff) | |
download | tangerine-wallet-browser-c76c9ca2c86317f902f443db2c5704d4bf6311c0.tar.gz tangerine-wallet-browser-c76c9ca2c86317f902f443db2c5704d4bf6311c0.tar.zst tangerine-wallet-browser-c76c9ca2c86317f902f443db2c5704d4bf6311c0.zip |
EIP-1102: updated implementation
Diffstat (limited to 'ui/app/components/pages/home')
-rw-r--r-- | ui/app/components/pages/home/home.component.js | 8 | ||||
-rw-r--r-- | ui/app/components/pages/home/home.container.js | 2 |
2 files changed, 10 insertions, 0 deletions
diff --git a/ui/app/components/pages/home/home.component.js b/ui/app/components/pages/home/home.component.js index d3c71c4f6..7b64ebc4e 100644 --- a/ui/app/components/pages/home/home.component.js +++ b/ui/app/components/pages/home/home.component.js @@ -4,6 +4,8 @@ import Media from 'react-media' import { Redirect } from 'react-router-dom' import WalletView from '../../wallet-view' import TransactionView from '../../transaction-view' +import ProviderApproval from '../provider-approval' + import { INITIALIZE_BACKUP_PHRASE_ROUTE, RESTORE_VAULT_ROUTE, @@ -21,6 +23,7 @@ export default class Home extends PureComponent { seedWords: PropTypes.string, suggestedTokens: PropTypes.object, unconfirmedTransactionsCount: PropTypes.number, + providerRequests: PropTypes.array, } componentDidMount () { @@ -46,6 +49,7 @@ export default class Home extends PureComponent { lostAccounts, forgottenPassword, seedWords, + providerRequests, } = this.props // notices @@ -62,6 +66,10 @@ export default class Home extends PureComponent { return <Redirect to={{ pathname: RESTORE_VAULT_ROUTE }} /> } + if (providerRequests && providerRequests.length > 0) { + return <ProviderApproval origin={providerRequests[0].origin} /> + } + return ( <div className="main-container"> <div className="account-and-transaction-details"> diff --git a/ui/app/components/pages/home/home.container.js b/ui/app/components/pages/home/home.container.js index 58001df6b..bb8cf5e81 100644 --- a/ui/app/components/pages/home/home.container.js +++ b/ui/app/components/pages/home/home.container.js @@ -11,6 +11,7 @@ const mapStateToProps = state => { lostAccounts, seedWords, suggestedTokens, + providerRequests, } = metamask const { forgottenPassword } = appState @@ -21,6 +22,7 @@ const mapStateToProps = state => { seedWords, suggestedTokens, unconfirmedTransactionsCount: unconfirmedTransactionsCountSelector(state), + providerRequests, } } |