diff --git a/.github/workflows/pr_workflow.yml b/.github/workflows/pr_workflow.yml index bea90ff331..924aec208c 100644 --- a/.github/workflows/pr_workflow.yml +++ b/.github/workflows/pr_workflow.yml @@ -16,11 +16,11 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Check if "rc" is present in github.ref + - name: Check if "rc" or "hotfix" is present in github.ref id: check_ref run: | echo ${{ github.head_ref || github.ref_name }} - if [[ "${{ github.head_ref || github.ref_name }}" == *"rc"* ]]; then + if [[ "${{ github.head_ref || github.ref_name }}" == "rc/"* || "${{ github.head_ref || github.ref_name }}" == "hotfix/"* ]]; then echo "ref_contains_rc=1" >> $GITHUB_OUTPUT else echo "ref_contains_rc=0" >> $GITHUB_OUTPUT @@ -55,6 +55,7 @@ jobs: id: extract_version run: | VERSION=${{ github.head_ref }} + VERSION=${VERSION/hotfix/rc} # Replace "hotfix" with "rc" echo "::set-output name=version::${VERSION#*rc/}" - uses: tibdex/github-app-token@v1 diff --git a/build.gradle b/build.gradle index 2d45127c06..053a6db98c 100644 --- a/build.gradle +++ b/build.gradle @@ -1,8 +1,8 @@ buildscript { ext { // App version - versionName = '7.10.0' - versionCode = 127 + versionName = '7.10.1' + versionCode = 128 applicationId = "io.novafoundation.nova" releaseApplicationSuffix = "market" diff --git a/feature-wallet-impl/src/main/java/io/novafoundation/nova/feature_wallet_impl/data/network/crosschain/validations/CannotDropBelowEdBeforePayingDeliveryFeeValidation.kt b/feature-wallet-impl/src/main/java/io/novafoundation/nova/feature_wallet_impl/data/network/crosschain/validations/CannotDropBelowEdWhenPayingDeliveryFeeValidation.kt similarity index 88% rename from feature-wallet-impl/src/main/java/io/novafoundation/nova/feature_wallet_impl/data/network/crosschain/validations/CannotDropBelowEdBeforePayingDeliveryFeeValidation.kt rename to feature-wallet-impl/src/main/java/io/novafoundation/nova/feature_wallet_impl/data/network/crosschain/validations/CannotDropBelowEdWhenPayingDeliveryFeeValidation.kt index 20fe395f7e..ddc4904cde 100644 --- a/feature-wallet-impl/src/main/java/io/novafoundation/nova/feature_wallet_impl/data/network/crosschain/validations/CannotDropBelowEdBeforePayingDeliveryFeeValidation.kt +++ b/feature-wallet-impl/src/main/java/io/novafoundation/nova/feature_wallet_impl/data/network/crosschain/validations/CannotDropBelowEdWhenPayingDeliveryFeeValidation.kt @@ -19,7 +19,7 @@ import io.novafoundation.nova.feature_wallet_api.domain.model.deliveryFeePart import io.novafoundation.nova.feature_wallet_api.domain.model.networkFeePart import io.novasama.substrate_sdk_android.hash.isPositive -class CannotDropBelowEdBeforePayingDeliveryFeeValidation( +class CannotDropBelowEdWhenPayingDeliveryFeeValidation( private val assetSourceRegistry: AssetSourceRegistry ) : AssetTransfersValidation { @@ -35,17 +35,17 @@ class CannotDropBelowEdBeforePayingDeliveryFeeValidation( val crossChainFeePlanks = value.crossChainFee?.networkFee?.amountByRequestedAccount.orZero() val sendingAmount = value.transfer.amountInPlanks + crossChainFeePlanks - val requiredAmountBeforePayingDeliveryFee = sendingAmount + networkFeePlanks + existentialDeposit + val requiredAmountWhenPayingDeliveryFee = sendingAmount + networkFeePlanks + deliveryFeePart + existentialDeposit val balanceCountedTowardsEd = value.originUsedAsset.balanceCountedTowardsEDInPlanks return when { !paysDeliveryFee -> valid() - requiredAmountBeforePayingDeliveryFee <= balanceCountedTowardsEd -> valid() + requiredAmountWhenPayingDeliveryFee <= balanceCountedTowardsEd -> valid() else -> { - val availableBalance = (balanceCountedTowardsEd - networkFeePlanks - crossChainFeePlanks - existentialDeposit).atLeastZero() + val availableBalance = (balanceCountedTowardsEd - networkFeePlanks - deliveryFeePart - crossChainFeePlanks - existentialDeposit).atLeastZero() validationError( ToStayAboveEdBeforePayingDeliveryFees( @@ -60,4 +60,4 @@ class CannotDropBelowEdBeforePayingDeliveryFeeValidation( fun AssetTransfersValidationSystemBuilder.cannotDropBelowEdBeforePayingDeliveryFee( assetSourceRegistry: AssetSourceRegistry -) = validate(CannotDropBelowEdBeforePayingDeliveryFeeValidation(assetSourceRegistry)) +) = validate(CannotDropBelowEdWhenPayingDeliveryFeeValidation(assetSourceRegistry))