diff --git a/android/app/build.gradle b/android/app/build.gradle index 4c2c1723..428edca7 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -152,8 +152,8 @@ android { applicationId "co.psychedelic.plug" minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion - versionCode 24 - versionName "0.3.0" + versionCode 27 + versionName "0.4.0" resValue "string", "build_config_package", "co.psychedelic.plug" buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString() if (isNewArchitectureEnabled()) { diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 35257cc3..a0e634b1 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -5,7 +5,7 @@ - + 0.8.4) - RNFileViewer (2.1.5): - React-Core - - RNFlashList (1.2.2): + - RNFlashList (1.4.0): - React-Core - RNGestureHandler (2.7.1): - React-Core @@ -447,7 +447,7 @@ PODS: - React-Core - RNReactNativeHapticFeedback (1.14.0): - React-Core - - RNReanimated (2.10.0): + - RNReanimated (2.12.0): - DoubleConversion - FBLazyVector - FBReactNativeSpec @@ -480,7 +480,7 @@ PODS: - RNSentry (4.5.0): - React-Core - Sentry (= 7.25.1) - - RNSVG (13.4.0): + - RNSVG (13.5.0): - React-Core - SDWebImage (5.11.1): - SDWebImage/Core (= 5.11.1) @@ -572,7 +572,7 @@ DEPENDENCIES: - ReactCommon/turbomodule/core (from `../node_modules/react-native/ReactCommon`) - RNBootSplash (from `../node_modules/react-native-bootsplash`) - "RNCAsyncStorage (from `../node_modules/@react-native-async-storage/async-storage`)" - - "RNCClipboard (from `../node_modules/@react-native-community/clipboard`)" + - "RNCClipboard (from `../node_modules/@react-native-clipboard/clipboard`)" - "RNCMaskedView (from `../node_modules/@react-native-masked-view/masked-view`)" - RNDeviceInfo (from `../node_modules/react-native-device-info`) - RNFastImage (from `../node_modules/react-native-fast-image`) @@ -713,7 +713,7 @@ EXTERNAL SOURCES: RNCAsyncStorage: :path: "../node_modules/@react-native-async-storage/async-storage" RNCClipboard: - :path: "../node_modules/@react-native-community/clipboard" + :path: "../node_modules/@react-native-clipboard/clipboard" RNCMaskedView: :path: "../node_modules/@react-native-masked-view/masked-view" RNDeviceInfo: @@ -816,19 +816,19 @@ SPEC CHECKSUMS: ReactCommon: 01064177e66d652192c661de899b1076da962fd9 RNBootSplash: 5f346163977573d6b2aeba1b25df9d2245c0d73c RNCAsyncStorage: 0c357f3156fcb16c8589ede67cc036330b6698ca - RNCClipboard: 41d8d918092ae8e676f18adada19104fa3e68495 + RNCClipboard: 2834e1c4af68697089cdd455ee4a4cdd198fa7dd RNCMaskedView: cb9670ea9239998340eaab21df13fa12a1f9de15 - RNDeviceInfo: 8b83e99e290deaf1bab71673cc636776ef647b6f + RNDeviceInfo: 4701f0bf2a06b34654745053db0ce4cb0c53ada7 RNFastImage: 3207b9eb17c2425d574ca40db35185db6e324f4e RNFileViewer: ce7ca3ac370e18554d35d6355cffd7c30437c592 - RNFlashList: 13d14d9502661134ad3ba892f81d76bdcbd79755 + RNFlashList: 399bf6a0db68f594ad2c86aaff3ea39564f39f8a RNGestureHandler: b7a872907ee289ada902127f2554fa1d2c076122 RNLocalize: a64514b46a01375fdfae9349036b4dc7130333b5 RNReactNativeHapticFeedback: 1e3efeca9628ff9876ee7cdd9edec1b336913f8c - RNReanimated: 60e291d42c77752a0f6d6f358387bdf225a87c6e + RNReanimated: 2a91e85fcd343f8af3c58d3425b99fdd285590a5 RNScreens: 34cc502acf1b916c582c60003dc3089fa01dc66d RNSentry: a034d0e81e3d3c04b770dd2df953fe634d372d22 - RNSVG: 07dbd870b0dcdecc99b3a202fa37c8ca163caec2 + RNSVG: 38ca962c970dbce1ca38991a5aebf26d163f9efb SDWebImage: a7f831e1a65eb5e285e3fb046a23fcfbf08e696d SDWebImageWebPCoder: f93010f3f6c031e2f8fb3081ca4ee6966c539815 Sentry: dd29c18c32b0af9269949f079cf631d581ca76ca diff --git a/package.json b/package.json index bfd6df41..a4d5b932 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "android:bundle.prod": "yarn run ic:build.android && yarn run patch:android && cd android && ./gradlew clean && ./gradlew bundleProductionRelease", "start": "react-native start", "test": "jest", - "lint": "eslint .", + "lint": "eslint . --max-warnings=0", "nodeify": "rn-nodeify --hack --install crypto,buffer,react-native-randombytes,process,stream", "lint-fix": "eslint . --fix", "removeDeps": "rm -rf yarn.lock node_modules && cd ios && rm -rf Pods Podfile.lock && cd ..", @@ -33,20 +33,20 @@ "@dfinity/candid": "0.9.3", "@dfinity/principal": "^0.9.3", "@hookform/error-message": "^2.0.0", - "@psychedelic/dab-js": "1.4.12", - "@psychedelic/plug-controller": "0.24.5", + "@psychedelic/dab-js": "^1.6.0-alpha.2", + "@psychedelic/plug-controller": "0.25.3", "@react-native-async-storage/async-storage": "^1.17.10", + "@react-native-clipboard/clipboard": "^1.11.1", "@react-native-community/blur": "^4.2.0", - "@react-native-community/clipboard": "^1.5.1", "@react-native-masked-view/masked-view": "^0.2.7", "@react-navigation/bottom-tabs": "^6.4.0", "@react-navigation/elements": "^1.3.6", - "@react-navigation/material-top-tabs": "^6.2.4", - "@react-navigation/native": "^6.0.8", - "@react-navigation/stack": "^6.2.0", + "@react-navigation/material-top-tabs": "^6.3.0", + "@react-navigation/native": "^6.0.13", + "@react-navigation/stack": "^6.3.4", "@reduxjs/toolkit": "^1.8.6", "@sentry/react-native": "^4.5.0", - "@shopify/flash-list": "^1.2.2", + "@shopify/flash-list": "^1.4.0", "@walletconnect/client": "^1.7.5", "assert-browserify": "^2.0.0", "axios": "0.24.0", @@ -61,6 +61,7 @@ "i18next": "^21.8.0", "js-sha256": "^0.9.0", "json-bigint": "^1.0.0", + "mime-types": "^2.1.35", "patch-package": "^6.4.7", "process": "^0.11.10", "punycode": "^2.1.1", @@ -74,7 +75,7 @@ "react-native-config": "^1.4.6", "react-native-crypto": "^2.2.0", "react-native-crypto-js": "^1.0.0", - "react-native-device-info": "^10.2.0", + "react-native-device-info": "^10.3.0", "react-native-document-picker": "^8.1.1", "react-native-fast-image": "^8.6.1", "react-native-fetch-api": "^2.0.0", @@ -90,11 +91,11 @@ "react-native-portalize": "^1.0.7", "react-native-process-shim": "^1.1.1", "react-native-randombytes": "^3.6.1", - "react-native-reanimated": "^2.10.0", + "react-native-reanimated": "^2.12.0", "react-native-safe-area-context": "^4.4.1", "react-native-screens": "^3.14.1", "react-native-sensitive-info": "^6.0.0-alpha.9", - "react-native-svg": "^13.4.0", + "react-native-svg": "^13.5.0", "react-native-tab-view": "^3.1.1", "react-native-toast-notifications": "^3.3.1", "react-native-url-polyfill": "^1.3.0", @@ -118,7 +119,7 @@ "devDependencies": { "@babel/core": "^7.18.5", "@babel/runtime": "7.18.3", - "@react-native-community/eslint-config": "^2.0.0", + "@react-native-community/eslint-config": "^3.1.0", "@rnx-kit/dep-check": "^1.13.1", "@types/jest": "^27.5.1", "@types/react-native": "0.66.3", @@ -128,9 +129,11 @@ "babel-plugin-module-resolver": "^4.1.0", "babel-plugin-transform-exponentiation-operator": "^6.24.1", "eslint": "^7.32.0", + "eslint-plugin-ft-flow": "^2.0.1", "eslint-plugin-simple-import-sort": "^7.0.0", "jest": "^26.6.3", "metro-react-native-babel-preset": "^0.72.1", + "prettier": "^2.7.1", "react-native-svg-transformer": "^1.0.0", "react-test-renderer": "18.1.0", "typescript": "4.6.4" diff --git a/patches/mime-types+2.1.35.patch b/patches/mime-types+2.1.35.patch new file mode 100644 index 00000000..6ecd4b1c --- /dev/null +++ b/patches/mime-types+2.1.35.patch @@ -0,0 +1,18 @@ +diff --git a/node_modules/mime-types/index.js b/node_modules/mime-types/index.js +index b9f34d5..68ccbe9 100644 +--- a/node_modules/mime-types/index.js ++++ b/node_modules/mime-types/index.js +@@ -13,7 +13,12 @@ + */ + + var db = require('mime-db') +-var extname = require('path').extname ++ ++const extname = (path) => { ++ if (!path || path.indexOf('.') === -1) { return '' } ++ path = '.' + path.split('.').pop().toLowerCase() ++ return /.*(\..*)/g.exec(path)[1] || '' ++} + + /** + * Module variables. diff --git a/patches/react-native+0.70.3.patch b/patches/react-native+0.70.3.patch new file mode 100644 index 00000000..72c39604 --- /dev/null +++ b/patches/react-native+0.70.3.patch @@ -0,0 +1,15 @@ +diff --git a/node_modules/react-native/Libraries/Components/Keyboard/KeyboardAvoidingView.js b/node_modules/react-native/Libraries/Components/Keyboard/KeyboardAvoidingView.js +index 6a343d8..474b2ec 100644 +--- a/node_modules/react-native/Libraries/Components/Keyboard/KeyboardAvoidingView.js ++++ b/node_modules/react-native/Libraries/Components/Keyboard/KeyboardAvoidingView.js +@@ -111,6 +111,10 @@ class KeyboardAvoidingView extends React.Component { + this._initialFrameHeight = this._frame.height; + } + ++ if (this.props.onLayout) { ++ event.persist(); ++ } ++ + if (wasFrameNull) { + await this._updateBottomIfNecessary(); + } diff --git a/src/components/buttons/Button/index.tsx b/src/components/buttons/Button/index.tsx index bf1cacbe..9762c9d5 100644 --- a/src/components/buttons/Button/index.tsx +++ b/src/components/buttons/Button/index.tsx @@ -41,7 +41,6 @@ const Button = ({ disableAnimation = false, loading = false, iconProps, - ...props }: Props) => { return ( - + {loading ? ( ) : ( diff --git a/src/components/buttons/RainbowButton/index.tsx b/src/components/buttons/RainbowButton/index.tsx index b88db528..030a57ed 100644 --- a/src/components/buttons/RainbowButton/index.tsx +++ b/src/components/buttons/RainbowButton/index.tsx @@ -26,7 +26,6 @@ const RainbowButton = ({ disabled, onLongPress, loading = false, - ...props }: Props) => { const disabledOrLoading = disabled || loading; return ( @@ -36,8 +35,7 @@ const RainbowButton = ({ disabled={disabledOrLoading}> + {...(disabledOrLoading ? DisabledRainbow : Rainbow)}>