Skip to content

Commit

Permalink
Merge branch 'staging'
Browse files Browse the repository at this point in the history
  • Loading branch information
paullinator committed Jun 25, 2024
2 parents 4743282 + 2dcfde7 commit d04e68e
Show file tree
Hide file tree
Showing 207 changed files with 7,263 additions and 3,505 deletions.
15 changes: 13 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ DerivedData
*.hmap
*.ipa
*.xcuserstate
ios/.xcode.env.local
**/.xcode.env.local

# Android/IntelliJ
#
Expand Down Expand Up @@ -109,8 +109,19 @@ yarn-error.log
*.jsbundle

# Ruby / CocoaPods
/ios/Pods/
**/Pods/
/vendor/bundle/

# Temporary files created by Metro to check the health of the file watcher
.metro-health-check*

# testing
/coverage

# Yarn
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
31 changes: 28 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,40 @@

## Unreleased

## 4.8.0

- added: "IP Validation Protection Enabled" bottom notification card
- added: useAsyncNavigation hook to prevent duplicate navigation calls
- added: Dynamic height for multiline text inputs
- added: Sentry SDK for crash reporting
- added: Gas requirement warnings for more UX flows
- added: Mainnet code appended to assets in exchange details modal
- changed: Some red Airship alerts deemed unecessary are now hidden from production builds
- changed: Add EUID to Simplex quoting API calls
- changed: Velodrome, cemetery, and masonry staking polcies - insufficient balance errors reduced severity to untracked warnings
- changed: Distinction between disabled and paused wallets
- changed: Wallet menu modal item ordering for "Split Wallet"
- changed: WalletConnect: Move initial wallet selection to connections list scene
- changed: Enable `keysOnlyMode` for Telos
- changed: Increase iOS minimum to 15.6
- fixed: Buy/Sell Scene briefly changes title after selecting payment method if an asset was pre-selected via the "Trade" modal
- fixed: Android Auto Log Off "Disabled" text color
- fixed: Android Auto Log Off "Disabled" selection showing as "0"
- fixed: WalletConnect Smart Contract Call details cut off
- fixed: Buy/Sell Scenes header underline not fully extending to the right
- fixed: Quickly spamming taps on certain buttons resulted in duplicate actions
- fixed: Banxa error due to API removing params
- removed: Bugsnag for crash reporting
- removed: Firebase/Google Analytics
- removed: Light Account Backup Modal A/B/C/D test experiment

## 4.7.0 (2024-05-31)

## 4.7.0

- addd: Dynamic height for multiline text inputs
- added: Add Visa/MC buy support with Paybis
- added: New Asset Setting to manually enable tokens with detected balances across all wallets
- added: MUTE_CONSOLE_OUTPUT environment variable to disable specific console output functions
- added: Performance logging with app start-up time and login time as initial performance metrics
- added: Support geo filtering for "Learn" blog cards on the Home Scene
- changed: (WalletConnect) Handle sessions with 0 required namespaces
- changed: Consistent light account backup modal UI
- changed: Currency icon now shown in wallet picker button in Swap and Transaction List scenes
Expand Down
153 changes: 151 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
plugins {
id "com.android.application"
id "io.sentry.android.gradle" version "4.6.0"
}

apply plugin: "com.android.application"
apply plugin: "org.jetbrains.kotlin.android"
apply plugin: "com.facebook.react"

// Edge build plugins:
apply plugin: 'com.bugsnag.android.gradle'
apply plugin: 'com.google.gms.google-services'
apply plugin: 'tech.formatter-kt.formatter'

Expand Down Expand Up @@ -73,6 +77,11 @@ def enableProguardInReleaseBuilds = false
* this variant is about 6MiB larger per architecture than default.
*/
def jscFlavor = 'org.webkit:android-jsc:+'
def sentrySlug = "SENTRY_ORGANIZATION_SLUG"

if (!sentrySlug.contains('SENTRY_ORGANIZATION')) {
apply from: new File(["node", "--print", "require.resolve('@sentry/react-native/package.json')"].execute().text.trim(), "../sentry.gradle")
}

android {
ndkVersion rootProject.ext.ndkVersion
Expand Down Expand Up @@ -117,7 +126,6 @@ android {
dependencies {
// The version of react-native is set by the React Native Gradle Plugin
implementation("com.facebook.react:react-android")
implementation("com.facebook.react:flipper-integration")

if (hermesEnabled.toBoolean()) {
implementation("com.facebook.react:hermes-android")
Expand Down Expand Up @@ -161,3 +169,144 @@ if (hasProperty('storeFile')) {

// Integrate react-native-vector-icons fonts
apply from: "../../node_modules/react-native-vector-icons/fonts.gradle"

import io.sentry.android.gradle.extensions.InstrumentationFeature
import io.sentry.android.gradle.instrumentation.logcat.LogcatLevel

if (!sentrySlug.contains('SENTRY_ORGANIZATION')) {
sentry {
// Disables or enables debug log output, e.g. for for sentry-cli.
// Default is disabled.
debug = false

// The slug of the Sentry organization to use for uploading proguard mappings/source contexts.
org = "SENTRY_ORGANIZATION_SLUG"

// The slug of the Sentry project to use for uploading proguard mappings/source contexts.
projectName = "SENTRY_PROJECT_SLUG"

// The authentication token to use for uploading proguard mappings/source contexts.
// WARNING: Do not expose this token in your build.gradle files, but rather set an environment
// variable and read it into this property.
authToken = System.getenv("SENTRY_MAP_UPLOAD_AUTH_TOKEN")

// The url of your Sentry instance. If you're using SAAS (not self hosting) you do not have to
// set this. If you are self hosting you can set your URL here
url = "SENTRY_MAP_UPLOAD_URL"

// Disables or enables the handling of Proguard mapping for Sentry.
// If enabled the plugin will generate a UUID and will take care of
// uploading the mapping to Sentry. If disabled, all the logic
// related to proguard mapping will be excluded.
// Default is enabled.
includeProguardMapping = true

// Whether the plugin should attempt to auto-upload the mapping file to Sentry or not.
// If disabled the plugin will run a dry-run and just generate a UUID.
// The mapping file has to be uploaded manually via sentry-cli in this case.
// Default is enabled.
autoUploadProguardMapping = true

// Experimental flag to turn on support for GuardSquare's tools integration (Dexguard and External Proguard).
// If enabled, the plugin will try to consume and upload the mapping file produced by Dexguard and External Proguard.
// Default is disabled.
dexguardEnabled = false

// Disables or enables the automatic configuration of Native Symbols
// for Sentry. This executes sentry-cli automatically so
// you don't need to do it manually.
// Default is disabled.
uploadNativeSymbols = true

// Whether the plugin should attempt to auto-upload the native debug symbols to Sentry or not.
// If disabled the plugin will run a dry-run.
// Default is enabled.
autoUploadNativeSymbols = true

// Does or doesn't include the source code of native code for Sentry.
// This executes sentry-cli with the --include-sources param. automatically so
// you don't need to do it manually.
// This option has an effect only when [uploadNativeSymbols] is enabled.
// Default is disabled.
includeNativeSources = true

// Generates a JVM (Java, Kotlin, etc.) source bundle and uploads your source code to Sentry.
// This enables source context, allowing you to see your source
// code as part of your stack traces in Sentry.
includeSourceContext = true

// Configure additional directories to be included in the source bundle which is used for
// source context. The directories should be specified relative to the Gradle module/project's
// root. For example, if you have a custom source set alongside 'main', the parameter would be
// 'src/custom/java'.
additionalSourceDirsForSourceContext = []

// Enable or disable the tracing instrumentation.
// Does auto instrumentation for specified features through bytecode manipulation.
// Default is enabled.
tracingInstrumentation {
enabled = true

// Specifies a set of instrumentation features that are eligible for bytecode manipulation.
// Defaults to all available values of InstrumentationFeature enum class.
features = [InstrumentationFeature.DATABASE, InstrumentationFeature.FILE_IO, InstrumentationFeature.OKHTTP, InstrumentationFeature.COMPOSE]

// Enable or disable logcat instrumentation through bytecode manipulation.
// Default is enabled.
logcat {
enabled = false

// Specifies a minimum log level for the logcat breadcrumb logging.
// Defaults to LogcatLevel.WARNING.
minLevel = LogcatLevel.WARNING
}

// The set of glob patterns to exclude from instrumentation. Classes matching any of these
// patterns in the project's sources and dependencies JARs won't be instrumented by the Sentry
// Gradle plugin.
//
// Don't include the file extension. Filtering is done on compiled classes and
// the .class suffix isn't included in the pattern matching.
//
// Example usage:
// ```
// excludes = ['com/example/donotinstrument/**', '**/*Test']
// ```
//
// Only supported when using Android Gradle plugin (AGP) version 7.4.0 and above.
excludes = []
}

// Enable auto-installation of Sentry components (sentry-android SDK and okhttp, timber and fragment integrations).
// Default is enabled.
// Only available v3.1.0 and above.
autoInstallation {
enabled = true

// Specifies a version of the sentry-android SDK and fragment, timber and okhttp integrations.
//
// This is also useful, when you have the sentry-android SDK already included into a transitive dependency/module and want to
// align integration versions with it (if it's a direct dependency, the version will be inferred).
//
// NOTE: if you have a higher version of the sentry-android SDK or integrations on the classpath, this setting will have no effect
// as Gradle will resolve it to the latest version.
//
// Defaults to the latest published Sentry version.
sentryVersion = '7.9.0'
}

// Disables or enables dependencies metadata reporting for Sentry.
// If enabled, the plugin will collect external dependencies and
// upload them to Sentry as part of events. If disabled, all the logic
// related to the dependencies metadata report will be excluded.
//
// Default is enabled.
includeDependenciesReport = true

// Whether the plugin should send telemetry data to Sentry.
// If disabled the plugin won't send telemetry data.
// This is auto disabled if running against a self hosted instance of Sentry.
// Default is enabled.
telemetry = true
}
}
15 changes: 1 addition & 14 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@
android:extractNativeLibs="true"
android:usesCleartextTraffic="true"
android:theme="@style/Theme.App.Starting">
<meta-data android:name="com.bugsnag.android.API_KEY"
android:value="a0000000000000000000000000000000"/>
<meta-data android:name="io.sentry.auto-init" android:value="false" />
<meta-data android:name="com.google.firebase.messaging.default_notification_icon"
android:resource="@mipmap/edge_logo_hollow" />
<activity
Expand All @@ -61,18 +60,6 @@
<data android:host="deep.edge.app" />
<data android:host="dl.edge.app" />
</intent-filter>
<intent-filter android:label="Edge Login" android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="https" android:host="www.edge.app" android:pathPrefix="/edgelogin" />
</intent-filter>
<intent-filter android:label="Edge Recovery">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="https" android:host="recovery.edgesecure.co" android:path="/recovery" />
</intent-filter>
<intent-filter android:label="Edge Deep Links">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
Expand Down
47 changes: 33 additions & 14 deletions android/app/src/main/java/co/edgesecure/app/MainApplication.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ package co.edgesecure.app

import android.app.Application
import android.content.res.Configuration
import com.bugsnag.android.BreadcrumbType
import com.bugsnag.android.Bugsnag
import com.facebook.react.PackageList
import com.facebook.react.ReactApplication
import com.facebook.react.ReactHost
Expand All @@ -12,11 +10,15 @@ import com.facebook.react.ReactPackage
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load
import com.facebook.react.defaults.DefaultReactHost.getDefaultReactHost
import com.facebook.react.defaults.DefaultReactNativeHost
import com.facebook.react.flipper.ReactNativeFlipper
import com.facebook.react.modules.i18nmanager.I18nUtil
import com.facebook.soloader.SoLoader
import expo.modules.ApplicationLifecycleDispatcher
import expo.modules.ReactNativeHostWrapper
import io.sentry.android.core.SentryAndroid
import io.sentry.Hint
import io.sentry.SentryEvent
import io.sentry.SentryLevel
import io.sentry.SentryOptions.BeforeSendCallback

class MainApplication : Application(), ReactApplication {
override val reactNativeHost: ReactNativeHost =
Expand All @@ -41,22 +43,40 @@ class MainApplication : Application(), ReactApplication {
)

override val reactHost: ReactHost
get() = getDefaultReactHost(this.applicationContext, reactNativeHost)
get() = getDefaultReactHost(applicationContext, reactNativeHost)

override fun onCreate() {
super.onCreate()

// @bugsnag/react-native
val config = com.bugsnag.android.Configuration.load(this)
config.enabledBreadcrumbTypes = object : HashSet<BreadcrumbType?>() {
init {
add(BreadcrumbType.ERROR)
add(BreadcrumbType.NAVIGATION)
add(BreadcrumbType.STATE)
add(BreadcrumbType.USER)
// Retrieve the version string from the app's BuildConfig
val versionString = BuildConfig.VERSION_NAME

if ("SENTRY_DSN_URL".contains("SENTRY_DSN")) {
// Sentry disabled. Need to add sentry keys to env.json
} else {
SentryAndroid.init(this) { options ->
options.dsn = "SENTRY_DSN_URL"

if (versionString == "99.99.99") {
options.environment = "development"
} else if (versionString.contains("-")) {
options.environment = "testing"
} else {
options.environment = "production"
}

// Add a callback that will be used before the event is sent to Sentry.
// With this callback, you can modify the event or, when returning null, also discard the event.
options.beforeSend =
BeforeSendCallback { event: SentryEvent, hint: Hint ->
if (SentryLevel.DEBUG == event.level) {
null
} else {
event
}
}
}
}
Bugsnag.start(this, config)

// Disable RTL:
val sharedI18nUtilInstance = I18nUtil.getInstance()
Expand All @@ -73,7 +93,6 @@ class MainApplication : Application(), ReactApplication {
// app.
load()
}
ReactNativeFlipper.initializeFlipper(this, reactNativeHost.reactInstanceManager)

// Expo addition:
ApplicationLifecycleDispatcher.onApplicationCreate(this)
Expand Down
3 changes: 2 additions & 1 deletion android/app/src/main/res/drawable/rn_edit_text_material.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
android:insetLeft="@dimen/abc_edit_text_inset_horizontal_material"
android:insetRight="@dimen/abc_edit_text_inset_horizontal_material"
android:insetTop="@dimen/abc_edit_text_inset_top_material"
android:insetBottom="@dimen/abc_edit_text_inset_bottom_material">
android:insetBottom="@dimen/abc_edit_text_inset_bottom_material"
>

<selector>
<!--
Expand Down
Loading

0 comments on commit d04e68e

Please sign in to comment.