Skip to content

Commit

Permalink
remove UNSAFE_componentWillMount()
Browse files Browse the repository at this point in the history
  • Loading branch information
myxmaster committed Jan 12, 2025
1 parent 6c15a61 commit 06cfaef
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions views/Wallet/Wallet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -162,16 +162,6 @@ export default class Wallet extends React.Component<WalletProps, WalletState> {
});
}

async UNSAFE_componentWillMount(): Promise<void> {
const {
SettingsStore: { updateSettings }
} = this.props;

const supportedBiometryType = await getSupportedBiometryType();

await updateSettings({ supportedBiometryType });
}

private handleBackButton() {
const tabNavigator = this.tabNavigationRef.current;
if (!tabNavigator) {
Expand Down Expand Up @@ -215,6 +205,14 @@ export default class Wallet extends React.Component<WalletProps, WalletState> {
'change',
this.handleAppStateChange
);

const {
SettingsStore: { updateSettings }
} = this.props;

const supportedBiometryType = await getSupportedBiometryType();

await updateSettings({ supportedBiometryType });
}

componentWillUnmount() {
Expand Down

0 comments on commit 06cfaef

Please sign in to comment.