Turn off full screen vs popup a/b test

feature/default_network_editable
Dan Miller 5 years ago
parent 4f9ea17185
commit 51cc2faf56
  1. 18
      app/scripts/background.js
  2. 4
      ui/app/pages/confirm-transaction/confirm-transaction.container.js

@ -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…
Cancel
Save