mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Turn off full screen vs popup a/b test (#7298)
This commit is contained in:
parent
4f9ea17185
commit
55bc9936c6
@ -233,13 +233,11 @@ function setupController (initState, initLangCode) {
|
|||||||
//
|
//
|
||||||
// MetaMask Controller
|
// MetaMask Controller
|
||||||
//
|
//
|
||||||
const { ABTestController = {} } = initState
|
|
||||||
const { abTests = {} } = ABTestController
|
|
||||||
|
|
||||||
const controller = new MetamaskController({
|
const controller = new MetamaskController({
|
||||||
// User confirmation callbacks:
|
// User confirmation callbacks:
|
||||||
showUnconfirmedMessage: triggerUi,
|
showUnconfirmedMessage: triggerUi,
|
||||||
showUnapprovedTx: abTests.fullScreenVsPopup === 'fullScreen' ? triggerUiInNewTab : triggerUi,
|
showUnapprovedTx: triggerUi,
|
||||||
openPopup: openPopup,
|
openPopup: openPopup,
|
||||||
closePopup: notificationManager.closePopup.bind(notificationManager),
|
closePopup: notificationManager.closePopup.bind(notificationManager),
|
||||||
// initial state
|
// initial state
|
||||||
@ -443,20 +441,6 @@ function triggerUi () {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Opens a new browser tab for user confirmation
|
|
||||||
*/
|
|
||||||
function triggerUiInNewTab () {
|
|
||||||
const tabIdsArray = Object.keys(openMetamaskTabsIDs)
|
|
||||||
if (tabIdsArray.length) {
|
|
||||||
extension.tabs.update(parseInt(tabIdsArray[0], 10), { 'active': true }, () => {
|
|
||||||
extension.tabs.reload(parseInt(tabIdsArray[0], 10))
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
platform.openExtensionInBrowser()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Opens the browser popup for user confirmation of watchAsset
|
* Opens the browser popup for user confirmation of watchAsset
|
||||||
* then it waits until user interact with the UI
|
* then it waits until user interact with the UI
|
||||||
|
@ -36,9 +36,9 @@ const mapStateToProps = (state, ownProps) => {
|
|||||||
const transaction = totalUnconfirmed
|
const transaction = totalUnconfirmed
|
||||||
? unapprovedTxs[id] || unconfirmedTransactions[totalUnconfirmed - 1]
|
? unapprovedTxs[id] || unconfirmedTransactions[totalUnconfirmed - 1]
|
||||||
: {}
|
: {}
|
||||||
const { id: transactionId, transactionCategory, origin } = transaction
|
const { id: transactionId, transactionCategory } = transaction
|
||||||
|
|
||||||
const trackABTest = origin !== 'MetaMask'
|
const trackABTest = false
|
||||||
|
|
||||||
return {
|
return {
|
||||||
totalUnapprovedCount: totalUnconfirmed,
|
totalUnapprovedCount: totalUnconfirmed,
|
||||||
|
Loading…
Reference in New Issue
Block a user