Skip to content

Commit

Permalink
Turn off full screen vs popup a/b test
Browse files Browse the repository at this point in the history
  • Loading branch information
danjm committed Oct 21, 2019
1 parent 4f9ea17 commit cda9e3f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 19 deletions.
18 changes: 1 addition & 17 deletions app/scripts/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -233,13 +233,11 @@ function setupController (initState, initLangCode) {
//
// MetaMask Controller
//
const { ABTestController = {} } = initState
const { abTests = {} } = ABTestController

const controller = new MetamaskController({
// User confirmation callbacks:
showUnconfirmedMessage: triggerUi,
showUnapprovedTx: abTests.fullScreenVsPopup === 'fullScreen' ? triggerUiInNewTab : triggerUi,
showUnapprovedTx: triggerUi,
openPopup: openPopup,
closePopup: notificationManager.closePopup.bind(notificationManager),
// initial state
Expand Down Expand Up @@ -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
* then it waits until user interact with the UI
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ const mapStateToProps = (state, ownProps) => {
const transaction = totalUnconfirmed
? unapprovedTxs[id] || unconfirmedTransactions[totalUnconfirmed - 1]
: {}
const { id: transactionId, transactionCategory, origin } = transaction
const { id: transactionId, transactionCategory } = transaction

const trackABTest = origin !== 'MetaMask'
const trackABTest = false

return {
totalUnapprovedCount: totalUnconfirmed,
Expand Down

0 comments on commit cda9e3f

Please sign in to comment.