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

Gh 1996 - Update up to date version #2002

Closed
wants to merge 3 commits into from
Closed
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
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ android {
defaultConfig {
applicationId "io.gnosis.safe"
versionCode getInt("APP_VERSION_CODE", 703)
versionName getKey("APP_VERSION_NAME", "3.8.0")
versionName getKey("APP_VERSION_NAME", "3.9.0")
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

// Infura API key
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class OwnerListViewModel
.sortedBy { it.name }
val acceptedOwners = owners.filter { localOwner ->
safe.signingOwners.any {
localOwner.address == it
localOwner.address == it && localOwner.type != Owner.Type.LEDGER_NANO_X
}
}
val balances = rpcClient.getBalances(acceptedOwners.map { it.address })
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ class TransactionDetailsFragment : BaseViewBindingFragment<FragmentTransactionDe
TransactionStatus.SUCCESS -> R.color.success
TransactionStatus.CANCELLED -> R.color.label_secondary
TransactionStatus.FAILED -> R.color.error
TransactionStatus.PENDING -> R.color.label_secondary
TransactionStatus.PENDING -> R.color.warning
}

@StringRes
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package io.gnosis.safe.ui.transactions.details

import androidx.annotation.VisibleForTesting
import io.gnosis.data.models.AddressInfo
import io.gnosis.data.models.Owner
import io.gnosis.data.models.Safe
import io.gnosis.data.models.TransactionLocal
Expand Down Expand Up @@ -135,7 +136,8 @@ class TransactionDetailsViewModel
executionInfo: DetailedExecutionInfo.MultisigExecutionDetails,
localOwners: List<Owner>
): Boolean {
return localOwners.isNotEmpty() && executionInfo.confirmations.size == executionInfo.confirmationsRequired
val ownersThatCanExecute = localOwners.filter { it.type != Owner.Type.LEDGER_NANO_X && executionInfo.signers.contains(AddressInfo(it.address))}
return ownersThatCanExecute.isNotEmpty() && executionInfo.confirmations.size == executionInfo.confirmationsRequired
}

@VisibleForTesting(otherwise = VisibleForTesting.PRIVATE)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,9 @@ class TxReviewViewModel
rpcClient.getBalances(acceptedOwners.map { it.address })
}.onSuccess {
executionKey = acceptedOwners
.filter {
it.type != Owner.Type.LEDGER_NANO_X
}
.mapIndexed { index, owner ->
owner to it[index]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -720,7 +720,7 @@ class TransactionDetailsViewModelTest {
txDetails = transactionDetails.toTransactionDetailsViewData(
safes = emptyList(),
canSign = false,
canExecute = true,
canExecute = false,
nextInLine = false,
hasOwnerKey = false,
owners = listOf(owner)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,7 @@ class SafeRepository(
val DEFAULT_FALLBACK_HANDLER = BuildConfig.DEFAULT_FALLBACK_HANDLER.asEthereumAddress()!!

fun isUpToDateVersion(version: SemVer?): Boolean {
//FIXME: adjust when 1.1.1 and 1.2.0 should not be regarded as up to date
return version != null && version >= SemVer(1, 1, 1)
return version != null && version >= SemVer(1, 3, 0)
}

fun isSupportedVersion(version: SemVer?): Boolean {
Expand Down