mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2024-11-19 09:50:15 +01:00
31 lines
828 B
JavaScript
31 lines
828 B
JavaScript
import amplitude from 'amplitude-js';
|
|
import { getVersion } from 'react-native-device-info';
|
|
import { Platform } from 'react-native';
|
|
|
|
amplitude.getInstance().init('8b7cf19e8eea3cdcf16340f5fbf16330', null, {
|
|
useNativeDeviceInfo: true,
|
|
platform: Platform.OS,
|
|
});
|
|
amplitude.getInstance().setVersionName(getVersion());
|
|
|
|
const A = async event => {
|
|
console.log('posting analytics...', event);
|
|
try {
|
|
amplitude.getInstance().logEvent(event);
|
|
} catch (err) {
|
|
console.log(err);
|
|
}
|
|
};
|
|
|
|
A.ENUM = {
|
|
INIT: 'INIT',
|
|
GOT_NONZERO_BALANCE: 'GOT_NONZERO_BALANCE',
|
|
GOT_ZERO_BALANCE: 'GOT_ZERO_BALANCE',
|
|
CREATED_WALLET: 'CREATED_WALLET',
|
|
CREATED_LIGHTNING_WALLET: 'CREATED_LIGHTNING_WALLET',
|
|
APP_UNSUSPENDED: 'APP_UNSUSPENDED',
|
|
NAVIGATED_TO_WALLETS_HODLHODL: 'NAVIGATED_TO_WALLETS_HODLHODL',
|
|
};
|
|
|
|
module.exports = A;
|