Skip to content

Commit

Permalink
Merge pull request #1244 from dashpay/dashpay-merge-10.0.2
Browse files Browse the repository at this point in the history
chore(dashpay): merge Dash Wallet 10.0.2
  • Loading branch information
HashEngineering authored Jan 5, 2024
2 parents e5eaa78 + 9021f85 commit fc31944
Show file tree
Hide file tree
Showing 387 changed files with 6,006 additions and 4,158 deletions.
4 changes: 2 additions & 2 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ ij_kotlin_allow_trailing_comma_on_call_site = false
ij_kotlin_imports_layout = *,java.**,javax.**,kotlin.**,^
max_line_length = 120
ktlint_standard_no-wildcard-imports = disabled
ktlint_disabled_rules = no-wildcard-imports, spacing-between-declarations-with-annotations
ktlint_disabled_rules = no-wildcard-imports, spacing-between-declarations-with-annotations, package-name
ktlint_standard_package-name = disabled
ktlint_standard_spacing-between-declarations-with-annotations = disabled
ktlint_standard_colon-spacing = disabled
ktlint_standard_colon-spacing = disabled
7 changes: 4 additions & 3 deletions .github/workflows/dashpay.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- name: set up JDK
uses: actions/setup-java@v3
with:
java-version: '11'
java-version: '17'
distribution: 'adopt'
cache: gradle

Expand All @@ -53,6 +53,7 @@ jobs:
- name: Setup fastlane
run: |
gem install bundler:2.2.26
gem install google-cloud-storage
bundle config path vendor/bundle
bundle install --jobs 4 --retry 3
Expand Down Expand Up @@ -91,6 +92,6 @@ jobs:
if: github.event_name == 'pull_request'
run: bundle exec fastlane build flavor:"staging" type:"release" storepass:"${{ secrets.SIGNING_STORE_PASS }}" versioncode:"${{ env.build_number }}"

- name: Build and Firebase Distribution
- name: Staging Build and Firebase Distribution
if: github.event_name == 'push'
run: bundle exec fastlane build_distribute flavor:"staging" type:"release" storepass:"${{ secrets.SIGNING_STORE_PASS }}" versioncode:"${{ env.build_number }}" comment:"Up to date DashPay build" appid:"1:1039839682638:android:bbcfa8c9939ee993ea631f" testgroup:"qa"
run: bundle exec fastlane build_distribute flavor:"staging" type:"release" storepass:"${{ secrets.SIGNING_STORE_PASS }}" versioncode:"${{ env.build_number }}" comment:"Up to date Dash Wallet TestNet build" appid:"1:1039839682638:android:3202b16d460a1a88" testgroup:"qa" SUPPORT_EMAIL:"${{ secrets.INTERNAL_SUPPORT_EMAIL }}"
2 changes: 1 addition & 1 deletion .github/workflows/dashwallet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- name: set up JDK
uses: actions/setup-java@v3
with:
java-version: '11'
java-version: '17'
distribution: 'adopt'
cache: gradle

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ktlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: set up JDK
uses: actions/setup-java@v3
with:
java-version: '11'
java-version: '17'
distribution: 'adopt'
cache: gradle

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/manual_distribution.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
- name: set up JDK
uses: actions/setup-java@v3
with:
java-version: '16'
java-version: '17'
distribution: 'adopt'
cache: gradle

Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }

# gem "rails"

gem "fastlane", "~> 2.214.0"
gem "fastlane", "~> 2.216.0"

plugins_path = File.join(File.dirname(__FILE__), 'fastlane', 'Pluginfile')
eval_gemfile(plugins_path) if File.exist?(plugins_path)
50 changes: 27 additions & 23 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,22 @@ GEM
specs:
CFPropertyList (3.0.6)
rexml
addressable (2.8.4)
addressable (2.8.5)
public_suffix (>= 2.0.2, < 6.0)
artifactory (3.0.15)
atomos (0.1.3)
aws-eventstream (1.2.0)
aws-partitions (1.793.0)
aws-sdk-core (3.180.0)
aws-partitions (1.830.0)
aws-sdk-core (3.184.0)
aws-eventstream (~> 1, >= 1.0.2)
aws-partitions (~> 1, >= 1.651.0)
aws-sigv4 (~> 1.5)
jmespath (~> 1, >= 1.6.1)
aws-sdk-kms (1.71.0)
aws-sdk-core (~> 3, >= 3.177.0)
aws-sdk-kms (1.72.0)
aws-sdk-core (~> 3, >= 3.184.0)
aws-sigv4 (~> 1.1)
aws-sdk-s3 (1.132.0)
aws-sdk-core (~> 3, >= 3.179.0)
aws-sdk-s3 (1.136.0)
aws-sdk-core (~> 3, >= 3.181.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.6)
aws-sigv4 (1.6.0)
Expand All @@ -36,7 +36,7 @@ GEM
unf (>= 0.0.5, < 1.0.0)
dotenv (2.8.1)
emoji_regex (3.2.3)
excon (0.100.0)
excon (0.103.0)
faraday (1.10.3)
faraday-em_http (~> 1.0)
faraday-em_synchrony (~> 1.0)
Expand Down Expand Up @@ -66,7 +66,7 @@ GEM
faraday_middleware (1.2.0)
faraday (~> 1.0)
fastimage (2.2.7)
fastlane (2.214.0)
fastlane (2.216.0)
CFPropertyList (>= 2.3, < 4.0.0)
addressable (>= 2.8, < 3.0.0)
artifactory (~> 3.0)
Expand All @@ -87,6 +87,7 @@ GEM
google-apis-playcustomapp_v1 (~> 0.1)
google-cloud-storage (~> 1.31)
highline (~> 2.0)
http-cookie (~> 1.0.5)
json (< 3.0.0)
jwt (>= 2.1.0, < 3)
mini_magick (>= 4.9.4, < 5.0.0)
Expand All @@ -98,16 +99,17 @@ GEM
security (= 0.1.3)
simctl (~> 1.6.3)
terminal-notifier (>= 2.0.0, < 3.0.0)
terminal-table (>= 1.4.5, < 2.0.0)
terminal-table (~> 3)
tty-screen (>= 0.6.3, < 1.0.0)
tty-spinner (>= 0.8.0, < 1.0.0)
word_wrap (~> 1.0.0)
xcodeproj (>= 1.13.0, < 2.0.0)
xcpretty (~> 0.3.0)
xcpretty-travis-formatter (>= 0.0.3)
fastlane-plugin-firebase_app_distribution (0.6.1)
fastlane-plugin-firebase_app_distribution (0.7.4)
google-apis-firebaseappdistribution_v1 (~> 0.3.0)
gh_inspector (1.1.3)
google-apis-androidpublisher_v3 (0.46.0)
google-apis-androidpublisher_v3 (0.50.0)
google-apis-core (>= 0.11.0, < 2.a)
google-apis-core (0.11.1)
addressable (~> 2.5, >= 2.5.1)
Expand All @@ -118,6 +120,8 @@ GEM
retriable (>= 2.0, < 4.a)
rexml
webrick
google-apis-firebaseappdistribution_v1 (0.3.0)
google-apis-core (>= 0.11.0, < 2.a)
google-apis-iamcredentials_v1 (0.17.0)
google-apis-core (>= 0.11.0, < 2.a)
google-apis-playcustomapp_v1 (0.13.0)
Expand All @@ -138,10 +142,9 @@ GEM
google-cloud-core (~> 1.6)
googleauth (>= 0.16.2, < 2.a)
mini_mime (~> 1.0)
googleauth (1.7.0)
googleauth (1.8.1)
faraday (>= 0.17.3, < 3.a)
jwt (>= 1.4, < 3.0)
memoist (~> 0.16)
multi_json (~> 1.11)
os (>= 0.9, < 2.0)
signet (>= 0.16, < 2.a)
Expand All @@ -152,9 +155,8 @@ GEM
jmespath (1.6.2)
json (2.6.3)
jwt (2.7.1)
memoist (0.16.2)
mini_magick (4.12.0)
mini_mime (1.1.2)
mini_mime (1.1.5)
multi_json (1.15.0)
multipart-post (2.3.0)
nanaimo (0.3.0)
Expand All @@ -174,7 +176,7 @@ GEM
ruby2_keywords (0.0.5)
rubyzip (2.3.2)
security (0.1.3)
signet (0.17.0)
signet (0.18.0)
addressable (~> 2.8)
faraday (>= 0.17.5, < 3.a)
jwt (>= 1.5, < 3.0)
Expand All @@ -183,8 +185,8 @@ GEM
CFPropertyList
naturally
terminal-notifier (2.0.0)
terminal-table (1.8.0)
unicode-display_width (~> 1.1, >= 1.1.1)
terminal-table (3.0.2)
unicode-display_width (>= 1.1.1, < 3)
trailblazer-option (0.1.2)
tty-cursor (0.7.1)
tty-screen (0.8.1)
Expand All @@ -194,10 +196,10 @@ GEM
unf (0.1.4)
unf_ext
unf_ext (0.0.8.2)
unicode-display_width (1.8.0)
unicode-display_width (2.4.2)
webrick (1.8.1)
word_wrap (1.0.0)
xcodeproj (1.22.0)
xcodeproj (1.23.0)
CFPropertyList (>= 2.3.3, < 4.0)
atomos (~> 0.1.3)
claide (>= 1.0.2, < 2.0)
Expand All @@ -210,11 +212,13 @@ GEM
xcpretty (~> 0.2, >= 0.0.7)

PLATFORMS
arm64-darwin-21
arm64-darwin-22
x86_64-linux

DEPENDENCIES
fastlane (~> 2.214.0)
fastlane (~> 2.216.0)
fastlane-plugin-firebase_app_distribution

BUNDLED WITH
2.4.17
2.4.20
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ buildscript {
kotlin_version = '1.8.22'
coroutinesVersion = '1.6.4'
ok_http_version = '4.9.1'
dashjVersion = '20.0.0-CJ-SNAPSHOT'
dashjVersion = '20.0.2-CJ-SNAPSHOT'
hiltVersion = '2.45'
hiltWorkVersion = '1.0.0'
workRuntimeVersion='2.7.1'
Expand All @@ -14,7 +14,7 @@ buildscript {

// Architecture
lifecycleVersion = '2.5.1'
navigationVersion = '2.5.3'
navigationVersion = '2.6.0'
datastoreVersion = "1.0.0"
hiltVersion = '2.45'
hiltWorkVersion = '1.0.0'
Expand Down Expand Up @@ -67,7 +67,7 @@ allprojects {
google()
mavenLocal()
mavenCentral()
maven { url 'https://s01.oss.sonatype.org/content/repositories/snapshots/' }
maven { url 'https://jitpack.io' }
maven { url 'https://s01.oss.sonatype.org/content/repositories/snapshots/' }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,4 @@ interface WalletDataProvider {
fun checkSendingConditions(address: Address?, amount: Coin)

fun observeMostRecentTransaction(): Flow<Transaction>

fun getWalletExtensions(): Array<WalletExtension>

fun addOrGetAuthenticationGroupExtension(): AuthenticationGroupExtension
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import java.util.*
data class BlockchainState(var bestChainDate: Date?,
var bestChainHeight: Int,
var replaying: Boolean,
var impediments: Set<Impediment>,
var impediments: MutableSet<Impediment>,
var chainlockHeight: Int,
var mnlistHeight: Int,
var percentageSync: Int) {
Expand Down
22 changes: 22 additions & 0 deletions common/src/main/java/org/dash/wallet/common/ui/LockScreenAware.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/*
* Copyright 2023 Dash Core Group.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

package org.dash.wallet.common.ui

interface LockScreenAware {
fun onLockScreenActivated()
}
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,15 @@ open class AdaptiveDialog(@LayoutRes private val layout: Int): DialogFragment()
action: suspend () -> T
): T {
val dialog = progress(message)
dialog.show(activity) { }
val result = action.invoke()

if (dialog.activity != null && dialog.isAdded) {
dialog.dismissAllowingStateLoss()
try {
dialog.show(activity) { }
return action.invoke()
} finally {
if (dialog.activity != null && dialog.isAdded) {
dialog.dismissAllowingStateLoss()
}
}

return result
}

@JvmStatic
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ object Constants {
const val PREFIX_ALMOST_EQUAL_TO = CHAR_ALMOST_EQUAL_TO.toString() + CHAR_THIN_SPACE

const val USER_BUY_SELL_DASH = 101
const val RESULT_CODE_GO_HOME = 100

var MAX_MONEY: Coin = MainNetParams.get().maxMoney
val ECONOMIC_FEE: Coin = Coin.valueOf(1000)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,5 +85,5 @@ fun Fiat.toFormattedStringNoCode(): String {
return format.format(this).toString()
}

fun Fiat.discountBy(percentage: Double) =
fun Fiat.discountBy(percentage: Double): Fiat =
Fiat.valueOf(currencyCode, (value * (100.0 - percentage) / 100).toLong())
Loading

0 comments on commit fc31944

Please sign in to comment.