From 43cfd93ee14c5ea9905d00ed465703e191609539 Mon Sep 17 00:00:00 2001 From: Patricio Date: Tue, 29 Jun 2021 14:37:26 -0300 Subject: [PATCH] fix: fixes on v2.0.1 and bump --- Gemfile.lock | 53 ++++++++-------- android/app/build.gradle | 6 +- android/app/src/main/AndroidManifest.xml | 2 +- .../rsk/rwallet/v2/ReactNativeFlipper.java | 62 ------------------- fastlane/Fastfile | 2 +- ios/rwallet-tvOS/Info.plist | 4 +- ios/rwallet-tvOSTests/Info.plist | 4 +- ios/rwallet.xcodeproj/project.pbxproj | 4 +- ios/rwallet/Info.plist | 6 +- ios/rwalletTests/Info.plist | 4 +- package-lock.json | 7 ++- package.json | 3 +- src/pages/wallet/recovery.phrase.js | 11 +++- src/pages/wallet/rns/status.js | 12 ++-- src/pages/wallet/transfer.js | 2 +- src/pages/wallet/verify.phrase.js | 8 +-- 16 files changed, 72 insertions(+), 118 deletions(-) delete mode 100644 android/app/src/main/java/com/rsk/rwallet/v2/ReactNativeFlipper.java diff --git a/Gemfile.lock b/Gemfile.lock index be2e3f9e9..b8e298413 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -18,16 +18,16 @@ GEM artifactory (3.0.15) atomos (0.1.3) aws-eventstream (1.1.1) - aws-partitions (1.460.0) - aws-sdk-core (3.114.0) + aws-partitions (1.472.0) + aws-sdk-core (3.115.0) aws-eventstream (~> 1, >= 1.0.2) aws-partitions (~> 1, >= 1.239.0) aws-sigv4 (~> 1.1) jmespath (~> 1.0) - aws-sdk-kms (1.43.0) + aws-sdk-kms (1.44.0) aws-sdk-core (~> 3, >= 3.112.0) aws-sigv4 (~> 1.1) - aws-sdk-s3 (1.94.1) + aws-sdk-s3 (1.96.1) aws-sdk-core (~> 3, >= 3.112.0) aws-sdk-kms (~> 1) aws-sigv4 (~> 1.1) @@ -90,8 +90,10 @@ GEM escape (0.0.4) ethon (0.14.0) ffi (>= 1.15.0) - excon (0.81.0) - faraday (1.4.1) + excon (0.83.0) + faraday (1.4.3) + faraday-em_http (~> 1.0) + faraday-em_synchrony (~> 1.0) faraday-excon (~> 1.1) faraday-net_http (~> 1.0) faraday-net_http_persistent (~> 1.1) @@ -107,8 +109,8 @@ GEM faraday-net_http_persistent (1.1.0) faraday_middleware (1.0.0) faraday (~> 1.0) - fastimage (2.2.3) - fastlane (2.183.2) + fastimage (2.2.4) + fastlane (2.187.0) CFPropertyList (>= 2.3, < 4.0.0) addressable (>= 2.3, < 3.0.0) artifactory (~> 3.0) @@ -152,39 +154,36 @@ GEM fourflusher (2.3.1) fuzzy_match (2.0.4) gh_inspector (1.1.3) - google-apis-androidpublisher_v3 (0.3.0) - google-apis-core (~> 0.1) - google-apis-core (0.3.0) + google-apis-androidpublisher_v3 (0.7.0) + google-apis-core (>= 0.3, < 2.a) + google-apis-core (0.4.0) addressable (~> 2.5, >= 2.5.1) - googleauth (~> 0.14) - httpclient (>= 2.8.1, < 3.0) + googleauth (>= 0.16.2, < 2.a) + httpclient (>= 2.8.1, < 3.a) mini_mime (~> 1.0) representable (~> 3.0) - retriable (>= 2.0, < 4.0) + retriable (>= 2.0, < 4.a) rexml - signet (~> 0.14) webrick - google-apis-iamcredentials_v1 (0.4.0) - google-apis-core (~> 0.1) - google-apis-playcustomapp_v1 (0.3.0) - google-apis-core (~> 0.1) - google-apis-playcustomapp_v1 (0.2.0) - google-apis-core (~> 0.1) - google-apis-storage_v1 (0.3.0) - google-apis-core (~> 0.1) + google-apis-iamcredentials_v1 (0.5.0) + google-apis-core (>= 0.3, < 2.a) + google-apis-playcustomapp_v1 (0.4.0) + google-apis-core (>= 0.3, < 2.a) + google-apis-storage_v1 (0.5.0) + google-apis-core (>= 0.3, < 2.a) google-cloud-core (1.6.0) google-cloud-env (~> 1.0) google-cloud-errors (~> 1.0) google-cloud-env (1.5.0) faraday (>= 0.17.3, < 2.0) google-cloud-errors (1.1.0) - google-cloud-storage (1.31.1) + google-cloud-storage (1.32.0) addressable (~> 2.5) digest-crc (~> 0.4) google-apis-iamcredentials_v1 (~> 0.1) google-apis-storage_v1 (~> 0.1) - google-cloud-core (~> 1.2) - googleauth (~> 0.9) + google-cloud-core (~> 1.6) + googleauth (>= 0.16.2, < 2.a) mini_mime (~> 1.0) googleauth (0.16.2) faraday (>= 0.17.3, < 2.0) @@ -194,7 +193,7 @@ GEM os (>= 0.9, < 2.0) signet (~> 0.14) highline (2.0.3) - http-cookie (1.0.3) + http-cookie (1.0.4) domain_name (~> 0.5) httpclient (2.8.3) i18n (1.8.10) diff --git a/android/app/build.gradle b/android/app/build.gradle index 809548a6b..1562fc862 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -115,8 +115,8 @@ android { minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion compileSdkVersion rootProject.ext.compileSdkVersion - versionCode 45 - versionName "1.4.5" + versionCode 48 + versionName "2.0.1" missingDimensionStrategy 'react-native-camera', 'general' multiDexEnabled true } @@ -213,4 +213,4 @@ task copyDownloadableDepsToLibs(type: Copy) { apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project) // apply plugin: 'com.google.gms.google-services' must be at the bottom of the file -apply plugin: 'com.google.gms.google-services' \ No newline at end of file +apply plugin: 'com.google.gms.google-services' diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 007494a31..81e2fd157 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -1,7 +1,7 @@ + android:versionName="2.0.1"> diff --git a/android/app/src/main/java/com/rsk/rwallet/v2/ReactNativeFlipper.java b/android/app/src/main/java/com/rsk/rwallet/v2/ReactNativeFlipper.java deleted file mode 100644 index 460359a26..000000000 --- a/android/app/src/main/java/com/rsk/rwallet/v2/ReactNativeFlipper.java +++ /dev/null @@ -1,62 +0,0 @@ -package com.rsk.rwallet.v2; - -import android.content.Context; -import com.facebook.flipper.android.AndroidFlipperClient; -import com.facebook.flipper.android.utils.FlipperUtils; -import com.facebook.flipper.core.FlipperClient; -import com.facebook.flipper.plugins.crashreporter.CrashReporterPlugin; -import com.facebook.flipper.plugins.databases.DatabasesFlipperPlugin; -import com.facebook.flipper.plugins.fresco.FrescoFlipperPlugin; -import com.facebook.flipper.plugins.inspector.DescriptorMapping; -import com.facebook.flipper.plugins.inspector.InspectorFlipperPlugin; -import com.facebook.flipper.plugins.network.FlipperOkhttpInterceptor; -import com.facebook.flipper.plugins.network.NetworkFlipperPlugin; -import com.facebook.flipper.plugins.react.ReactFlipperPlugin; -import com.facebook.flipper.plugins.sharedpreferences.SharedPreferencesFlipperPlugin; -import com.facebook.react.ReactInstanceManager; -import com.facebook.react.bridge.ReactContext; -import com.facebook.react.modules.network.NetworkingModule; -import okhttp3.OkHttpClient; -public class ReactNativeFlipper { - public static void initializeFlipper(Context context, ReactInstanceManager reactInstanceManager) { - if (FlipperUtils.shouldEnableFlipper(context)) { - final FlipperClient client = AndroidFlipperClient.getInstance(context); - client.addPlugin(new InspectorFlipperPlugin(context, DescriptorMapping.withDefaults())); - client.addPlugin(new ReactFlipperPlugin()); - client.addPlugin(new DatabasesFlipperPlugin(context)); - client.addPlugin(new SharedPreferencesFlipperPlugin(context)); - client.addPlugin(CrashReporterPlugin.getInstance()); - NetworkFlipperPlugin networkFlipperPlugin = new NetworkFlipperPlugin(); - NetworkingModule.setCustomClientBuilder( - new NetworkingModule.CustomClientBuilder() { - @Override - public void apply(OkHttpClient.Builder builder) { - builder.addNetworkInterceptor(new FlipperOkhttpInterceptor(networkFlipperPlugin)); - } - }); - client.addPlugin(networkFlipperPlugin); - client.start(); - // Fresco Plugin needs to ensure that ImagePipelineFactory is initialized - // Hence we run if after all native modules have been initialized - ReactContext reactContext = reactInstanceManager.getCurrentReactContext(); - if (reactContext == null) { - reactInstanceManager.addReactInstanceEventListener( - new ReactInstanceManager.ReactInstanceEventListener() { - @Override - public void onReactContextInitialized(ReactContext reactContext) { - reactInstanceManager.removeReactInstanceEventListener(this); - reactContext.runOnNativeModulesQueueThread( - new Runnable() { - @Override - public void run() { - client.addPlugin(new FrescoFlipperPlugin()); - } - }); - } - }); - } else { - client.addPlugin(new FrescoFlipperPlugin()); - } - } - } -} \ No newline at end of file diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 911cba05a..1bf802e57 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -89,7 +89,7 @@ platform :android do desc 'Build the Android application.' private_lane :build do gradle(task: 'clean', project_dir: 'android/') - gradle(task: 'assemble', build_type: 'Release', project_dir: 'android/', properties: { + gradle(task: 'bundle', build_type: 'Release', project_dir: 'android/', properties: { "android.injected.signing.store.file" => Dir.pwd + "/../" + ENV['ANDROID_SIGN_FILE'], "android.injected.signing.store.password" => ENV['ANDROID_SIGN_PASSWORD'], "android.injected.signing.key.alias" => ENV['ANDROID_SIGN_KEY_ALIAS'], diff --git a/ios/rwallet-tvOS/Info.plist b/ios/rwallet-tvOS/Info.plist index 44b5e2180..35dbfe212 100644 --- a/ios/rwallet-tvOS/Info.plist +++ b/ios/rwallet-tvOS/Info.plist @@ -15,11 +15,11 @@ CFBundlePackageType APPL CFBundleShortVersionString - 1.4.5 + 2.0.1 CFBundleSignature ???? CFBundleVersion - 46 + 47 LSRequiresIPhoneOS UILaunchStoryboardName diff --git a/ios/rwallet-tvOSTests/Info.plist b/ios/rwallet-tvOSTests/Info.plist index dd81a297c..4e49d747a 100644 --- a/ios/rwallet-tvOSTests/Info.plist +++ b/ios/rwallet-tvOSTests/Info.plist @@ -15,10 +15,10 @@ CFBundlePackageType BNDL CFBundleShortVersionString - 1.4.5 + 2.0.1 CFBundleSignature ???? CFBundleVersion - 46 + 47 diff --git a/ios/rwallet.xcodeproj/project.pbxproj b/ios/rwallet.xcodeproj/project.pbxproj index 7983b60e1..09c6916f7 100644 --- a/ios/rwallet.xcodeproj/project.pbxproj +++ b/ios/rwallet.xcodeproj/project.pbxproj @@ -871,7 +871,7 @@ CODE_SIGN_ENTITLEMENTS = rwallet/rwallet.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 46; + CURRENT_PROJECT_VERSION = 47; DEAD_CODE_STRIPPING = NO; DEVELOPMENT_TEAM = 3YDAH8ZR7C; FRAMEWORK_SEARCH_PATHS = ( @@ -933,7 +933,7 @@ CODE_SIGN_ENTITLEMENTS = rwallet/rwallet.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 46; + CURRENT_PROJECT_VERSION = 47; DEVELOPMENT_TEAM = 3YDAH8ZR7C; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", diff --git a/ios/rwallet/Info.plist b/ios/rwallet/Info.plist index b5e28f000..a32b525c0 100644 --- a/ios/rwallet/Info.plist +++ b/ios/rwallet/Info.plist @@ -2,6 +2,8 @@ + UIUserInterfaceStyle + Light CFBundleDevelopmentRegion en CFBundleDisplayName @@ -17,11 +19,11 @@ CFBundlePackageType APPL CFBundleShortVersionString - 1.4.5 + 2.0.1 CFBundleSignature ???? CFBundleVersion - 46 + 47 ITSAppUsesNonExemptEncryption LSApplicationCategoryType diff --git a/ios/rwalletTests/Info.plist b/ios/rwalletTests/Info.plist index 474901f91..72aacefd4 100644 --- a/ios/rwalletTests/Info.plist +++ b/ios/rwalletTests/Info.plist @@ -15,10 +15,10 @@ CFBundlePackageType BNDL CFBundleShortVersionString - 1.4.5 + 2.0.1 CFBundleSignature ???? CFBundleVersion - 46 + 47 diff --git a/package-lock.json b/package-lock.json index 6f66ffbc9..b440607bd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "rwallet", - "version": "1.4.5", + "version": "2.0.1", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -3197,6 +3197,11 @@ "deep-assign": "^3.0.0" } }, + "@react-native-clipboard/clipboard": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/@react-native-clipboard/clipboard/-/clipboard-1.8.2.tgz", + "integrity": "sha512-IMUBqkwS6HyyHX1Dcu/yNqSYsgmI6UGilcUhD+qbH7tVQP8mX3k7hugr5K5IPzpGKaC1VSq4Lt7avy0jomHhLg==" + }, "@react-native-community/blur": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/@react-native-community/blur/-/blur-3.6.0.tgz", diff --git a/package.json b/package.json index 3a07773e8..82a0e1bbb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rwallet", - "version": "1.4.5", + "version": "2.0.1", "private": true, "scripts": { "postinstall": "./node_modules/.bin/rn-nodeify --hack --install stream,http,https,crypto,os,url && ./node_modules/.bin/patch-package", @@ -19,6 +19,7 @@ "dependencies": { "@ant-design/react-native": "^4.2.0", "@react-native-async-storage/async-storage": "^1.15.5", + "@react-native-clipboard/clipboard": "^1.8.2", "@react-native-community/blur": "^3.6.0", "@react-native-community/cameraroll": "^4.0.4", "@react-native-community/segmented-control": "^2.2.2", diff --git a/src/pages/wallet/recovery.phrase.js b/src/pages/wallet/recovery.phrase.js index 8998dbfaf..7bc552885 100644 --- a/src/pages/wallet/recovery.phrase.js +++ b/src/pages/wallet/recovery.phrase.js @@ -1,8 +1,9 @@ import _ from 'lodash'; import React, { Component } from 'react'; import { - View, TouchableOpacity, StyleSheet, Clipboard, + View, TouchableOpacity, StyleSheet, } from 'react-native'; +import Clipboard from '@react-native-clipboard/clipboard'; import { connect } from 'react-redux'; import PropTypes from 'prop-types'; import Tags from '../../components/common/misc/tags'; @@ -143,7 +144,13 @@ RecoveryPhrase.propTypes = { navigate: PropTypes.func.isRequired, dispatch: PropTypes.func.isRequired, goBack: PropTypes.func.isRequired, - state: PropTypes.object.isRequired, + state: PropTypes.shape({ + params: PropTypes.shape({ + shouldVerifyPhrase: PropTypes.bool.isRequired, + shouldCreatePhrase: PropTypes.bool.isRequired, + phrase: PropTypes.string.isRequired, + }).isRequired, + }).isRequired, }).isRequired, addNotification: PropTypes.func.isRequired, }; diff --git a/src/pages/wallet/rns/status.js b/src/pages/wallet/rns/status.js index ce8076b9c..b173b29e5 100644 --- a/src/pages/wallet/rns/status.js +++ b/src/pages/wallet/rns/status.js @@ -120,7 +120,7 @@ const styles = StyleSheet.create({ class RnsStatus extends Component { static navigationOptions = () => ({ header: null, - gesturesEnabled: false, + gestureEnabled: false, }); constructor(props) { @@ -135,7 +135,7 @@ class RnsStatus extends Component { this.createListData(); } - componentWillReceiveProps(nextProps) { + UNSAFE_componentWillReceiveProps(nextProps) { const { subdomains } = nextProps; const { rnsRows } = this.state; const newRnsRows = this.getUpdatedSubdomainsStatus(subdomains, rnsRows); @@ -344,10 +344,14 @@ RnsStatus.propTypes = { dispatch: PropTypes.func.isRequired, goBack: PropTypes.func.isRequired, pop: PropTypes.func.isRequired, - state: PropTypes.object.isRequired, + state: PropTypes.shape({ + params: PropTypes.shape({ + isSkipCreatePage: PropTypes.bool.isRequired, + }).isRequired, + }).isRequired, }).isRequired, walletManager: PropTypes.shape({ - wallets: PropTypes.array, + wallets: PropTypes.arrayOf(PropTypes.shape({})), }).isRequired, addNotification: PropTypes.func.isRequired, setPage: PropTypes.func.isRequired, diff --git a/src/pages/wallet/transfer.js b/src/pages/wallet/transfer.js index 9c4269270..1c142068e 100644 --- a/src/pages/wallet/transfer.js +++ b/src/pages/wallet/transfer.js @@ -250,7 +250,7 @@ const styles = StyleSheet.create({ class Transfer extends Component { static navigationOptions = () => ({ header: null, - gesturesEnabled: false, + gestureEnabled: false, }); static generateAmountPlaceholderText(symbol, type, currency, prices) { diff --git a/src/pages/wallet/verify.phrase.js b/src/pages/wallet/verify.phrase.js index 757d3ff65..93c406a94 100644 --- a/src/pages/wallet/verify.phrase.js +++ b/src/pages/wallet/verify.phrase.js @@ -119,7 +119,7 @@ const styles = StyleSheet.create({ class VerifyPhrase extends Component { static navigationOptions = () => ({ header: null, - gesturesEnabled: false, + gestureEnabled: false, }); constructor(props) { @@ -307,7 +307,7 @@ class VerifyPhrase extends Component { } const wordsView = ( - + {words} @@ -376,9 +376,7 @@ VerifyPhrase.propTypes = { goBack: PropTypes.func.isRequired, state: PropTypes.shape({ params: PropTypes.shape({ - phrase: PropTypes.shape({ - split: PropTypes.string, - }), + phrase: PropTypes.string, coins: PropTypes.arrayOf(PropTypes.shape({})), }).isRequired, }).isRequired,