Skip to content

Commit

Permalink
Merge pull request #2735 from myxmaster/remove-unsafe-componentwillmo…
Browse files Browse the repository at this point in the history
…unt-from-wallet

Wallet.tsx: Remove UNSAFE_componentWillMount()
  • Loading branch information
kaloudis authored Jan 14, 2025
2 parents c49a6a5 + 06cfaef commit b84ae47
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 b84ae47

Please sign in to comment.