Skip to content
Open
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
17 changes: 16 additions & 1 deletion android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ android {

namespace "io.bluewallet.bluewallet"
defaultConfig {
applicationId "io.bluewallet.bluewallet"
applicationId "com.layertwolabs.bluewallet"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 1
Expand All @@ -103,13 +103,28 @@ android {
}
}

signingConfigs {
release {
def keystoreFile = file("${rootProject.projectDir}/../bluewallet-release-key.keystore")
if (keystoreFile.exists()) {
storeFile keystoreFile
storePassword System.getenv("KEYSTORE_PASSWORD") ?: ""
keyAlias "l2l dev"
keyPassword System.getenv("KEYSTORE_PASSWORD") ?: ""
}
}
}

buildTypes {
release {
// Caution! In production, you need to generate your own keystore file.
// see https://reactnative.dev/docs/signed-apk-android.
minifyEnabled enableProguardInReleaseBuilds
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
proguardFile "${rootProject.projectDir}/../node_modules/detox/android/detox/proguard-rules-app.pro"
if (signingConfigs.release.storeFile != null && signingConfigs.release.storeFile.exists()) {
signingConfig signingConfigs.release
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion android/app/google-services.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"client_info": {
"mobilesdk_app_id": "1:993804676679:android:3e611cf30d58bac8b5cb62",
"android_client_info": {
"package_name": "io.bluewallet.bluewallet"
"package_name": "com.layertwolabs.bluewallet"
}
},
"oauth_client": [
Expand Down
4 changes: 2 additions & 2 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

<meta-data
android:name="com.dieam.reactnativepushnotification.notification_channel_name"
android:value="BlueWallet notifications" />
android:value="RedWallet notifications" />
<meta-data
android:name="com.dieam.reactnativepushnotification.notification_channel_description"
android:value="Notifications about incoming payments" />
Expand Down Expand Up @@ -121,7 +121,7 @@
<!-- Settings Activity alias for System Settings -->
<activity-alias
android:name=".SettingsActivityAlias"
android:label="BlueWallet Settings"
android:label="RedWallet Settings"
android:exported="true"
android:targetActivity=".SettingsActivity">
<intent-filter>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class BitcoinPriceWidget : AppWidgetProvider() {

companion object {
private const val TAG = "BitcoinPriceWidget"
private const val SHARED_PREF_NAME = "group.io.bluewallet.bluewallet"
private const val SHARED_PREF_NAME = "group.com.layertwolabs.bluewallet"

fun updateNetworkStatus(context: Context, appWidgetIds: IntArray) {
val isNetworkAvailable = NetworkUtils.isNetworkAvailable(context)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class MainActivity : ReactActivity() {
* This is used to schedule rendering of the component.
*/
override fun getMainComponentName(): String {
return "BlueWallet"
return "RedWallet"
}

override fun onCreate(savedInstanceState: Bundle?) {
Expand All @@ -42,7 +42,7 @@ class MainActivity : ReactActivity() {
}

private fun checkAndShowCacheClearedAlert() {
val sharedPref = getSharedPreferences("group.io.bluewallet.bluewallet", Context.MODE_PRIVATE)
val sharedPref = getSharedPreferences("group.com.layertwolabs.bluewallet", Context.MODE_PRIVATE)
val shouldShowAlert = sharedPref.getBoolean("shouldShowCacheClearedAlert", false)

if (shouldShowAlert) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ class MainApplication : Application(), ReactApplication {

override fun onCreate() {
super.onCreate()
sharedPref = getSharedPreferences("group.io.bluewallet.bluewallet", Context.MODE_PRIVATE)
sharedPref = getSharedPreferences("group.com.layertwolabs.bluewallet", Context.MODE_PRIVATE)

// Handle clearFilesOnLaunch before registering listeners
clearFilesIfNeeded()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class MarketWidget : AppWidgetProvider() {

companion object {
private const val TAG = "MarketWidget"
private const val SHARED_PREF_NAME = "group.io.bluewallet.bluewallet"
private const val SHARED_PREF_NAME = "group.com.layertwolabs.bluewallet"
private const val DEFAULT_CURRENCY = "USD"
private const val KEY_LAST_ONLINE_STATUS = "market_widget_last_online_status"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class MarketWidgetUpdateWorker(context: Context, workerParams: WorkerParameters)
const val TAG = "MarketWidgetUpdateWorker"
const val WORK_NAME = "market_widget_update_work"
const val NETWORK_RETRY_WORK_NAME = "market_network_retry_work"
private const val SHARED_PREF_NAME = "group.io.bluewallet.bluewallet"
private const val SHARED_PREF_NAME = "group.com.layertwolabs.bluewallet"
private const val DEFAULT_CURRENCY = "USD"
private const val KEY_LAST_UPDATE_TIME = "market_widget_last_update_time"
private const val MIN_UPDATE_INTERVAL_MS = 15L * 60 * 1000
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class SettingsActivity : AppCompatActivity() {
class SettingsFragment : PreferenceFragmentCompat() {
override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) {
// Set the SharedPreferences name to match the app's preferences
preferenceManager.sharedPreferencesName = "group.io.bluewallet.bluewallet"
preferenceManager.sharedPreferencesName = "group.com.layertwolabs.bluewallet"

// Load preferences from XML
setPreferencesFromResource(R.xml.settings_preferences, rootKey)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import java.util.UUID
class SettingsModule(reactContext: ReactApplicationContext) : ReactContextBaseJavaModule(reactContext) {

private val sharedPref: SharedPreferences = reactContext.getSharedPreferences(
"group.io.bluewallet.bluewallet",
"group.com.layertwolabs.bluewallet",
Context.MODE_PRIVATE
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import android.content.res.Configuration
import androidx.appcompat.app.AppCompatDelegate

object ThemeHelper {
private const val SHARED_PREF_NAME = "group.io.bluewallet.bluewallet"
private const val SHARED_PREF_NAME = "group.com.layertwolabs.bluewallet"
private const val KEY_FORCE_DARK_MODE = "force_dark_mode"

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class WidgetUpdateWorker(context: Context, workerParams: WorkerParameters) : Cor
const val WORK_NAME = "bitcoin_price_widget_update_work"
const val NETWORK_RETRY_WORK_NAME = "bitcoin_price_network_retry_work"
const val REPEAT_INTERVAL_MINUTES = 15L
private const val SHARED_PREF_NAME = "group.io.bluewallet.bluewallet"
private const val SHARED_PREF_NAME = "group.com.layertwolabs.bluewallet"
private const val DEFAULT_CURRENCY = "USD"
private const val NETWORK_RETRY_DELAY_SECONDS = 30L

Expand Down
Binary file modified android/app/src/main/res/drawable-mdpi/splash_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/drawable-xhdpi/splash_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/drawable-xxhdpi/splash_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-hdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-mdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion android/app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<resources>
<string name="app_name">BlueWallet</string>
<string name="app_name">RedWallet</string>
<string name="loading">Loading...</string>
<string name="last_updated">Last Updated</string>
<string name="from">From</string>
Expand Down
2 changes: 1 addition & 1 deletion android/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
pluginManagement { includeBuild("../node_modules/@react-native/gradle-plugin") }
plugins { id("com.facebook.react.settings") }
extensions.configure(com.facebook.react.ReactSettingsExtension){ ex -> ex.autolinkLibrariesFromCommand() }
rootProject.name = 'BlueWallet'
rootProject.name = 'RedWallet'
include ':app'
includeBuild('../node_modules/@react-native/gradle-plugin')
include ':detox'
Expand Down
14 changes: 7 additions & 7 deletions blue_modules/BlueElectrum.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,11 @@ const ELECTRUM_CONNECTION_DISABLED = 'electrum_disabled';
const storageKey = 'ELECTRUM_PEERS';
const defaultPeer = { host: 'electrum1.bluewallet.io', ssl: 443 };
export const hardcodedPeers: Peer[] = [
{ host: 'mainnet.foundationdevices.com', ssl: 50002 },
{ host: 'bitcoin.lu.ke', ssl: 50002 },
// { host: 'electrum.jochen-hoenicke.de', ssl: '50006' },
{ host: 'electrum1.bluewallet.io', ssl: 443 },
{ host: 'electrum.acinq.co', ssl: 50002 },
{ host: 'electrum.bitaroo.net', ssl: 50002 },
// forknet
{ host: 'node.forknet.drivechain.info', tcp: 50001 },

// signet
{ host: 'node.signet.drivechain.info', tcp: 50001 },
];

export const suggestedServers: Peer[] = hardcodedPeers.map(peer => ({
Expand Down Expand Up @@ -284,7 +283,8 @@ export async function connectMain(): Promise<void> {
serverName = ver[0];
mainConnected = true;
wasConnectedAtLeastOnce = true;
if (ver[0].startsWith('ElectrumPersonalServer') || ver[0].startsWith('electrs') || ver[0].startsWith('Fulcrum')) {
if (ver[0].startsWith('ElectrumPersonalServer') || ver[0].startsWith('electrs') || ver[0].startsWith('mempool-electrs')
|| ver[0].startsWith('Fulcrum')) {
disableBatching = true;

// exeptions for versions:
Expand Down
2 changes: 1 addition & 1 deletion blue_modules/currency.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const PREFERRED_CURRENCY_STORAGE_KEY = 'preferredCurrency';
const PREFERRED_CURRENCY_LOCALE_STORAGE_KEY = 'preferredCurrencyLocale';
const EXCHANGE_RATES_STORAGE_KEY = 'exchangeRates';
const LAST_UPDATED = 'LAST_UPDATED';
export const GROUP_IO_BLUEWALLET = 'group.io.bluewallet.bluewallet';
export const GROUP_IO_BLUEWALLET = 'group.com.layertwolabs.bluewallet';
const BTC_PREFIX = 'BTC_';

export interface CurrencyRate {
Expand Down
6 changes: 3 additions & 3 deletions components/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ export interface ToolTipMenuProps {
}

export enum HandOffActivityType {
ReceiveOnchain = 'io.bluewallet.bluewallet.receiveonchain',
Xpub = 'io.bluewallet.bluewallet.xpub',
ViewInBlockExplorer = 'io.bluewallet.bluewallet.blockexplorer',
ReceiveOnchain = 'com.layertwolabs.bluewallet.receiveonchain',
Xpub = 'com.layertwolabs.bluewallet.xpub',
ViewInBlockExplorer = 'com.layertwolabs.bluewallet.blockexplorer',
}

export interface HandOffComponentProps {
Expand Down
2 changes: 1 addition & 1 deletion fastlane/Appfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
app_identifier("io.bluewallet.bluewallet")
app_identifier("com.layertwolabs.bluewallet")
apple_id(ENV["APPLE_ID"]) # Your Apple email ID
itc_team_id(ENV["ITC_TEAM_ID"]) # App Store Connect Team ID
57 changes: 26 additions & 31 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
# Define app identifiers once for reuse across lanes
def app_identifiers
[
"io.bluewallet.bluewallet",
"io.bluewallet.bluewallet.watch",
"io.bluewallet.bluewallet.watch.extension",
"io.bluewallet.bluewallet.Stickers",
"io.bluewallet.bluewallet.MarketWidget"
"com.layertwolabs.bluewallet"
]
end

Expand Down Expand Up @@ -121,7 +117,7 @@ platform :android do
end
end

desc "Update version, build number, and sign APK"
desc "Update version, build number, and sign AAB"
lane :update_version_build_and_sign_apk do
Dir.chdir(project_root) do
build_number = ENV['BUILD_NUMBER']
Expand All @@ -143,36 +139,31 @@ platform :android do
branch_name = branch_name.gsub(/[^a-zA-Z0-9_-]/, '_') # Replace non-alphanumeric characters with underscore
branch_name = 'master' if branch_name.nil? || branch_name.empty?

# Define APK name based on branch
signed_apk_name = branch_name != 'master' ?
"BlueWallet-#{version_name}-#{build_number}-#{branch_name}.apk" :
"BlueWallet-#{version_name}-#{build_number}.apk"
# Define AAB name based on branch
signed_aab_name = branch_name != 'master' ?
"BlueWallet-#{version_name}-#{build_number}-#{branch_name}.aab" :
"BlueWallet-#{version_name}-#{build_number}.aab"

# Define paths
unsigned_apk_path = "android/app/build/outputs/apk/release/app-release-unsigned.apk"
signed_apk_path = "android/app/build/outputs/apk/release/#{signed_apk_name}"
unsigned_aab_path = "android/app/build/outputs/bundle/release/app-release.aab"
signed_aab_path = "android/app/build/outputs/bundle/release/#{signed_aab_name}"

# Build APK
UI.message("Building APK...")
sh("cd android && ./gradlew assembleRelease --no-daemon")
UI.message("APK build completed.")
# Build AAB (Gradle will sign it automatically if signing config is set)
UI.message("Building AAB...")
sh("cd android && ./gradlew bundleRelease --no-daemon")
UI.message("AAB build completed.")

# Rename APK
if File.exist?(unsigned_apk_path)
UI.message("Renaming APK to #{signed_apk_name}...")
FileUtils.mv(unsigned_apk_path, signed_apk_path)
ENV['APK_OUTPUT_PATH'] = File.expand_path(signed_apk_path)
# Rename AAB
if File.exist?(unsigned_aab_path)
UI.message("Renaming AAB to #{signed_aab_name}...")
FileUtils.mv(unsigned_aab_path, signed_aab_path)
ENV['AAB_OUTPUT_PATH'] = File.expand_path(signed_aab_path)
ENV['APK_OUTPUT_PATH'] = File.expand_path(signed_aab_path) # Keep for backward compatibility
else
UI.error("Unsigned APK not found at path: #{unsigned_apk_path}")
UI.error("AAB not found at path: #{unsigned_aab_path}")
next
end

# Sign APK
UI.message("Signing APK with apksigner...")
apksigner_path = Dir.glob("#{ENV['ANDROID_HOME']}/build-tools/*/apksigner").sort.last
UI.user_error!("apksigner not found in Android build-tools") if apksigner_path.nil? || apksigner_path.empty?
sh("#{apksigner_path} sign --ks #{project_root}/bluewallet-release-key.keystore --ks-pass=pass:#{ENV['KEYSTORE_PASSWORD']} #{signed_apk_path}")
UI.message("APK signed successfully: #{signed_apk_path}")
end
end
end
Expand Down Expand Up @@ -357,7 +348,7 @@ platform :ios do

desc "Synchronize certificates and provisioning profiles"
lane :setup_provisioning_profiles do
required_vars = ["GIT_ACCESS_TOKEN", "GIT_URL", "ITC_TEAM_ID", "ITC_TEAM_NAME", "KEYCHAIN_PASSWORD"]
required_vars = ["GIT_USERNAME", "GIT_ACCESS_TOKEN", "GIT_URL", "ITC_TEAM_ID", "ITC_TEAM_NAME", "KEYCHAIN_PASSWORD"]
ensure_env_vars(required_vars)

UI.message("Setting up provisioning profiles...")
Expand All @@ -367,7 +358,7 @@ platform :ios do
with_retry(3, "Fetching provisioning profile for #{app_identifier}") do
UI.message("Fetching provisioning profile for #{app_identifier}...")
match(
git_basic_authorization: ENV["GIT_ACCESS_TOKEN"],
git_basic_authorization: Base64.strict_encode64("#{ENV["GIT_USERNAME"]}:#{ENV["GIT_ACCESS_TOKEN"]}"),
git_url: ENV["GIT_URL"],
type: "appstore",
clone_branch_directly: true,
Expand Down Expand Up @@ -493,7 +484,11 @@ platform :ios do


upload_to_testflight(
api_key_path: "./appstore_api_key.json",
api_key: app_store_connect_api_key(
key_id: ENV["APPLE_API_KEY_ID"],
issuer_id: ENV["APPLE_API_ISSUER_ID"],
key_filepath: ENV["APPLE_API_KEY_PATH"],
),
ipa: ipa_path,
skip_waiting_for_build_processing: true,
changelog: changelog
Expand Down
6 changes: 1 addition & 5 deletions fastlane/Matchfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,7 @@ type(ENV["MATCH_TYPE"] || "appstore")

# App identifiers for all BlueWallet apps
app_identifier([
"io.bluewallet.bluewallet",
"io.bluewallet.bluewallet.watch",
"io.bluewallet.bluewallet.watch.extension",
"io.bluewallet.bluewallet.Stickers",
"io.bluewallet.bluewallet.MarketWidget"
"com.layertwolabs.bluewallet"
])

# Your Apple Developer account email address
Expand Down
Binary file modified img/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed img/icon@2x.png
Binary file not shown.
Binary file removed img/icon@3x.png
Binary file not shown.
Binary file modified img/qr-code.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed img/qr-code@2x.png
Binary file not shown.
Binary file removed img/qr-code@3x.png
Binary file not shown.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ const BlueAppComponent = () => {
return <App />;
};

AppRegistry.registerComponent('BlueWallet', () => BlueAppComponent);
AppRegistry.registerComponent('RedWallet', () => BlueAppComponent);
Loading