Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
owencraston committed Jun 5, 2023
1 parent 1f6c0d1 commit cd424c8
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 44 deletions.
1 change: 0 additions & 1 deletion app/components/Nav/Main/MainNavigator.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ import CheckoutWebView from '../../UI/FiatOnRampAggregator/Views/Checkout';
import OnRampSettings from '../../UI/FiatOnRampAggregator/Views/Settings';
import OnrampAddActivationKey from '../../UI/FiatOnRampAggregator/Views/Settings/AddActivationKey';
import Regions from '../../UI/FiatOnRampAggregator/Views/Regions';
import ThemeSettings from '../../Views/ThemeSettings';
import { colors as importedColors } from '../../../styles/common';
import OrderDetails from '../../UI/FiatOnRampAggregator/Views/OrderDetails';
import TabBar from '../../../component-library/components/Navigation/TabBar';
Expand Down
20 changes: 0 additions & 20 deletions app/components/UI/DrawerView/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -665,17 +665,6 @@ class DrawerView extends PureComponent {
this.hideDrawer();
this.trackEvent(MetaMetricsEvents.WALLET_OPENED);
};
goToTransactionHistory = () => {
this.props.navigation.navigate('TransactionsHome');
this.hideDrawer();
this.trackEvent(MetaMetricsEvents.NAVIGATION_TAPS_TRANSACTION_HISTORY);
};

showSettings = async () => {
this.props.navigation.navigate('SettingsView');
this.hideDrawer();
this.trackEvent(MetaMetricsEvents.NAVIGATION_TAPS_SETTINGS);
};

onPressLock = async () => {
const { passwordSet } = this.props;
Expand Down Expand Up @@ -874,15 +863,6 @@ class DrawerView extends PureComponent {
blockExplorerName = getBlockExplorerName(blockExplorer);
}
return [
[
{
name: strings('drawer.transaction_activity'),
icon: this.getFeatherIcon('list'),
selectedIcon: this.getSelectedFeatherIcon('list'),
action: this.goToTransactionHistory,
routeNames: ['TransactionsView'],
},
],
[
{
name: strings('drawer.share_address'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ const testSnaps = {
};

export const createSnapsSettingsListNavDetails = createNavigationDetails(
'SettingsFlow',
Routes.SNAPS.SNAPS_SETTINGS_LIST,
);

Expand Down
42 changes: 22 additions & 20 deletions app/core/Engine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,27 @@ class Engine {
}),
});

const permissionController = new PermissionController({
messenger: this.controllerMessenger.getRestricted({
name: 'PermissionController',
allowedActions: [
`${approvalController.name}:addRequest`,
`${approvalController.name}:hasRequest`,
`${approvalController.name}:acceptRequest`,
`${approvalController.name}:rejectRequest`,
],
}),
state: initialState.PermissionController,
caveatSpecifications: getCaveatSpecifications({ getIdentities }),
permissionSpecifications: {
...getPermissionSpecifications({
getAllAccounts: () => keyringController.getAccounts(),
}),
...getSnapPermissionSpecifications(),
},
unrestrictedMethods,
});

const subjectMetadataController = new SubjectMetadataController({
messenger: this.controllerMessenger.getRestricted({
name: 'SubjectMetadataController',
Expand Down Expand Up @@ -604,26 +625,7 @@ class Engine {
),
gasFeeController,
approvalController,
new PermissionController({
messenger: this.controllerMessenger.getRestricted({
name: 'PermissionController',
allowedActions: [
`${approvalController.name}:addRequest`,
`${approvalController.name}:hasRequest`,
`${approvalController.name}:acceptRequest`,
`${approvalController.name}:rejectRequest`,
],
}),
state: initialState.PermissionController,
caveatSpecifications: getCaveatSpecifications({ getIdentities }),
permissionSpecifications: {
...getPermissionSpecifications({
getAllAccounts: () => keyringController.getAccounts(),
}),
...getSnapPermissionSpecifications(),
},
unrestrictedMethods,
}),
permissionController,
new SignatureController({
messenger: this.controllerMessenger.getRestricted({
name: 'SignatureController',
Expand Down
4 changes: 2 additions & 2 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -780,7 +780,7 @@ EXTERNAL SOURCES:

SPEC CHECKSUMS:
boost: a7c83b31436843459a1961bfd74b96033dc77234
Branch: 74cc856025984f691833c8fa332834ac38a0cf4e
Branch: 4ac024cb3c29b0ef628048694db3c4cfa679beb0
BVLinearGradient: e3aad03778a456d77928f594a649e96995f1c872
CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99
DoubleConversion: 831926d9b8bf8166fd87886c4abab286c2422662
Expand Down Expand Up @@ -878,4 +878,4 @@ SPEC CHECKSUMS:

PODFILE CHECKSUM: 524f72007cf8a959f1ddbac574733c5a9b242648

COCOAPODS: 1.12.0
COCOAPODS: 1.12.1

0 comments on commit cd424c8

Please sign in to comment.