Skip to content

Commit

Permalink
Merge branch 'master' into feature/vip_codes2
Browse files Browse the repository at this point in the history
  • Loading branch information
kurtnebiev-elvis4 authored Jul 3, 2024
2 parents a8b2882 + 28e732a commit e2acdf9
Show file tree
Hide file tree
Showing 11 changed files with 34 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ class GetAmountActivity : AppCompatActivity(), NumberEntryListener {
}
}

@OnClick(R.id.btCurrency)
@OnClick(R.id.btCurrency, R.id.currencyClickArea)
fun onSwitchCurrencyClick(view: View) {
val currencyList = availableCurrencyList()
if (currencyList.size > 1) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ class SendCoinsActivity : AppCompatActivity(), BroadcastResultListener, AmountLi
getTransactionDataStatus().value = SendCoinsModel.TransactionDataStatus.READY
}
})
spinner?.adapter = ArrayAdapter(context,
spinner?.adapter = ArrayAdapter(this@SendCoinsActivity ,
R.layout.layout_send_coin_transaction_replace, R.id.text, getTxItems()).apply {
this.setDropDownViewResource(R.layout.layout_send_coin_transaction_replace_dropdown)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public class ExponentialLowPrioAlgorithm implements FeeItemsAlgorithm {

public ExponentialLowPrioAlgorithm(long minValue, long maxValue) {
minPosition = 1;
algorithm = new ExponentialFeeItemsAlgorithm(minValue, 1, 140000, 15);
algorithm = new ExponentialFeeItemsAlgorithm(minValue, 1, maxValue, 15);
maxPosition = minPosition;
while (algorithm.computeValue(maxPosition + 1) < maxValue) {
maxPosition++;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -517,13 +517,12 @@ abstract class SendCoinsViewModel(application: Application) : AndroidViewModel(a
model.outputList.value = newList
}

var lastAdded = 0
fun addEmptyOutput() {
val newId = (model.outputList.value?.maxByOrNull { it.id }?.id ?: -1) + 1
model.outputList.postValue(
model.outputList.value.orEmpty()
+ BatchItem(lastAdded, "Address ${lastAdded + 1}", null, null, null)
+ BatchItem(newId, "Address ${newId + 1}", null, null, null)
)
lastAdded++
}

fun removeOutput(it: BatchItem) {
Expand Down
10 changes: 10 additions & 0 deletions mbw/src/main/res/layout/get_amount_activity.xml
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,16 @@
tools:text="0.00 USD"
tools:visibility="visible" />

<View
android:id="@+id/currencyClickArea"
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constraintBottom_toBottomOf="@id/tvAlternateAmount"
app:layout_constraintStart_toStartOf="@id/btCurrency"
android:layout_marginStart="-56dp"
app:layout_constraintEnd_toEndOf="@id/currency_dropdown_image_view"
app:layout_constraintTop_toTopOf="@id/btCurrency"/>


</androidx.constraintlayout.widget.ConstraintLayout>

Expand Down
4 changes: 2 additions & 2 deletions mbw/src/main/res/layout/send_coins_activity.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
</data>


<ScrollView
<androidx.core.widget.NestedScrollView
android:id="@+id/root"
android:layout_width="match_parent"
android:layout_height="match_parent"
Expand Down Expand Up @@ -110,5 +110,5 @@
bind:activity="@{activity}"
bind:viewModel="@{viewModel}" />
</LinearLayout>
</ScrollView>
</androidx.core.widget.NestedScrollView>
</layout>
7 changes: 4 additions & 3 deletions mbw/src/main/res/layout/send_coins_activity_btc.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
</data>


<ScrollView
<androidx.core.widget.NestedScrollView
android:id="@+id/root"
android:layout_width="match_parent"
android:layout_height="wrap_content"
Expand Down Expand Up @@ -52,6 +52,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:nestedScrollingEnabled="false"
bind:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
android:visibility="@{viewModel.isBatch() ? View.VISIBLE : View.GONE}" />

Expand All @@ -70,7 +71,7 @@
android:layout_marginVertical="14dp"
android:drawableStart="@drawable/ic_plus_nofill"
android:drawablePadding="@dimen/size_x2"
android:text="Add address"
android:text="@string/add_address"
android:visibility="@{viewModel.isBatch() ? View.VISIBLE : View.GONE}" />
</FrameLayout>

Expand Down Expand Up @@ -140,5 +141,5 @@
bind:activity="@{activity}"
bind:viewModel="@{viewModel}" />
</LinearLayout>
</ScrollView>
</androidx.core.widget.NestedScrollView>
</layout>
4 changes: 2 additions & 2 deletions mbw/src/main/res/layout/send_coins_activity_eth.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
type="com.mycelium.wallet.activity.send.model.SendEthViewModel" />
</data>

<ScrollView
<androidx.core.widget.NestedScrollView
android:id="@+id/root"
android:layout_width="match_parent"
android:layout_height="match_parent"
Expand Down Expand Up @@ -173,5 +173,5 @@
bind:activity="@{activity}"
bind:viewModel="@{viewModel}" />
</LinearLayout>
</ScrollView>
</androidx.core.widget.NestedScrollView>
</layout>
4 changes: 2 additions & 2 deletions mbw/src/main/res/layout/send_coins_activity_fio.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
type="com.mycelium.wallet.activity.send.model.SendFioViewModel" />
</data>

<ScrollView
<androidx.core.widget.NestedScrollView
android:id="@+id/root"
android:layout_width="match_parent"
android:layout_height="match_parent"
Expand Down Expand Up @@ -92,5 +92,5 @@
bind:activity="@{activity}"
bind:viewModel="@{viewModel}" />
</LinearLayout>
</ScrollView>
</androidx.core.widget.NestedScrollView>
</layout>
5 changes: 5 additions & 0 deletions mbw/src/main/res/values-ru/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,11 @@
<string name="verify_backup_no_such_record">Закрытый ключ не соответствует ни одному из ваших биткойн адресов.</string>
<string name="wrong_seed">Отсканированный seed-ключ не совпадает с вашим мастер-ключом seed.</string>
<string name="backup_missing">Отсутствует резервная копия</string>
<string name="backup_later">Сделать позже</string>
<string name="backup_now">Сделать Backup</string>
<string name="i_understand_the_risks">Я понимаю риски</string>
<string name="single_address_backup_missing">КОШЕЛЕК НЕ МОЖЕТ БЫТЬ ВОССТАНОВЛЕН БЕЗ РЕЗЕРВНОЙ КОПИИ! ЕСЛИ ВЫ ПОТЕРЯЕТЕ РЕЗЕРВНУЮ КОПИЮ, МЫ НЕ СМОЖЕМ ПОМОЧЬ ВАМ ВОССТАНОВИТЬ КОШЕЛЕК! НЕТ РЕЗЕРВНОЙ КОПИИ - НЕТ МОНЕТ!</string>
<string name="wallet_backup_missing">КОШЕЛЕК НЕ МОЖЕТ БЫТЬ ВОССТАНОВЛЕН БЕЗ РЕЗЕРВНОЙ КОПИИ! ЕСЛИ ВЫ ПОТЕРЯЕТЕ РЕЗЕРВНУЮ КОПИЮ, МЫ НЕ СМОЖЕМ ПОМОЧЬ ВАМ ВОССТАНОВИТЬ КОШЕЛЕК! НЕТ РЕЗЕРВНОЙ КОПИИ - НЕТ МОНЕТ!</string>
<string name="verify_backup_title">ВАЖНО !</string>
<string name="verify_backup_message_text_1">Наличие надлежащего резервного копирования является краеугольным камнем при управлении вашими биткойнами.\nУ вас есть один или более закрытый ключ или мастер-ключ (seed), который не был проверен.\n\nПожалуйста, выберете опцию резервирования для создания резервной копии.</string>
<string name="verify_backup_message_text_2">Затем выберите опцию \"Проверить резервную копию\" и проверьте сделанное вами резервное копирование.</string>
Expand Down
7 changes: 4 additions & 3 deletions mbw/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1120,8 +1120,8 @@ All new bitcoins, mined by the pool, are proportionally distributed among RMC bi
<string name="bitcoin_cash_module"><![CDATA[Mycelium Bitcoin <font color="#f08c18">Cash</font> Module]]></string>
<string name="bitcoin_cash_module_short">BCH</string>
<string name="exchange_bch_to_btc">EXCHANGE BCH TO BTC</string>
<string name="single_address_backup_missing">No backup - no bitcoins! In order not to lose your bitcoins when your smartphone is lost or broken please make a backup of this address NOW and keep it in a safe place!</string>
<string name="wallet_backup_missing">No backup - no coins! In order not to lose your coins when your smartphone is lost or broken please make a wallet backup NOW and keep it in a safe place!</string>
<string name="single_address_backup_missing">A WALLET CAN\'T BE RESTORED WITHOUT A BACKUP! ALSO, IF YOU LOSE YOUR BACKUP, WE WILL NOT BE ABLE TO HELP YOU RECOVER YOUR WALLET! NO BACKUP - NO COINS!</string>
<string name="wallet_backup_missing">A WALLET CAN\'T BE RESTORED WITHOUT A BACKUP! ALSO, IF YOU LOSE YOUR BACKUP, WE WILL NOT BE ABLE TO HELP YOU RECOVER YOUR WALLET! NO BACKUP - NO COINS!</string>
<string name="backup">BACKUP</string>
<string name="backup_later">Backup later</string>
<string name="backup_now">Backup now</string>
Expand Down Expand Up @@ -1760,7 +1760,7 @@ All new bitcoins, mined by the pool, are proportionally distributed among RMC bi
<string name="gas_limit_error">Minimal gas limit for Ethereum network transactions is 21 000 units.</string>
<string name="parent_eth_account">ETH %s:</string>
<string name="connection_issues"><b>Connection issues.</b> Please make sure you\'re online.</string>
<string name="course_outdated">course is outdated</string>
<string name="course_outdated">Exchange rate is outdated</string>
<string name="network_s">%s Network</string>
<string name="changelly2_policy_text">Service is available through third-party API provider. By clicking Exchange you accept the <font color="#4583de">Terms of Use</font>.</string>
<string name="changelly2_select_from">Select account:</string>
Expand Down Expand Up @@ -1878,4 +1878,5 @@ All new bitcoins, mined by the pool, are proportionally distributed among RMC bi
<string name="vip_unexpected_alert_message">Please try again later</string>
<string name="vip_alert_proceed">Yes, proceed</string>
<string name="vip_alert_cancel">Cancel</string>
<string name="add_address">Add address</string>
</resources>

0 comments on commit e2acdf9

Please sign in to comment.