Skip to content

Commit

Permalink
remove nested fencing in favor of different check for flask
Browse files Browse the repository at this point in the history
  • Loading branch information
hmalik88 committed Sep 18, 2023
1 parent b1330ed commit 38091a3
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions app/scripts/metamask-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -1914,13 +1914,12 @@ export default class MetamaskController extends EventEmitter {
*/
handleSnapRequest(args) {
// we're not tracking at this point in flask because we eagerly fetch insights in v2
///: BEGIN:ONLY_INCLUDE_IN(build-flask)
if (args.handler !== HandlerType.OnTransaction) {
///: END:ONLY_INCLUDE_IN
if (
args.handler !== HandlerType.OnTransaction &&
!process.env.ALLOW_LOCAL_SNAPS
) {
this._trackSnapExportUsage(args.snapId, args.handler);
///: BEGIN:ONLY_INCLUDE_IN(build-flask)
}
///: END:ONLY_INCLUDE_IN

return this.controllerMessenger.call('SnapController:handleRequest', args);
}
Expand Down

0 comments on commit 38091a3

Please sign in to comment.