Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/rainbow-me/rainbow into …
Browse files Browse the repository at this point in the history
…brody/QR-code-scanner-fixes

* 'develop' of https://github.com/rainbow-me/rainbow:
  [PATCH]: react-native-fast-image iOS 17 spec (#5188)
  Feature: Add remote promo sheet (#5140)
  mints: fix insufficient eth check (#5186)
  sends: fix prev sends logic (#5185)
  Update copy for an Error Occurred message for Support (#5187)
  Fixes for activity list coin icons and migrating some components to network instead of assetType (#5143)
  audit: axios + reservior client bump (#5184)
  bump to v1.9.10 (#5183)
  nonces: reset nonces (#5170)
  Cleanup unused coinrow components (#5142)
  reviews: bump watch wallet threshold (#5181)
  lang: fix english revert (#5182)
  WC: enabled eth_sign but only for connections (#5180)
  wc: use methodRegistry on all networks (#5179)
  bump to v1.9.9 (#5173)
  walletconnect: sanitize 712 signs (#5159)
  • Loading branch information
BrodyHughes committed Nov 15, 2023
2 parents 94163fa + f2eebc5 commit c790ea6
Show file tree
Hide file tree
Showing 88 changed files with 1,301 additions and 1,510 deletions.
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,22 @@ and this project adheres to [Semantic Versioning](http://semver.org/)

### Fixed

## [1.9.9] (https://github.com/rainbow-me/rainbow/releases/tag/v1.9.9)

### Added

- Bug fixes
- WC improvements

## [1.9.8] (https://github.com/rainbow-me/rainbow/releases/tag/v1.9.8)

### Added

- WC dapp warnings
- e2e updates
- Fee updates to NFT Mints
- Account Asset improvements

## [1.9.7] (https://github.com/rainbow-me/rainbow/releases/tag/v1.9.7)

### Added
Expand Down
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,8 @@ android {
applicationId "me.rainbow"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 192
versionName "1.9.8"
versionCode 194
versionName "1.9.10"
missingDimensionStrategy 'react-native-camera', 'general'
renderscriptTargetApi 23
renderscriptSupportModeEnabled true
Expand Down
8 changes: 4 additions & 4 deletions ios/Rainbow.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1512,7 +1512,7 @@
"$(PROJECT_DIR)",
);
LLVM_LTO = YES;
MARKETING_VERSION = 1.9.8;
MARKETING_VERSION = 1.9.10;
OTHER_CFLAGS = "$(inherited)";
OTHER_CPLUSPLUSFLAGS = "$(OTHER_CFLAGS)";
OTHER_LDFLAGS = (
Expand Down Expand Up @@ -1575,7 +1575,7 @@
"$(PROJECT_DIR)",
);
LLVM_LTO = YES;
MARKETING_VERSION = 1.9.8;
MARKETING_VERSION = 1.9.10;
OTHER_CFLAGS = "$(inherited)";
OTHER_CPLUSPLUSFLAGS = "$(OTHER_CFLAGS)";
OTHER_LDFLAGS = (
Expand Down Expand Up @@ -1683,7 +1683,7 @@
"$(PROJECT_DIR)",
);
LLVM_LTO = YES;
MARKETING_VERSION = 1.9.8;
MARKETING_VERSION = 1.9.10;
OTHER_CFLAGS = "$(inherited)";
OTHER_CPLUSPLUSFLAGS = "$(OTHER_CFLAGS)";
OTHER_LDFLAGS = (
Expand Down Expand Up @@ -1792,7 +1792,7 @@
"$(PROJECT_DIR)",
);
LLVM_LTO = YES;
MARKETING_VERSION = 1.9.8;
MARKETING_VERSION = 1.9.10;
OTHER_CFLAGS = "$(inherited)";
OTHER_CPLUSPLUSFLAGS = "$(OTHER_CFLAGS)";
OTHER_LDFLAGS = (
Expand Down
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Rainbow",
"version": "1.9.8-1",
"version": "1.9.10-1",
"private": true,
"scripts": {
"setup": "yarn install && yarn graphql-codegen:install && yarn ds:install && yarn allow-scripts && yarn postinstall && yarn graphql-codegen",
Expand Down Expand Up @@ -115,7 +115,7 @@
"@react-navigation/material-top-tabs": "6.6.2",
"@react-navigation/native": "6.1.6",
"@react-navigation/stack": "6.3.16",
"@reservoir0x/reservoir-sdk": "1.5.4",
"@reservoir0x/reservoir-sdk": "1.8.4",
"@segment/analytics-react-native": "2.15.0",
"@segment/sovran-react-native": "1.0.4",
"@sentry/react-native": "3.4.1",
Expand Down Expand Up @@ -433,7 +433,8 @@
"**/socket.io-parser": "4.2.3",
"**/get-func-name": "3.0.0",
"**/@babel/traverse": "7.23.2",
"**/browserify-sign": "4.2.2"
"**/browserify-sign": "4.2.2",
"**/axios": "1.6.1"
},
"react-native": {
"@tanstack/query-async-storage-persister": "@tanstack/query-async-storage-persister/build/esm/index",
Expand Down
23 changes: 23 additions & 0 deletions patches/react-native-fast-image+8.5.11+fix-make-image.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
diff --git a/node_modules/react-native-fast-image/ios/FastImage/FFFastImageView.m b/node_modules/react-native-fast-image/ios/FastImage/FFFastImageView.m
index 9c0f1d3..db4da88 100644
--- a/node_modules/react-native-fast-image/ios/FastImage/FFFastImageView.m
+++ b/node_modules/react-native-fast-image/ios/FastImage/FFFastImageView.m
@@ -70,12 +70,12 @@ - (void)setImageColor:(UIColor *)imageColor {
}

- (UIImage*)makeImage:(UIImage *)image withTint:(UIColor *)color {
- UIImage *newImage = [image imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate];
- UIGraphicsBeginImageContextWithOptions(image.size, NO, newImage.scale);
- [color set];
- [newImage drawInRect:CGRectMake(0, 0, image.size.width, newImage.size.height)];
- newImage = UIGraphicsGetImageFromCurrentImageContext();
- UIGraphicsEndImageContext();
+ UIImage* newImage = [image imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate];
+ UIGraphicsImageRenderer *renderer = [[UIGraphicsImageRenderer alloc] initWithSize:image.size];
+ newImage = [renderer imageWithActions:^(UIGraphicsImageRendererContext * _Nonnull rendererContext) {
+ [color setFill];
+ [newImage drawInRect:CGRectMake(0, 0, image.size.width, newImage.size.height)];
+ }];
return newImage;
}

31 changes: 11 additions & 20 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,7 @@ import { Playground } from './design-system/playground/Playground';
import { TransactionType } from './entities';
import appEvents from './handlers/appEvents';
import handleDeeplink from './handlers/deeplinks';
import {
runFeatureAndCampaignChecks,
runWalletBackupStatusChecks,
} from './handlers/walletReadyEvents';
import { runWalletBackupStatusChecks } from './handlers/walletReadyEvents';
import {
getCachedProviderForNetwork,
isHardHat,
Expand Down Expand Up @@ -85,6 +82,7 @@ import branch from 'react-native-branch';
import { initializeReservoirClient } from '@/resources/reservoir/client';
import { ReviewPromptAction } from '@/storage/schema';
import { handleReviewPromptAction } from '@/utils/reviewAlert';
import { RemotePromoSheetProvider } from '@/components/remote-promo-sheet/RemotePromoSheetProvider';

if (__DEV__) {
reactNativeDisableYellowBox && LogBox.ignoreAllLogs();
Expand Down Expand Up @@ -187,15 +185,6 @@ class OldApp extends Component {
// Everything we need to do after the wallet is ready goes here
logger.info('✅ Wallet ready!');
runWalletBackupStatusChecks();

InteractionManager.runAfterInteractions(() => {
setTimeout(() => {
if (IS_TESTING === 'true') {
return;
}
runFeatureAndCampaignChecks();
}, 2000);
});
}
}

Expand Down Expand Up @@ -284,13 +273,15 @@ class OldApp extends Component {
<Portal>
<View style={containerStyle}>
{this.state.initialRoute && (
<InitialRouteContext.Provider value={this.state.initialRoute}>
<RoutesComponent
onReady={this.handleSentryNavigationIntegration}
ref={this.handleNavigatorRef}
/>
<PortalConsumer />
</InitialRouteContext.Provider>
<RemotePromoSheetProvider isWalletReady={this.props.walletReady}>
<InitialRouteContext.Provider value={this.state.initialRoute}>
<RoutesComponent
onReady={this.handleSentryNavigationIntegration}
ref={this.handleNavigatorRef}
/>
<PortalConsumer />
</InitialRouteContext.Provider>
</RemotePromoSheetProvider>
)}
<OfflineToast />
</View>
Expand Down
10 changes: 10 additions & 0 deletions src/analytics/event.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ export const event = {
appStateChange: 'State change',
analyticsTrackingDisabled: 'analytics_tracking.disabled',
analyticsTrackingEnabled: 'analytics_tracking.enabled',
promoSheetShown: 'promo_sheet.shown',
promoSheetDismissed: 'promo_sheet.dismissed',
swapSubmitted: 'Submitted Swap',
// notification promo sheet was shown
notificationsPromoShown: 'notifications_promo.shown',
Expand Down Expand Up @@ -120,6 +122,14 @@ export type EventProperties = {
inputCurrencySymbol: string;
outputCurrencySymbol: string;
};
[event.promoSheetShown]: {
campaign: string;
time_viewed: number;
};
[event.promoSheetDismissed]: {
campaign: string;
time_viewed: number;
};
[event.notificationsPromoShown]: undefined;
[event.notificationsPromoPermissionsBlocked]: undefined;
[event.notificationsPromoPermissionsGranted]: undefined;
Expand Down
130 changes: 0 additions & 130 deletions src/campaigns/swapsPromoCampaign.ts

This file was deleted.

12 changes: 6 additions & 6 deletions src/components/PromoSheet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { ImageSourcePropType, StatusBar, ImageBackground } from 'react-native';
import LinearGradient from 'react-native-linear-gradient';
import MaskedView from '@react-native-masked-view/masked-view';
import { SheetActionButton, SheetHandle, SlackSheet } from '@/components/sheet';
import { CampaignKey } from '@/campaigns/campaignChecks';
import { analytics } from '@/analytics';
import { CampaignKey } from '@/components/remote-promo-sheet/localCampaignChecks';
import { analyticsV2 } from '@/analytics';
import {
AccentColorProvider,
Box,
Expand Down Expand Up @@ -38,7 +38,7 @@ type PromoSheetProps = {
backgroundColor: string;
accentColor: string;
sheetHandleColor?: string;
campaignKey: CampaignKey;
campaignKey: CampaignKey | string;
header: string;
subHeader: string;
primaryButtonProps: SheetActionButtonProps;
Expand Down Expand Up @@ -74,7 +74,7 @@ export function PromoSheet({
() => () => {
if (!activated) {
const timeElapsed = (Date.now() - renderedAt) / 1000;
analytics.track('Dismissed Feature Promo', {
analyticsV2.track(analyticsV2.event.promoSheetDismissed, {
campaign: campaignKey,
time_viewed: timeElapsed,
});
Expand All @@ -86,12 +86,12 @@ export function PromoSheet({
const primaryButtonOnPress = useCallback(() => {
activate();
const timeElapsed = (Date.now() - renderedAt) / 1000;
analytics.track('Activated Feature Promo Action', {
analyticsV2.track(analyticsV2.event.promoSheetShown, {
campaign: campaignKey,
time_viewed: timeElapsed,
});
primaryButtonProps.onPress();
}, [activate, campaignKey, primaryButtonProps.onPress, renderedAt]);
}, [activate, campaignKey, primaryButtonProps, renderedAt]);

// We are not using `isSmallPhone` from `useDimensions` here as we
// want to explicitly set a min height.
Expand Down
Loading

0 comments on commit c790ea6

Please sign in to comment.