Skip to content

Commit

Permalink
Fix HW signing issue bug
Browse files Browse the repository at this point in the history
Disable for now, add HW signing later
  • Loading branch information
akumaigorodski committed Oct 20, 2023
1 parent 5632af5 commit a99da2e
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 13 deletions.
10 changes: 2 additions & 8 deletions app/src/main/java/com/btcontract/wallet/HubActivity.scala
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ class HubActivity extends BaseActivity with ExternalDataChecker { me =>
addFlowChip(extraInfo, chipText = getString(popup_chain_fee) format fee, R.drawable.border_gray)
}

for (addressInfo <- findTxInputAddress(info.tx).headOption) {
for (addressInfo <- findTxInputAddress(info.tx).headOption if addressInfo.ewt.secrets.nonEmpty) {
def doSign: Unit = bringSignDialog(getString(sign_sign_message_tx_title).format(addressInfo.identity.short, info.txidString.humanFour).asDefView, addressInfo)
addFlowChip(extraInfo, getString(sign_sign_message), R.drawable.border_yellow, _ => doSign)
}
Expand All @@ -505,18 +505,12 @@ class HubActivity extends BaseActivity with ExternalDataChecker { me =>
case info: AddressInfo =>
addFlowChip(extraInfo, "Copy address", R.drawable.border_yellow, _ => WalletApp.app copy info.identity)
def doSign: Unit = bringSignDialog(getString(sign_sign_message_title).format(info.identity.short).asDefView, info)
val sign = addFlowChip(extraInfo, getString(sign_sign_message), R.drawable.border_yellow, _ => doSign)
if (info.ewt.secrets.nonEmpty) addFlowChip(extraInfo, getString(sign_sign_message), R.drawable.border_yellow, _ => doSign)

addressSpec.amounts.get(info.pubKey).map(_.toMilliSatoshi) foreach { balance =>
val amount = WalletApp.denom.parsedWithSign(balance, cardIn, cardZero)
addFlowChip(extraInfo, s"balance $amount", R.drawable.border_gray)
}

if (info.core.core.masterFingerprint.nonEmpty) {
// TODO: disable for now, implement HW signing later
sign.setEnabled(false)
sign.setAlpha(0.6F)
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values-es/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
<string name="dialog_add_description">Adjuntar descripción&#8230;</string>
<string name="dialog_set_label">Agregar etiqueta&#8230;</string>

<string name="dialog_receive_btc"><![CDATA[Your <b>Bitcoin</b> address]]></string>
<string name="dialog_receive_btc"><![CDATA[Your address]]></string>

<string name="dialog_up_to"><![CDATA[<b>hasta</b> %1$s]]></string>
<string name="dialog_fee_sat_vbyte"><![CDATA[<b>tarifa</b> %1$s sat/vB]]></string>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values-nl/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
<string name="dialog_add_description">Voeg beschrijving toe&#8230;</string>
<string name="dialog_set_label">Bevestig label&#8230;</string>

<string name="dialog_receive_btc"><![CDATA[Your <b>Bitcoin</b> address]]></string>
<string name="dialog_receive_btc"><![CDATA[Your address]]></string>

<string name="dialog_up_to"><![CDATA[<b>tot</b> %1$s]]></string>
<string name="dialog_fee_sat_vbyte"><![CDATA[<b>tarief</b> %1$s sat/vB]]></string>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values-pt/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
<string name="dialog_add_description">Adicione descrição&#8230;</string>
<string name="dialog_set_label">Rótulo do item&#8230;</string>

<string name="dialog_receive_btc"><![CDATA[Your <b>Bitcoin</b> address]]></string>
<string name="dialog_receive_btc"><![CDATA[Your address]]></string>

<string name="dialog_up_to"><![CDATA[<b>até</b> %1$s]]></string>
<string name="dialog_fee_sat_vbyte"><![CDATA[<b>taxa</b> %1$s sat/vB]]></string>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values-uk/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
<string name="dialog_add_description">Додати опис&#8230;</string>
<string name="dialog_set_label">Додати мітку&#8230;</string>

<string name="dialog_receive_btc"><![CDATA[Ваша <b>Біткоїн</b>-адреса]]></string>
<string name="dialog_receive_btc"><![CDATA[Ваша адреса]]></string>

<string name="dialog_up_to"><![CDATA[<b>до</b> %1$s]]></string>
<string name="dialog_fee_sat_vbyte"><![CDATA[<b>ціна</b> %1$s sat/vB]]></string>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
<string name="dialog_add_description">Add description&#8230;</string>
<string name="dialog_set_label">Attach label&#8230;</string>

<string name="dialog_receive_btc"><![CDATA[Your <b>Bitcoin</b> address]]></string>
<string name="dialog_receive_btc"><![CDATA[Your address]]></string>

<string name="dialog_up_to"><![CDATA[<b>up to</b> %1$s]]></string>
<string name="dialog_fee_sat_vbyte"><![CDATA[<b>fee</b> %1$s sat/vB]]></string>
Expand Down

0 comments on commit a99da2e

Please sign in to comment.