Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Turn off full screen vs popup a/b test #7298

Merged
merged 1 commit into from
Oct 21, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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