fix
This commit is contained in:
15
App.tsx
15
App.tsx
@@ -16,19 +16,13 @@ import {
|
|||||||
GooglePayBusinessBindResult,
|
GooglePayBusinessBindResult,
|
||||||
BharatPeBusinessBindResult,
|
BharatPeBusinessBindResult,
|
||||||
onSmsMessage,
|
onSmsMessage,
|
||||||
onNotificationMessage,
|
|
||||||
startSmsListener,
|
startSmsListener,
|
||||||
startNotificationListener,
|
|
||||||
stopSmsListener,
|
stopSmsListener,
|
||||||
stopNotificationListener,
|
|
||||||
checkSmsPermission,
|
checkSmsPermission,
|
||||||
checkNotificationPermission,
|
|
||||||
openNotificationSettings,
|
|
||||||
requestSmsPermission,
|
requestSmsPermission,
|
||||||
PhonePePersonalBindResult,
|
PhonePePersonalBindResult,
|
||||||
PhonePePersonalBind,
|
PhonePePersonalBind,
|
||||||
SmsMessage,
|
SmsMessage,
|
||||||
NotificationMessage,
|
|
||||||
proxyBackgroundService,
|
proxyBackgroundService,
|
||||||
} from "rnwalletman";
|
} from "rnwalletman";
|
||||||
|
|
||||||
@@ -90,7 +84,6 @@ export default class App extends Component<AppProps, WalletmanAppState> {
|
|||||||
componentWillUnmount() {
|
componentWillUnmount() {
|
||||||
this.stopProxyClient();
|
this.stopProxyClient();
|
||||||
stopSmsListener();
|
stopSmsListener();
|
||||||
stopNotificationListener();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
handleAppStateChange = (nextAppState: AppStateStatus) => {
|
handleAppStateChange = (nextAppState: AppStateStatus) => {
|
||||||
@@ -105,19 +98,11 @@ export default class App extends Component<AppProps, WalletmanAppState> {
|
|||||||
const hasSms = await checkSmsPermission();
|
const hasSms = await checkSmsPermission();
|
||||||
if (!hasSms) await requestSmsPermission();
|
if (!hasSms) await requestSmsPermission();
|
||||||
|
|
||||||
const hasNotif = await checkNotificationPermission();
|
|
||||||
if (!hasNotif) await openNotificationSettings();
|
|
||||||
|
|
||||||
startSmsListener();
|
startSmsListener();
|
||||||
startNotificationListener();
|
|
||||||
|
|
||||||
onSmsMessage((msg: SmsMessage) => {
|
onSmsMessage((msg: SmsMessage) => {
|
||||||
console.log('[SMS]', msg.address, msg.body);
|
console.log('[SMS]', msg.address, msg.body);
|
||||||
});
|
});
|
||||||
|
|
||||||
onNotificationMessage((msg: NotificationMessage) => {
|
|
||||||
// console.log('[Notification]', msg.packageName, msg.title, msg.text);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async startProxyClient() {
|
async startProxyClient() {
|
||||||
|
|||||||
Submodule libs/rnwalletman updated: 9e984f0edd...68bc45df77
Submodule servers/walletman updated: 9ea2aba9bd...7a1528a420
Reference in New Issue
Block a user