Skip to content
Commits on Source (8)
......@@ -5,18 +5,15 @@
* @format
* @flow
*/
import './global';
import './shim'
import crypto from "crypto"; // DO NOT REMOVE!
import React, {
Component
Component,
} from 'react';
import {
Observer,
Provider,
} from 'mobx-react/native' // import from mobx-react/native instead of mobx-react fix test
} from 'mobx-react/native'; // import from mobx-react/native instead of mobx-react fix test
import NavigationService from './src/navigation/NavigationService';
......@@ -27,11 +24,10 @@ import {
Linking,
Text,
Alert,
Clipboard,
Clipboard
} from 'react-native';
import FlashMessage from "react-native-flash-message";
import CookieManager from 'react-native-cookies';
import KeychainModalScreen from './src/keychain/KeychainModalScreen';
import BlockchainTransactionModalScreen from './src/blockchain/transaction-modal/BlockchainTransactionModalScreen';
......@@ -39,7 +35,7 @@ import NavigationStack from './src/navigation/NavigationStack';
import stores from './AppStores';
import './AppErrors';
import './src/common/services/socket.service';
import pushService from './src/common/services/push.service';
// import pushService from './src/common/services/push.service'; //TODO: fix for 0.61
import mindsService from './src/common/services/minds.service';
import featureService from './src/common/services/features.service';
import receiveShare from './src/common/services/receive-share.service';
......@@ -63,16 +59,17 @@ import connectivityService from './src/common/services/connectivity.service';
import sqliteStorageProviderService from './src/common/services/sqlite-storage-provider.service';
import commentStorageService from './src/comments/CommentStorageService';
import * as Sentry from '@sentry/react-native';
import apiService from './src/common/services/api.service';
let deepLinkUrl = '';
// init push service
pushService.init();
//pushService.init(); //TODO: fix for 0.61
// fire sqlite init
sqliteStorageProviderService.get();
CookieManager.clearAll();
apiService.clearCookies();
// On app login (runs if the user login or if it is already logged in)
sessionService.onLogin(async () => {
......@@ -93,7 +90,7 @@ sessionService.onLogin(async () => {
// register device token into backend on login
pushService.registerToken();
// pushService.registerToken(); //TODO: fix for 0.61
// get onboarding progress
const onboarding = results[1];
......@@ -121,7 +118,7 @@ sessionService.onLogin(async () => {
}
// handle initial notifications (if the app is opened by tap on one)
pushService.handleInitialNotification();
// pushService.handleInitialNotification(); //TODO: fix for 0.61
// handle shared
receiveShare.handle();
......
......@@ -75,7 +75,7 @@ import com.android.build.OutputFile
project.ext.react = [
bundleCommand: "ram-bundle",
entryFile: "index.js",
bundleAssetName: "app.bundle",
// bundleAssetName: "app.bundle",
enableHermes: false, // clean and rebuild if changing
]
......@@ -135,8 +135,6 @@ android {
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode Integer.parseInt(project.versionCode)
versionName project.versionName
renderscriptTargetApi 21
renderscriptSupportModeEnabled true
}
signingConfigs {
debug {
......@@ -154,7 +152,7 @@ android {
}
}
}
splits {
splits {
abi {
reset()
enable enableSeparateBuildPerCPUArchitecture
......@@ -187,23 +185,28 @@ android {
}
}
packagingOptions {
pickFirst '**/libjsc.so'
pickFirst '**/libc++_shared.so'
}
// packagingOptions {
// pickFirst '**/libjsc.so'
// pickFirst '**/libc++_shared.so'
// }
}
dependencies {
implementation project(':react-native-randombytes')
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation "com.facebook.react:react-native:+" // From node_modules
// react-native-screens need both
implementation 'androidx.appcompat:appcompat:1.1.0-rc01'
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0-alpha02'
implementation project(':tipsi-stripe')
implementation project(':react-native-notifications')
// implementation project(':@react-native-community_netinfo')
// implementation project(':react-native-notifications')
implementation project(':rn-apk')
implementation project(':react-native-gesture-handler')
implementation project(':react-native-cookies')
compile project(':react-native-background-timer')
implementation 'com.google.firebase:firebase-core:16.0.7'
implementation 'com.google.firebase:firebase-messaging:17.3.3' // IMPORTANT: fix the crash when the app receives a push notification
......@@ -217,29 +220,21 @@ dependencies {
// // exclude group: 'com.facebook.react',module:'react-native-google-signin'
// exclude group: 'com.google.firebase'
// }
implementation project(':react-native-sqlite-storage')
implementation project(':react-native-background-timer')
implementation project(':react-native-fs')
implementation project(':react-native-media-meta')
implementation project(':react-native-share-menu')
implementation project(':react-native-keep-awake')
// implementation project(':react-native-udp')
implementation project(':react-native-tcp')
implementation project(':react-native-randombytes')
implementation project(':react-native-os')
implementation project(':react-native-minds-encryption')
implementation project(':react-native-video-exoplayer')
implementation project(':react-native-photo-view')
implementation project(':react-native-exception-handler')
implementation fileTree(dir: "libs", include: ["*.jar"])
// implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
implementation "com.facebook.react:react-native:0.59.10" // From node_modules
// implementation 'com.google.android.gms:play-services-auth:16.0.1'
implementation 'com.facebook.fresco:imagepipeline-okhttp3:1.10.0'
implementation 'com.facebook.fresco:animated-gif:1.10.0'
implementation 'com.facebook.fresco:animated-webp:1.10.0'
implementation 'com.facebook.fresco:webpsupport:1.10.0'
implementation 'com.facebook.fresco:fresco:1.10.0'
// implementation 'com.facebook.fresco:imagepipeline-okhttp3:1.10.0'
// implementation 'com.facebook.fresco:animated-gif:1.10.0'
// implementation 'com.facebook.fresco:animated-webp:1.10.0'
// implementation 'com.facebook.fresco:webpsupport:1.10.0'
// implementation 'com.facebook.fresco:fresco:1.10.0'
if (enableHermes) {
def hermesPath = "../../node_modules/hermes-engine/android/";
......
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.minds.mobile"
android:versionCode="20180124001"
android:versionName="3.0.0">
>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.CAMERA" />
......@@ -79,7 +78,7 @@
<activity android:name="com.reactnativejitsimeet.JitsiMeetNavigatorActivity" />
<meta-data android:name="com.google.firebase.messaging.default_notification_icon" android:resource="@drawable/ic_stat_name" />
<provider
android:name="android.support.v4.content.FileProvider"
android:name="androidx.core.content.FileProvider"
android:authorities="${applicationId}.fileprovider"
android:exported="false"
android:grantUriPermissions="true"
......
......@@ -6,34 +6,20 @@ import android.content.Context;
import com.facebook.react.PackageList;
import com.facebook.react.ReactApplication;
import com.gettipsi.stripe.StripeReactPackage;
import com.reactnativejitsimeet.JitsiMeetPackage;
import com.wix.reactnativenotifications.RNNotificationsPackage;
import com.reactnativecommunity.netinfo.NetInfoPackage;
import com.swmansion.rnscreens.RNScreensPackage;
import be.skyzohlabs.rnapk.ReactNativeAPKPackage;
import com.swmansion.gesturehandler.react.RNGestureHandlerPackage;
import com.psykar.cookiemanager.CookieManagerPackage;
import com.peel.react.TcpSocketsModule;
import com.bitgo.randombytes.RandomBytesPackage;
import com.peel.react.rnos.RNOSModule;
// import com.wix.reactnativenotifications.RNNotificationsPackage;
import com.minds.crypto.CryptoPackage;
import com.brentvatne.react.ReactVideoPackage;
import com.masteratul.exceptionhandler.ReactNativeExceptionHandlerPackage;
import com.facebook.react.ReactNativeHost;
import com.facebook.react.ReactPackage;
import com.facebook.soloader.SoLoader;
import com.reactnative.photoview.PhotoViewPackage;
import com.corbt.keepawake.KCKeepAwakePackage;
import cl.json.ShareApplication;
import com.meedan.ShareMenuPackage;
import com.mybigday.rnmediameta.RNMediaMetaPackage;
import com.rnfs.RNFSPackage;
import com.reactnativejitsimeet.JitsiMeetPackage;
import com.ocetnik.timer.BackgroundTimerPackage;
import org.pgsqlite.SQLitePluginPackage;
import java.util.List;
import javax.annotation.Nullable;
import java.lang.reflect.InvocationTargetException;
public class MainApplication extends Application implements ShareApplication, ReactApplication {
......@@ -50,21 +36,13 @@ public class MainApplication extends Application implements ShareApplication, Re
List<ReactPackage> packages = new PackageList(this).getPackages();
// Packages that cannot be autolinked yet can be added manually here, for example:
// packages.add(new MyReactNativePackage());
packages.add(new CookieManagerPackage());
packages.add(new RNExitAppPackage());
packages.add(new TcpSocketsModule());
packages.add(new RandomBytesPackage());
packages.add(new RNOSModule());
packages.add(new BackgroundTimerPackage());
packages.add(new CryptoPackage());
packages.add(new RNFSPackage());
packages.add(new SQLitePluginPackage());
packages.add(new RNMediaMetaPackage()); //TOOD: search alternative to get video length
packages.add(new PhotoViewPackage()); //TOOD: update to new package or remove it completelly
packages.add(new KCKeepAwakePackage()); //TOOD: update to new expo keep awake
packages.add(new ShareMenuPackage()); //TOOD: migrate to new https://github.com/ajith-ab/react-native-file-share-intent
// packages.add(new BackgroundTimerPackage());
// packages.add(new CryptoPackage());
// packages.add(new RNFSPackage());
// packages.add(new KCKeepAwakePackage()); //TOOD: update to new expo keep awake
// packages.add(new ShareMenuPackage()); //TOOD: migrate to new https://github.com/ajith-ab/react-native-file-share-intent
packages.add(new RNNotificationsPackage(MainApplication.this)); //TOOD: update to new expo keep awake
// packages.add(new RNNotificationsPackage()); //TOOD: update to new expo keep awake
return packages;
}
......@@ -78,47 +56,6 @@ public class MainApplication extends Application implements ShareApplication, Re
// protected @Nullable String getBundleAssetName() {
// return "app.bundle";
// }
// @Override
// protected List<ReactPackage> getPackages() {
// return Arrays.<ReactPackage>asList(
// new MainReactPackage(),
// new RNSentryPackage(),
// new StripeReactPackage(),
// new SvgPackage(),
// new RNDeviceInfo(),
// new JitsiMeetPackage(),
// new NetInfoPackage(),
// new RNScreensPackage(),
// new ReactNativeAPKPackage(),
// new RNLocalizePackage(),
// new RNCWebViewPackage(),
// new AsyncStoragePackage(),
// new RNGestureHandlerPackage(),
// new CookieManagerPackage(),
// new RNExitAppPackage(),
// new TcpSocketsModule(),
// new RandomBytesPackage(),
// new RNOSModule(),
// new CryptoPackage(),
// new ReactVideoPackage(),
// new FastImageViewPackage(),
// new ReactNativeExceptionHandlerPackage(),
// new ImagePickerPackage(),
// new VectorIconsPackage(),
// new PhotoViewPackage(),
// new KCKeepAwakePackage(),
// new RNNotificationsPackage(MainApplication.this),
// new RNSharePackage(),
// new ShareMenuPackage(),
// new RNMediaMetaPackage(),
// new RNFSPackage(),
// new SQLitePluginPackage(),
// new BackgroundTimerPackage()
// );
// }
};
@Override
......
project.ext {
excludeAppGlideModule = true
}
buildscript {
ext {
......@@ -48,17 +51,7 @@ allprojects {
subprojects {
// fix missing gradle versions in jcenter
if (project.name.contains('react-native-fast-image')
|| project.name.contains('react-native-image-picker')
|| project.name.contains('react-native-vector-icons')
) {
buildscript {
repositories {
maven { url = "https://dl.bintray.com/android/android-tools/" }
}
}
}
afterEvaluate {p ->
if (p.hasProperty("android")) {
......
rootProject.name = 'Minds'
include ':react-native-randombytes'
project(':react-native-randombytes').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-randombytes/android')
include ':tipsi-stripe'
project(':tipsi-stripe').projectDir = new File(rootProject.projectDir, '../node_modules/tipsi-stripe/android')
//include ':react-native-jitsi-meet'
//project(':react-native-jitsi-meet').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-jitsi-meet/android')
include ':react-native-notifications'
project(':react-native-notifications').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-notifications/android/app')
// include ':@react-native-community_netinfo'
//project(':@react-native-community_netinfo').projectDir = new File(rootProject.projectDir, '../node_modules/@react-native-community/netinfo/android')
// include ':react-native-notifications'
// project(':react-native-notifications').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-notifications/android/app')
include ':react-native-screens'
project(':react-native-screens').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-screens/android')
include ':rn-apk'
......@@ -14,30 +14,16 @@ project(':rn-apk').projectDir = new File(rootProject.projectDir, '../node_module
include ':react-native-gesture-handler'
project(':react-native-gesture-handler').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-gesture-handler/android')
include ':react-native-sqlite-storage'
project(':react-native-sqlite-storage').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-sqlite-storage/src/android')
include ':react-native-cookies'
project(':react-native-cookies').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-cookies/android')
include ':react-native-background-timer'
project(':react-native-background-timer').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-background-timer/android')
include ':react-native-fs'
project(':react-native-fs').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-fs/android')
include ':react-native-media-meta'
project(':react-native-media-meta').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-media-meta/android')
include ':react-native-share-menu'
project(':react-native-share-menu').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-share-menu/android')
include ':react-native-tcp'
project(':react-native-tcp').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-tcp/android')
include ':react-native-randombytes'
project(':react-native-randombytes').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-randombytes/android')
include ':react-native-os'
project(':react-native-os').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-os/android')
include ':react-native-minds-encryption'
project(':react-native-minds-encryption').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-minds-encryption/android')
include ':react-native-video-exoplayer'
project(':react-native-video-exoplayer').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-video/android')
include ':react-native-photo-view'
project(':react-native-photo-view').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-photo-view/android')
include ':react-native-exception-handler'
project(':react-native-exception-handler').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-exception-handler/android')
include ':react-native-keep-awake'
......
module.exports = function (api) {
api.cache(false);
return {
"presets": ["module:metro-react-native-babel-preset"],
"plugins": [
["@babel/plugin-proposal-decorators", {
"legacy": true
}]
]
}
}
// Inject node globals into React Native global scope.
global.Buffer = require('buffer').Buffer;
global.process = require('process');
if (typeof __dirname === 'undefined') global.__dirname = '/'
if (typeof __filename === 'undefined') global.__filename = ''
if (typeof process === 'undefined') {
global.process = require('process')
} else {
const bProcess = require('process')
for (var p in bProcess) {
if (!(p in process)) {
process[p] = bProcess[p]
}
}
}
if (typeof btoa === 'undefined') {
global.btoa = function (str) {
return new Buffer(str, 'binary').toString('base64')
}
}
if (typeof atob === 'undefined') {
global.atob = function (b64Encoded) {
return new Buffer(b64Encoded, 'base64').toString('binary')
}
}
process.browser = false
if (typeof Buffer === 'undefined') global.Buffer = require('buffer').Buffer
// global.location = global.location || { port: 80 }
const isDev = typeof __DEV__ === 'boolean' && __DEV__
process.env['NODE_ENV'] = isDev ? 'development' : 'production'
if (typeof localStorage !== 'undefined') {
localStorage.debug = isDev ? '*' : ''
}
// created this file because the bundler is not reading index for some reason
import "@hawkingnetwork/node-libs-react-native/globals";
import "./global";
import { AppRegistry } from 'react-native';
import App from './App';
import { useScreens } from 'react-native-screens';
useScreens();
// const modules = require.getModules();
// const moduleIds = Object.keys(modules);
// const loadedModuleNames = moduleIds
// .filter(moduleId => modules[moduleId].isInitialized)
// .map(moduleId => modules[moduleId].verboseName);
// const waitingModuleNames = moduleIds
// .filter(moduleId => !modules[moduleId].isInitialized)
// .map(moduleId => modules[moduleId].verboseName);
// // make sure that the modules you expect to be waiting are actually waiting
// console.log(
// 'loaded:',
// loadedModuleNames.length,
// 'waiting:',
// waitingModuleNames.length
// );
// // grab this text blob, and put it in a file named packager/modulePaths.js
// console.log(`module.exports = ${JSON.stringify(loadedModuleNames.sort())};`);
AppRegistry.registerComponent('Minds', () => App);
\ No newline at end of file
import '@hawkingnetwork/node-libs-react-native/globals';
import { AppRegistry } from 'react-native';
import App from './App';
import { useScreens } from 'react-native-screens';
......
This diff is collapsed.
......@@ -34,6 +34,8 @@ target 'Minds' do
pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'
pod 'react-native-randombytes', :path => '../node_modules/react-native-randombytes'
target 'MindsTests' do
inherit! :search_paths
# Pods for testing
......
......@@ -6,6 +6,9 @@
*/
module.exports = {
resolver: {
extraNodeModules: require('@hawkingnetwork/node-libs-react-native'),
},
transformer: {
getTransformOptions: async () => ({
transform: {
......
......@@ -13,78 +13,50 @@
"locale": "ts-node tasks/poeditor.js",
"e2e": "jest -c jest.e2e.config.js",
"e2e-local": "e2elocal=1 jest -c jest.e2e.config.js",
"preinstall": "git config core.hooksPath .githooks",
"postinstall": "echo \"Fixing web3 require() issue…\" && replace \"c. . .rypto\" \"crypto\" node_modules -r --include=\"bytes.js\" && rn-nodeify --install --hack"
"preinstall": "git config core.hooksPath .githooks"
},
"dependencies": {
"@hawkingnetwork/node-libs-react-native": "^1.0.10",
"@react-native-community/async-storage": "^1.6.2",
"@react-native-community/netinfo": "^4.2.2",
"@sentry/react-native": "^1.0.6",
"@tradle/react-native-http": "^2.0.1",
"@types/react": "^16.8.17",
"@types/react-native": "^0.57.53",
"abab": "^1.0.4",
"assert": "^1.1.1",
"browserify-zlib": "~0.1.4",
"buffer": "^4.9.1",
"console-browserify": "^1.1.0",
"constants-browserify": "^1.0.0",
"credit-card-type": "^6.2.0",
"@react-native-community/netinfo": "^4.4.0",
"@sentry/react-native": "^1.0.9",
"crypto-js": "^3.1.9-1",
"dns.js": "^1.0.1",
"domain-browser": "^1.1.1",
"entities": "^1.1.1",
"entities": "^2.0.0",
"ethjs-signer": "^0.1.1",
"events": "^1.0.0",
"https-browserify": "~0.0.0",
"i18n-js": "^3.2.2",
"jwt-simple": "^0.5.5",
"lodash": "^4.17.11",
"mobx": "^5.9.4",
"mobx-react": "^5.4.4",
"mobx-utils": "^5.4.1",
"moment": "^2.20.1",
"moment-timezone": "^0.5.16",
"node-libs-browser": "^2.1.0",
"path-browserify": "0.0.0",
"process": "^0.11.0",
"moment": "^2.24.0",
"moment-timezone": "^0.5.27",
"promise-cancelable": "^2.1.1",
"punycode": "^1.4.1",
"querystring-es3": "~0.2.0",
"react": "16.9.0",
"react-native": "0.61.1",
"react-native-actionsheet": "^2.3.0",
"react-native-animatable": "^1.3.0",
"react-native": "0.61.2",
"react-native-actionsheet": "^2.4.2",
"react-native-animatable": "^1.3.3",
"react-native-background-timer": "^2.1.1",
"react-native-collapsible-header-views": "^1.0.2",
"react-native-cookies": "^3.3.0",
"react-native-crypto": "^2.2.0",
"react-native-device-info": "^3.1.4",
"react-native-device-info": "^4.0.1",
"react-native-device-log": "Minds/react-native-device-log#74f06b09c6656aa228a9a3a474c714d82abf509e",
"react-native-elements": "^0.19.1",
"react-native-exception-handler": "^2.10.8",
"react-native-exit-app": "^1.1.0",
"react-native-fast-image": "^7.0.2",
"react-native-file-type": "^0.0.8",
"react-native-flash-message": "^0.1.13",
"react-native-flash-message": "^0.1.15",
"react-native-fs": "^2.14.1",
"react-native-gesture-handler": "^1.4.1",
"react-native-http": "tradle/react-native-http#834492d",
"react-native-image-picker": "^1.1.0",
"react-native-image-progress": "^1.0.1",
"react-native-image-progress": "^1.1.1",
"react-native-keep-awake": "^4.0.0",
"react-native-level-fs": "^3.0.0",
"react-native-localize": "^1.2.1",
"react-native-localize": "^1.3.0",
"react-native-material-menu": "^1.0.0",
"react-native-media-meta": "zi6xuan/react-native-media-meta#57110e54bd488a043957c55628cbeac21ce9cc1b",
"react-native-minds-encryption": "https://github.com/Minds/react-native-minds-encryption",
"react-native-modal": "^9.0.0",
"react-native-modal-datetime-picker": "^6.0.0",
"react-native-notifications": "Minds/react-native-notifications#333e376f866a805f250cc68706d97ace503b948a",
"react-native-os": "^1.2.5",
"react-native-modal": "^11.4.0",
"react-native-modal-datetime-picker": "^7.6.0",
"react-native-phone-input": "thegamenicorus/react-native-phone-input#6ab1a91a09ddd4272fe85e30ecedf092f0fcb1a7",
"react-native-photo-view": "alwx/react-native-photo-view#e28f5416574cbfa07b2d4fa862c0048df56f7b02",
"react-native-progress": "^3.4.0",
"react-native-progress": "^4.0.0",
"react-native-qrcode-svg": "^5.2.0",
"react-native-randombytes": "^3.5.3",
"react-native-reanimated": "^1.3.0",
......@@ -92,109 +64,43 @@
"react-native-share": "^2.0.0",
"react-native-share-menu": "Minds/react-native-share-menu",
"react-native-simple-radio-button": "^2.7.1",
"react-native-snap-carousel": "^3.8.0",
"react-native-snap-carousel": "^3.8.2",
"react-native-sqlite-storage": "^4.1.0",
"react-native-svg": "^9.8.4",
"react-native-svg": "^9.11.1",
"react-native-switch-pro": "^1.0.4",
"react-native-tcp": "^3.3.1",
"react-native-udp": "^2.6.1",
"react-native-vector-icons": "^6.6.0",
"react-native-video": "^5.0.2",
"react-native-webview": "^7.4.0",
"react-native-webview": "^7.4.2",
"react-navigation": "^4.0.10",
"readable-stream": "1.0.33",
"react-navigation-stack": "^1.9.4",
"react-navigation-tabs": "^2.5.6",
"rn-apk": "^0.2.9",
"rn-placeholder": "^1.3.3",
"rxjs": "^6.5.2",
"socket.io-client": "^2.0.4",
"stream-browserify": "^1.0.0",
"string_decoder": "^0.10.31",
"timers-browserify": "^1.0.1",
"tipsi-stripe": "8.0.0-beta.6",
"tty-browserify": "0.0.0",
"url": "~0.10.1",
"util": "~0.10.3",
"vm-browserify": "0.0.4",
"web3": "1.0.0-beta.30"
"tipsi-stripe": "8.0.0-beta.8",
"web3": "1.0.0-beta.33",
"yarn": "^1.19.1"
},
"devDependencies": {
"@babel/core": "^7.6.2",
"@babel/core": "^7.6.3",
"@babel/plugin-proposal-class-properties": "7.5.5",
"@babel/plugin-proposal-decorators": "7.6.0",
"@babel/runtime": "^7.6.2",
"@babel/runtime": "^7.6.3",
"@react-native-community/eslint-config": "^0.0.5",
"babel-core": "7.0.0-bridge.0",
"babel-jest": "^24.9.0",
"enzyme": "^3.10.0",
"enzyme-adapter-react-16": "^1.14.0",
"enzyme-to-json": "^3.4.0",
"eslint": "^6.4.0",
"eslint-plugin-flowtype": "^2.50.0",
"eslint-plugin-react": "^7.14.3",
"eslint-plugin-react-native": "^3.7.0",
"eslint": "^6.5.1",
"jest": "^24.9.0",
"jest-serializer-enzyme": "^1.0.0",
"metro-react-native-babel-preset": "^0.56.0",
"react-addons-test-utils": "^15.6.2",
"react-dom": "^16.6.3",
"react-test-renderer": "16.9.0",
"replace": "^1.1.1",
"rn-nodeify": "^10.1.0",
"wd": "^1.11.1"
"react-test-renderer": "16.9.0"
},
"resolutions": {
"vargs": "Minds/vargs#0f6d9b9578abacb0a68f75a7b886f14719f563de"
},
"react-native": {
"crypto": "react-native-crypto",
"zlib": "browserify-zlib",
"console": "console-browserify",
"constants": "constants-browserify",
"dns": "dns.js",
"net": "react-native-tcp",
"domain": "domain-browser",
"http": "@tradle/react-native-http",
"https": "https-browserify",
"os": "react-native-os",
"path": "path-browserify",
"querystring": "querystring-es3",
"fs": "react-native-level-fs",
"_stream_transform": "readable-stream/transform",
"_stream_readable": "readable-stream/readable",
"_stream_writable": "readable-stream/writable",
"_stream_duplex": "readable-stream/duplex",
"_stream_passthrough": "readable-stream/passthrough",
"dgram": "react-native-udp",
"stream": "stream-browserify",
"timers": "timers-browserify",
"tty": "tty-browserify",
"vm": "vm-browserify",
"tls": false
},
"browser": {
"crypto": "react-native-crypto",
"zlib": "browserify-zlib",
"console": "console-browserify",
"constants": "constants-browserify",
"dns": "dns.js",
"net": "react-native-tcp",
"domain": "domain-browser",
"http": "@tradle/react-native-http",
"https": "https-browserify",
"os": "react-native-os",
"path": "path-browserify",
"querystring": "querystring-es3",
"fs": "react-native-level-fs",
"_stream_transform": "readable-stream/transform",
"_stream_readable": "readable-stream/readable",
"_stream_writable": "readable-stream/writable",
"_stream_duplex": "readable-stream/duplex",
"_stream_passthrough": "readable-stream/passthrough",
"dgram": "react-native-udp",
"stream": "stream-browserify",
"timers": "timers-browserify",
"tty": "tty-browserify",
"vm": "vm-browserify",
"tls": false
}
}
\ No newline at end of file
}
const extraNodeModules = require('node-libs-browser');
const blacklist = require('metro-config/src/defaults/blacklist')
module.exports = {
extraNodeModules,
resolver: {
blacklistRE: blacklist([/react-native\/local-cli\/core\/__fixtures__.*/])
},
};
if (typeof __dirname === 'undefined') global.__dirname = '/'
if (typeof __filename === 'undefined') global.__filename = ''
if (typeof process === 'undefined') {
global.process = require('process')
} else {
const bProcess = require('process')
for (var p in bProcess) {
if (!(p in process)) {
process[p] = bProcess[p]
}
}
}
process.browser = false
if (typeof Buffer === 'undefined') global.Buffer = require('buffer').Buffer
// global.location = global.location || { port: 80 }
const isDev = typeof __DEV__ === 'boolean' && __DEV__
process.env['NODE_ENV'] = isDev ? 'development' : 'production'
if (typeof localStorage !== 'undefined') {
localStorage.debug = isDev ? '*' : ''
}
import { Alert } from 'react-native';
import api from './../common/services/api.service';
import session from './../common/services/session.service';
import delay from '../common/helpers/delay';
import CookieManager from 'react-native-cookies';
import logService from '../common/services/log.service';
/**
......@@ -20,7 +18,7 @@ class AuthService {
};
const data = await api.post('api/v2/oauth/token', params);
await CookieManager.clearAll();
await api.clearCookies();
await delay(100);
await session.login(data);
return data;
......
......@@ -12,8 +12,6 @@ import {
Alert,
} from 'react-native';
import CookieManager from 'react-native-cookies';
import authService from '../auth/AuthService';
import { CommonStyle } from '../styles/Common';
import { ComponentsStyle } from '../styles/Components';
......@@ -28,6 +26,7 @@ import {
import i18n from '../common/services/i18n.service';
import sessionService from '../common/services/session.service';
import delay from '../common/helpers/delay';
import apiService from '../common/services/api.service';
/**
* Register Form
......@@ -207,7 +206,7 @@ export default class RegisterForm extends Component {
};
await authService.register(params);
sessionService.setInitialScreen('OnboardingScreen');
await CookieManager.clearAll();
await apiService.clearCookies();
await delay(100);
await authService.login(this.state.username ,this.state.password);
} catch (err) {
......
......@@ -10,8 +10,6 @@ import {
KeyboardAvoidingView,
} from 'react-native';
import CookieManager from 'react-native-cookies';
import authService from './AuthService';
import { CommonStyle as CS } from '../styles/Common';
import { ComponentsStyle } from '../styles/Components';
......@@ -22,6 +20,7 @@ import i18n from '../common/services/i18n.service';
import navigation from '../navigation/NavigationService';
import delay from '../common/helpers/delay';
import logService from '../common/services/log.service';
import apiService from '../common/services/api.service';
/**
* Reset Password Form
......@@ -121,7 +120,7 @@ export default class ResetPassword extends PureComponent {
try {
const data = await authService.reset(state.params.username, this.state.password, state.params.code);
// clear the cookies (fix future issues with calls)
await CookieManager.clearAll();
await apiService.clearCookies();;
if (data.status === 'success') {
await delay(100);
......
......@@ -6,7 +6,7 @@ import { Icon } from 'react-native-elements'
import { observer, inject } from 'mobx-react/native';
import entities from 'entities';
import * as entities from 'entities';
import {
Text,
......