Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🚀 Release v0.35.1 #404

Merged
merged 4 commits into from
Nov 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ INIT_APP_TIMEOUT=10000
ROOT_STATE_STORAGE_KEY=root

# Same as MARKETING_VERSION in iOS / version in Android
APP_MARKETING_VERSION=0.35.0
APP_MARKETING_VERSION=0.35.1

# Same as CURRENT_PROJECT_VERSION in iOS / version code in Android
APP_VERSION=346
APP_VERSION=347

# APP_VERSION must be greater or equal to the this value
# without forcing user to update the app
Expand Down
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,8 @@ android {
applicationId "com.oice"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 346
versionName "0.35.0"
versionCode 347
versionName "0.35.1"
missingDimensionStrategy 'react-native-camera', 'general'
missingDimensionStrategy 'store', 'play'
buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString()
Expand Down
8 changes: 8 additions & 0 deletions app/components/nft-web-view/nft-web-view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,13 @@ export function NFTWebView({ style, onPressRefresh, ...props }: NFTWebViewProps)
Linking.openURL(url)
return false
}
if (url.startsWith("intent://") && url.includes('package=com.oice')) {
Linking.openURL(
url.replace("intent://", "com.oice://")
.replace('#Intent;package=com.oice;scheme=com.oice;end;', '')
).catch(err => { console.error(err) });
return false
}
return true
}

Expand Down Expand Up @@ -71,6 +78,7 @@ export function NFTWebView({ style, onPressRefresh, ...props }: NFTWebViewProps)
{...props}
sharedCookiesEnabled={true}
decelerationRate={0.998}
originWhitelist={['https://*', 'http://*', 'intent://*']}
// TODO: remove HACK after applicationNameForUserAgent type is fixed
{...{ applicationNameForUserAgent: COMMON_API_CONFIG.userAgent }}
onShouldStartLoadWithRequest={handleShouldStartLoadWithRequest}
Expand Down
23 changes: 15 additions & 8 deletions app/models/iapStore/iap-store.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
/* eslint-disable @typescript-eslint/interface-name-prefix */
import { Platform, Alert } from "react-native"
import RNIap, {
import {
Product,
Purchase,
PurchaseError,
getAvailablePurchases,
getProducts,
requestSubscription,
validateReceiptIos,
} from "react-native-iap"

import {
Expand Down Expand Up @@ -55,10 +59,13 @@ export const IAPStoreModel = types
if (receipt) {
// TODO: Validation on Android
if (Platform.OS === "ios") {
const result: any = yield RNIap.validateReceiptIos({
"receipt-data": receipt,
password: self.getConfig("IAP_IOS_SHARED_SECRET"),
}, self.getConfig("IAP_IOS_IS_SANDBOX") === "true")
const result: any = yield validateReceiptIos({
receiptBody: {
"receipt-data": receipt,
password: self.getConfig("IAP_IOS_SHARED_SECRET"),
},
isTest: self.getConfig("IAP_IOS_IS_SANDBOX") === "true",
})
if (result) {
if (result.status === 0) {
self.purchasedSKUs.add(SKU_COM_OICE_MEMBERSHIP)
Expand All @@ -76,7 +83,7 @@ export const IAPStoreModel = types
fetchProducts: flow(function * () {
self.isFetchingProducts = true
try {
self.products = yield RNIap.getProducts([SKU_COM_OICE_MEMBERSHIP])
self.products = yield getProducts({ skus: [SKU_COM_OICE_MEMBERSHIP]})
} catch (error) {
logError(error)
} finally {
Expand All @@ -85,15 +92,15 @@ export const IAPStoreModel = types
}),
requestSubscription: flow(function * (sku: string) {
try {
yield RNIap.requestSubscription(sku, false)
yield requestSubscription({ sku })
} catch (error) {
logError(error)
}
}),
restorePurchases: flow(function * () {
self.isRestoringPurchases = true
try {
const purchases: Purchase[] = yield RNIap.getAvailablePurchases()
const purchases: Purchase[] = yield getAvailablePurchases()
let hasSubscription = false
purchases.forEach(purchase => {
switch (purchase.productId) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { Platform } from "react-native"
import { NavigationActions } from 'react-navigation'
import { flow, Instance, SnapshotOut, types } from 'mobx-state-tree'
import SignClient from '@walletconnect/sign-client'
Expand Down Expand Up @@ -25,7 +26,7 @@
.extend(withEnvironment)
.extend(withNavigationStore)
.extend(withCurrentUser)
.views(_ => ({

Check warning on line 29 in app/models/wallet-connect-v2-client/wallet-connect-v2-client.ts

View workflow job for this annotation

GitHub Actions / lint

'_' is defined but never used

Check warning on line 29 in app/models/wallet-connect-v2-client/wallet-connect-v2-client.ts

View workflow job for this annotation

GitHub Actions / lint

'_' is defined but never used

Check warning on line 29 in app/models/wallet-connect-v2-client/wallet-connect-v2-client.ts

View workflow job for this annotation

GitHub Actions / lint

'_' is defined but never used

Check warning on line 29 in app/models/wallet-connect-v2-client/wallet-connect-v2-client.ts

View workflow job for this annotation

GitHub Actions / lint

'_' is defined but never used
get isInAppBrowser() {
return false; // TODO: implement user agent checking
},
Expand All @@ -33,7 +34,7 @@
return 2;
},
}))
.views(_ => ({

Check warning on line 37 in app/models/wallet-connect-v2-client/wallet-connect-v2-client.ts

View workflow job for this annotation

GitHub Actions / lint

'_' is defined but never used

Check warning on line 37 in app/models/wallet-connect-v2-client/wallet-connect-v2-client.ts

View workflow job for this annotation

GitHub Actions / lint

'_' is defined but never used

Check warning on line 37 in app/models/wallet-connect-v2-client/wallet-connect-v2-client.ts

View workflow job for this annotation

GitHub Actions / lint

'_' is defined but never used

Check warning on line 37 in app/models/wallet-connect-v2-client/wallet-connect-v2-client.ts

View workflow job for this annotation

GitHub Actions / lint

'_' is defined but never used
shouldShowWalletConnectModal(payload: any) {
return (
(
Expand All @@ -56,7 +57,7 @@
self.sessions = self.connector.session.getAll();
}),
handleDisconnect(
requestEvent: SignClientTypes.EventArguments['session_delete']

Check warning on line 60 in app/models/wallet-connect-v2-client/wallet-connect-v2-client.ts

View workflow job for this annotation

GitHub Actions / lint

'requestEvent' is defined but never used

Check warning on line 60 in app/models/wallet-connect-v2-client/wallet-connect-v2-client.ts

View workflow job for this annotation

GitHub Actions / lint

'requestEvent' is defined but never used

Check warning on line 60 in app/models/wallet-connect-v2-client/wallet-connect-v2-client.ts

View workflow job for this annotation

GitHub Actions / lint

'requestEvent' is defined but never used

Check warning on line 60 in app/models/wallet-connect-v2-client/wallet-connect-v2-client.ts

View workflow job for this annotation

GitHub Actions / lint

'requestEvent' is defined but never used
) {
self.sessions = self.connector.session.getAll();
},
Expand Down Expand Up @@ -251,7 +252,10 @@
method: 'session_proposal',
...proposal,
}
if (!checkIsInAppBrowser(proposal)) {

/* auto approve is broken in android due to navigation to intent:// */
const isIos = Platform.OS === "ios"
if (!isIos || !checkIsInAppBrowser(proposal)) {
// Show WalletConnect Modal for loading UX
self.navigationStore.navigateTo({
routeName: 'App',
Expand Down
17 changes: 16 additions & 1 deletion app/screens/nft-notification-screen/nft-notification-screen.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import * as React from "react"
import { SafeAreaView, StatusBar } from "react-native"
import { Linking, SafeAreaView, StatusBar } from "react-native"
import { inject } from "mobx-react"
import styled from "styled-components/native"

import { NFTWebView as NFTWebViewBase } from "../../components/nft-web-view"

import { WalletConnectStore } from "../../models/wallet-connect-store"
import { UserStore } from "../../models/user-store"
import { WebViewNavigation } from "react-native-webview"

interface NFTNotificationScreenProps {
userStore: UserStore
Expand Down Expand Up @@ -41,6 +42,18 @@ export class NFTNotificationScreen extends React.Component<NFTNotificationScreen
this.props.userStore.loadUnseenEventCount()
}

handleShouldStartLoadWithRequest({ url }: WebViewNavigation) {
if (url.startsWith("intent://") && url.includes('package=com.oice')) {
Linking.openURL(
url.replace("intent://", "com.oice://")
.replace('#Intent;package=com.oice;scheme=com.oice;end;', '')
).catch(err => { console.error(err) });
return false
}

return true
}

render() {
return (
<RootView>
Expand All @@ -53,6 +66,8 @@ export class NFTNotificationScreen extends React.Component<NFTNotificationScreen
key={this.webViewURL}
source={{ uri: this.webViewURL }}
onPressRefresh={this.handlePressRefresh}
originWhitelist={['https://*', 'http://*', 'intent://*']}
onShouldStartLoadWithRequest={this.handleShouldStartLoadWithRequest}
/>
</RootView>
)
Expand Down
8 changes: 4 additions & 4 deletions ios/LikeCoinApp.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = LikeCoinApp/LikeCoinApp.entitlements;
CURRENT_PROJECT_VERSION = 346;
CURRENT_PROJECT_VERSION = 347;
DEVELOPMENT_TEAM = 6VG4638588;
ENABLE_BITCODE = NO;
HEADER_SEARCH_PATHS = (
Expand Down Expand Up @@ -653,7 +653,7 @@
INFOPLIST_FILE = LikeCoinApp/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 12.4;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 0.35.0;
MARKETING_VERSION = 0.35.1;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
Expand All @@ -676,7 +676,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = LikeCoinApp/LikeCoinApp.entitlements;
CURRENT_PROJECT_VERSION = 346;
CURRENT_PROJECT_VERSION = 347;
DEVELOPMENT_TEAM = 6VG4638588;
HEADER_SEARCH_PATHS = (
"$(inherited)",
Expand Down Expand Up @@ -744,7 +744,7 @@
INFOPLIST_FILE = LikeCoinApp/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 12.4;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 0.35.0;
MARKETING_VERSION = 0.35.1;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
Expand Down
4 changes: 2 additions & 2 deletions ios/LikerLandShare/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
<key>CFBundlePackageType</key>
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
<key>CFBundleShortVersionString</key>
<string>0.35.0</string>
<string>0.35.1</string>
<key>CFBundleVersion</key>
<string>346</string>
<string>347</string>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
Expand Down
4 changes: 2 additions & 2 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,7 @@ PODS:
- RNFBApp
- RNGestureHandler (2.12.0):
- React-Core
- RNIap (7.5.6):
- RNIap (10.1.3):
- React-Core
- RNKeychain (3.1.3):
- React
Expand Down Expand Up @@ -971,7 +971,7 @@ SPEC CHECKSUMS:
RNFBPerf: 27e85a7451cb366b75bd6ade8a2b912749d0a165
RNFBRemoteConfig: d2c532f1fee5862a7518190211ea2a28123167c5
RNGestureHandler: dec4645026e7401a0899f2846d864403478ff6a5
RNIap: d248609d1b8937e63bd904e865c318e9b1457eff
RNIap: 45c674b3f57d8c2a80bd926436015cefbf1d2dfd
RNKeychain: c658833a9cb2cbcba6423bdd6e16cce59e27da0e
RNLocalize: 62a949d2ec5bee0eb8f39a80a48f01e2f4f67080
RNRate: ef3bcff84f39bb1d1e41c5593d3eea4aab2bd73a
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "likecoin-app",
"version": "0.35.0",
"version": "0.35.1",
"private": true,
"engine": {
"node": ">=16"
Expand Down Expand Up @@ -74,7 +74,7 @@
"react-native-exit-app": "^1.1.0",
"react-native-fast-image": "^8.3.2",
"react-native-gesture-handler": "^2.5.0",
"react-native-iap": "^7.5.6",
"react-native-iap": "^10.1.3",
"react-native-image-picker": "^7.0.1",
"react-native-image-sequence": "^0.7.0",
"react-native-keychain": "3.1.3",
Expand Down
15 changes: 4 additions & 11 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8150,11 +8150,6 @@ domutils@^3.0.1:
domelementtype "^2.3.0"
domhandler "^5.0.3"

[email protected]:
version "1.3.2"
resolved "https://registry.yarnpkg.com/dooboolab-welcome/-/dooboolab-welcome-1.3.2.tgz#4928595312f0429b4ea1b485ba8767bae6acdab7"
integrity sha512-2NbMaIIURElxEf/UAoVUFlXrO+7n/FRhLCiQlk4fkbGRh9cJ3/f8VEMPveR9m4Ug2l2Zey+UCXjd6EcBqHJ5bw==

dot-case@^3.0.3:
version "3.0.3"
resolved "https://registry.yarnpkg.com/dot-case/-/dot-case-3.0.3.tgz#21d3b52efaaba2ea5fda875bb1aa8124521cf4aa"
Expand Down Expand Up @@ -15147,12 +15142,10 @@ react-native-gradle-plugin@^0.0.7:
resolved "https://registry.yarnpkg.com/react-native-gradle-plugin/-/react-native-gradle-plugin-0.0.7.tgz#96602f909745239deab7b589443f14fce5da2056"
integrity sha512-+4JpbIx42zGTONhBTIXSyfyHICHC29VTvhkkoUOJAh/XHPEixpuBduYgf6Y4y9wsN1ARlQhBBoptTvXvAFQf5g==

react-native-iap@^7.5.6:
version "7.5.6"
resolved "https://registry.yarnpkg.com/react-native-iap/-/react-native-iap-7.5.6.tgz#75a370f0a689da4fbe5ecf2cd9b7bdd0f7d20f2f"
integrity sha512-ua+KTq7NO+/Rw+S9cGDZizR45AdmpQ0LEx9gSubbRD3f5KSTp91mEMHgdyVcqUcxiBuVgRTfv3zy9mbPEdo8Mg==
dependencies:
dooboolab-welcome "1.3.2"
react-native-iap@^10.1.3:
version "10.1.3"
resolved "https://registry.yarnpkg.com/react-native-iap/-/react-native-iap-10.1.3.tgz#7f53d04064a1b6eae7467d05c638c7e1a4bbbe02"
integrity sha512-6Yz6IZ+8UWHIPUWtd6T25UOo57XZ8Waz3fYodcaGpWevovTvTAe36jtilcRJ/xZFVb033UCTfbqjWoIcEyM/JA==

react-native-image-picker@^7.0.1:
version "7.0.1"
Expand Down
Loading