mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Merge branch 'MM-806-new-ui-first-time-import-seed-in-popup' of https://github.com/danjm/metamask-extension into MM-806-new-ui-first-time-import-seed-in-popup
This commit is contained in:
commit
3fb9e04f5f
@ -56,7 +56,7 @@ class NonceTracker {
|
||||
const blockTracker = this._getBlockTracker()
|
||||
const currentBlock = blockTracker.getCurrentBlock()
|
||||
if (currentBlock) return currentBlock
|
||||
return await Promise((reject, resolve) => {
|
||||
return await new Promise((reject, resolve) => {
|
||||
blockTracker.once('latest', resolve)
|
||||
})
|
||||
}
|
||||
|
@ -7,7 +7,6 @@ import NoticeScreen from './notice-screen'
|
||||
import BackupPhraseScreen from './backup-phrase-screen'
|
||||
import ImportAccountScreen from './import-account-screen'
|
||||
import ImportSeedPhraseScreen from './import-seed-phrase-screen'
|
||||
const Loading = require('../../../../ui/app/components/loading')
|
||||
import {
|
||||
onboardingBuyEthView,
|
||||
unMarkPasswordForgotten,
|
||||
@ -85,15 +84,9 @@ class FirstTimeFlow extends Component {
|
||||
address,
|
||||
restoreCreatePasswordScreen,
|
||||
forgottenPassword,
|
||||
isLoading,
|
||||
leaveImportSeedScreenState,
|
||||
} = this.props
|
||||
|
||||
// Disable until testing bug resolved
|
||||
// if (isLoading) {
|
||||
// return (<Loading />)
|
||||
// }
|
||||
|
||||
switch (this.state.screenType) {
|
||||
case SCREEN_TYPE.CREATE_PASSWORD:
|
||||
return (
|
||||
@ -164,9 +157,6 @@ export default connect(
|
||||
noActiveNotices,
|
||||
selectedAddress,
|
||||
forgottenPassword,
|
||||
},
|
||||
appState: {
|
||||
isLoading,
|
||||
}
|
||||
}) => ({
|
||||
isInitialized,
|
||||
@ -174,7 +164,6 @@ export default connect(
|
||||
noActiveNotices,
|
||||
address: selectedAddress,
|
||||
forgottenPassword,
|
||||
isLoading,
|
||||
}),
|
||||
dispatch => ({
|
||||
leaveImportSeedScreenState: () => dispatch(unMarkPasswordForgotten()),
|
||||
|
@ -6,6 +6,7 @@ import debounce from 'lodash.debounce'
|
||||
import {markNoticeRead} from '../../../../ui/app/actions'
|
||||
import Identicon from '../../../../ui/app/components/identicon'
|
||||
import Breadcrumbs from './breadcrumbs'
|
||||
import LoadingScreen from './loading-screen'
|
||||
|
||||
class NoticeScreen extends Component {
|
||||
static propTypes = {
|
||||
@ -55,11 +56,14 @@ class NoticeScreen extends Component {
|
||||
const {
|
||||
address,
|
||||
lastUnreadNotice: { title, body },
|
||||
isLoading,
|
||||
} = this.props
|
||||
const { atBottom } = this.state
|
||||
|
||||
return (
|
||||
<div
|
||||
isLoading
|
||||
? <LoadingScreen />
|
||||
: <div
|
||||
className="tou"
|
||||
onScroll={this.onScroll}
|
||||
>
|
||||
@ -84,7 +88,7 @@ class NoticeScreen extends Component {
|
||||
}
|
||||
|
||||
export default connect(
|
||||
({ metamask: { selectedAddress, lastUnreadNotice } }) => ({
|
||||
({ metamask: { selectedAddress, lastUnreadNotice }, appState: { isLoading } }) => ({
|
||||
lastUnreadNotice,
|
||||
address: selectedAddress,
|
||||
}),
|
||||
|
@ -456,7 +456,9 @@ App.prototype.renderPrimary = function () {
|
||||
// notices
|
||||
if (!props.noActiveNotices) {
|
||||
log.debug('rendering notice screen for unread notices.')
|
||||
return h('div', [
|
||||
return h('div', {
|
||||
style: { width: '100%' },
|
||||
}, [
|
||||
|
||||
h(NoticeScreen, {
|
||||
notice: props.lastUnreadNotice,
|
||||
|
@ -60,7 +60,8 @@ PendingTx.prototype.render = function () {
|
||||
// Gas
|
||||
const gas = txParams.gas
|
||||
const gasBn = hexToBn(gas)
|
||||
const gasLimit = new BN(parseInt(blockGasLimit))
|
||||
// default to 8MM gas limit
|
||||
const gasLimit = new BN(parseInt(blockGasLimit) || '8000000')
|
||||
const safeGasLimitBN = this.bnMultiplyByFraction(gasLimit, 19, 20)
|
||||
const saferGasLimitBN = this.bnMultiplyByFraction(gasLimit, 18, 20)
|
||||
const safeGasLimit = safeGasLimitBN.toString(10)
|
||||
|
@ -853,7 +853,6 @@ function markPasswordForgotten () {
|
||||
function unMarkPasswordForgotten () {
|
||||
return (dispatch) => {
|
||||
return background.unMarkPasswordForgotten(() => {
|
||||
dispatch(actions.hideLoadingIndication())
|
||||
dispatch(actions.forgotPassword())
|
||||
forceUpdateMetamaskState(dispatch)
|
||||
})
|
||||
|
@ -105,8 +105,7 @@ Notice.prototype.render = function () {
|
||||
h('button.primary', {
|
||||
disabled,
|
||||
onClick: () => {
|
||||
this.setState({disclaimerDisabled: true})
|
||||
onConfirm()
|
||||
this.setState({disclaimerDisabled: true}, () => onConfirm())
|
||||
},
|
||||
style: {
|
||||
marginTop: '18px',
|
||||
|
Loading…
Reference in New Issue
Block a user