hide sweep amount in street mode (#526)
This commit is contained in:
parent
39d048fd5e
commit
0d213a1eb4
|
@ -214,11 +214,16 @@ public class SendConfirmWizardFragment extends SendWizardFragment implements Sen
|
|||
if (pendingTransaction != null) {
|
||||
llConfirmSend.setVisibility(View.VISIBLE);
|
||||
bSend.setEnabled(true);
|
||||
tvTxAmount.setText(Wallet.getDisplayAmount(pendingTransaction.getAmount()));
|
||||
tvTxFee.setText(Wallet.getDisplayAmount(pendingTransaction.getFee()));
|
||||
//tvTxDust.setText(Wallet.getDisplayAmount(pendingTransaction.getDust()));
|
||||
tvTxTotal.setText(Wallet.getDisplayAmount(
|
||||
pendingTransaction.getFee() + pendingTransaction.getAmount()));
|
||||
if (getActivityCallback().isStreetMode()
|
||||
&& (sendListener.getTxData().getAmount() == Wallet.SWEEP_ALL)) {
|
||||
tvTxAmount.setText(getString(R.string.street_sweep_amount));
|
||||
tvTxTotal.setText(getString(R.string.street_sweep_amount));
|
||||
} else {
|
||||
tvTxAmount.setText(Wallet.getDisplayAmount(pendingTransaction.getAmount()));
|
||||
tvTxTotal.setText(Wallet.getDisplayAmount(
|
||||
pendingTransaction.getFee() + pendingTransaction.getAmount()));
|
||||
}
|
||||
} else {
|
||||
llConfirmSend.setVisibility(View.GONE);
|
||||
bSend.setEnabled(false);
|
||||
|
|
|
@ -27,6 +27,7 @@ import android.widget.Toast;
|
|||
import com.m2049r.xmrwallet.R;
|
||||
import com.m2049r.xmrwallet.data.PendingTx;
|
||||
import com.m2049r.xmrwallet.data.TxData;
|
||||
import com.m2049r.xmrwallet.model.Wallet;
|
||||
import com.m2049r.xmrwallet.util.Helper;
|
||||
|
||||
import timber.log.Timber;
|
||||
|
@ -54,6 +55,8 @@ public class SendSuccessWizardFragment extends SendWizardFragment {
|
|||
void enableDone();
|
||||
|
||||
SendFragment.Mode getMode();
|
||||
|
||||
SendFragment.Listener getActivityCallback();
|
||||
}
|
||||
|
||||
ImageButton bCopyTxId;
|
||||
|
@ -120,7 +123,13 @@ public class SendSuccessWizardFragment extends SendWizardFragment {
|
|||
tvTxId.setText(committedTx.txId);
|
||||
bCopyTxId.setEnabled(true);
|
||||
bCopyTxId.setImageResource(R.drawable.ic_content_copy_black_24dp);
|
||||
tvTxAmount.setText(getString(R.string.send_amount, Helper.getDisplayAmount(committedTx.amount)));
|
||||
|
||||
if (sendListener.getActivityCallback().isStreetMode()
|
||||
&& (sendListener.getTxData().getAmount() == Wallet.SWEEP_ALL)) {
|
||||
tvTxAmount.setText(getString(R.string.street_sweep_amount));
|
||||
} else {
|
||||
tvTxAmount.setText(getString(R.string.send_amount, Helper.getDisplayAmount(committedTx.amount)));
|
||||
}
|
||||
tvTxFee.setText(getString(R.string.send_fee, Helper.getDisplayAmount(committedTx.fee)));
|
||||
}
|
||||
sendListener.enableDone();
|
||||
|
|
|
@ -374,4 +374,6 @@
|
|||
<string name="xmrto_error_004">BTC amount out of bounds</string>
|
||||
<string name="xmrto_error_010">Invalid or outdated Payment URL</string>
|
||||
<string name="xmrto_error_012">Too many requests</string>
|
||||
|
||||
<string name="street_sweep_amount">EVERYTHING!</string> <!-- as in: "everything in the account" = "all the money" -->
|
||||
</resources>
|
||||
|
|
|
@ -373,4 +373,6 @@
|
|||
<string name="xmrto_error_004">BTC amount out of bounds</string>
|
||||
<string name="xmrto_error_010">Invalid or outdated Payment URL</string>
|
||||
<string name="xmrto_error_012">Too many requests</string>
|
||||
|
||||
<string name="street_sweep_amount">EVERYTHING!</string> <!-- as in: "everything in the account" = "all the money" -->
|
||||
</resources>
|
||||
|
|
|
@ -363,4 +363,6 @@
|
|||
<string name="xmrto_error_004">BTC amount out of bounds</string>
|
||||
<string name="xmrto_error_010">Invalid or outdated Payment URL</string>
|
||||
<string name="xmrto_error_012">Too many requests</string>
|
||||
|
||||
<string name="street_sweep_amount">EVERYTHING!</string> <!-- as in: "everything in the account" = "all the money" -->
|
||||
</resources>
|
||||
|
|
|
@ -371,4 +371,6 @@
|
|||
<string name="xmrto_error_004">BTC amount out of bounds</string>
|
||||
<string name="xmrto_error_010">Invalid or outdated Payment URL</string>
|
||||
<string name="xmrto_error_012">Too many requests</string>
|
||||
|
||||
<string name="street_sweep_amount">EVERYTHING!</string> <!-- as in: "everything in the account" = "all the money" -->
|
||||
</resources>
|
||||
|
|
|
@ -377,4 +377,6 @@
|
|||
<string name="xmrto_error_004">BTC amount out of bounds</string>
|
||||
<string name="xmrto_error_010">Invalid or outdated Payment URL</string>
|
||||
<string name="xmrto_error_012">Too many requests</string>
|
||||
|
||||
<string name="street_sweep_amount">EVERYTHING!</string> <!-- as in: "everything in the account" = "all the money" -->
|
||||
</resources>
|
||||
|
|
|
@ -375,4 +375,6 @@
|
|||
<string name="xmrto_error_004">BTC amount out of bounds</string>
|
||||
<string name="xmrto_error_010">Invalid or outdated Payment URL</string>
|
||||
<string name="xmrto_error_012">Too many requests</string>
|
||||
|
||||
<string name="street_sweep_amount">EVERYTHING!</string> <!-- as in: "everything in the account" = "all the money" -->
|
||||
</resources>
|
||||
|
|
|
@ -376,4 +376,6 @@
|
|||
<string name="xmrto_error_004">BTC amount out of bounds</string>
|
||||
<string name="xmrto_error_010">Invalid or outdated Payment URL</string>
|
||||
<string name="xmrto_error_012">Too many requests</string>
|
||||
|
||||
<string name="street_sweep_amount">EVERYTHING!</string> <!-- as in: "everything in the account" = "all the money" -->
|
||||
</resources>
|
||||
|
|
|
@ -419,4 +419,6 @@
|
|||
<string name="xmrto_error_004">BTC amount out of bounds</string>
|
||||
<string name="xmrto_error_010">Invalid or outdated Payment URL</string>
|
||||
<string name="xmrto_error_012">Too many requests</string>
|
||||
|
||||
<string name="street_sweep_amount">EVERYTHING!</string> <!-- as in: "everything in the account" = "all the money" -->
|
||||
</resources>
|
||||
|
|
|
@ -373,4 +373,6 @@
|
|||
<string name="xmrto_error_004">BTC amount out of bounds</string>
|
||||
<string name="xmrto_error_010">Invalid or outdated Payment URL</string>
|
||||
<string name="xmrto_error_012">Too many requests</string>
|
||||
|
||||
<string name="street_sweep_amount">EVERYTHING!</string> <!-- as in: "everything in the account" = "all the money" -->
|
||||
</resources>
|
||||
|
|
|
@ -373,4 +373,6 @@
|
|||
<string name="xmrto_error_004">BTC amount out of bounds</string>
|
||||
<string name="xmrto_error_010">Invalid or outdated Payment URL</string>
|
||||
<string name="xmrto_error_012">Too many requests</string>
|
||||
|
||||
<string name="street_sweep_amount">EVERYTHING!</string> <!-- as in: "everything in the account" = "all the money" -->
|
||||
</resources>
|
||||
|
|
|
@ -365,4 +365,6 @@
|
|||
<string name="xmrto_error_004">BTC amount out of bounds</string>
|
||||
<string name="xmrto_error_010">Invalid or outdated Payment URL</string>
|
||||
<string name="xmrto_error_012">Too many requests</string>
|
||||
|
||||
<string name="street_sweep_amount">EVERYTHING!</string> <!-- as in: "everything in the account" = "all the money" -->
|
||||
</resources>
|
||||
|
|
|
@ -377,4 +377,6 @@
|
|||
<string name="xmrto_error_004">BTC amount out of bounds</string>
|
||||
<string name="xmrto_error_010">Invalid or outdated Payment URL</string>
|
||||
<string name="xmrto_error_012">Too many requests</string>
|
||||
|
||||
<string name="street_sweep_amount">EVERYTHING!</string> <!-- as in: "everything in the account" = "all the money" -->
|
||||
</resources>
|
||||
|
|
|
@ -373,4 +373,6 @@
|
|||
<string name="xmrto_error_004">BTC amount out of bounds</string>
|
||||
<string name="xmrto_error_010">Invalid or outdated Payment URL</string>
|
||||
<string name="xmrto_error_012">Too many requests</string>
|
||||
|
||||
<string name="street_sweep_amount">EVERYTHING!</string> <!-- as in: "everything in the account" = "all the money" -->
|
||||
</resources>
|
||||
|
|
|
@ -377,4 +377,6 @@
|
|||
<string name="xmrto_error_004">BTC amount out of bounds</string>
|
||||
<string name="xmrto_error_010">Invalid or outdated Payment URL</string>
|
||||
<string name="xmrto_error_012">Too many requests</string>
|
||||
|
||||
<string name="street_sweep_amount">EVERYTHING!</string> <!-- as in: "everything in the account" = "all the money" -->
|
||||
</resources>
|
||||
|
|
|
@ -374,4 +374,6 @@
|
|||
<string name="xmrto_error_004">BTC amount out of bounds</string>
|
||||
<string name="xmrto_error_010">Invalid or outdated Payment URL</string>
|
||||
<string name="xmrto_error_012">Too many requests</string>
|
||||
|
||||
<string name="street_sweep_amount">EVERYTHING!</string> <!-- as in: "everything in the account" = "all the money" -->
|
||||
</resources>
|
||||
|
|
|
@ -358,4 +358,6 @@
|
|||
<string name="xmrto_error_004">BTC amount out of bounds</string>
|
||||
<string name="xmrto_error_010">Invalid or outdated Payment URL</string>
|
||||
<string name="xmrto_error_012">Too many requests</string>
|
||||
|
||||
<string name="street_sweep_amount">EVERYTHING!</string> <!-- as in: "everything in the account" = "all the money" -->
|
||||
</resources>
|
||||
|
|
|
@ -377,4 +377,6 @@
|
|||
<string name="xmrto_error_004">BTC amount out of bounds</string>
|
||||
<string name="xmrto_error_010">Invalid or outdated Payment URL</string>
|
||||
<string name="xmrto_error_012">Too many requests</string>
|
||||
|
||||
<string name="street_sweep_amount">EVERYTHING!</string> <!-- as in: "everything in the account" = "all the money" -->
|
||||
</resources>
|
||||
|
|
|
@ -371,4 +371,6 @@
|
|||
<string name="xmrto_error_004">BTC amount out of bounds</string>
|
||||
<string name="xmrto_error_010">Invalid or outdated Payment URL</string>
|
||||
<string name="xmrto_error_012">Too many requests</string>
|
||||
|
||||
<string name="street_sweep_amount">EVERYTHING!</string> <!-- as in: "everything in the account" = "all the money" -->
|
||||
</resources>
|
||||
|
|
|
@ -373,4 +373,6 @@
|
|||
<string name="xmrto_error_004">BTC amount out of bounds</string>
|
||||
<string name="xmrto_error_010">Invalid or outdated Payment URL</string>
|
||||
<string name="xmrto_error_012">Too many requests</string>
|
||||
|
||||
<string name="street_sweep_amount">EVERYTHING!</string> <!-- as in: "everything in the account" = "all the money" -->
|
||||
</resources>
|
||||
|
|
|
@ -422,4 +422,6 @@
|
|||
<string name="xmrto_error_012">Too many requests</string>
|
||||
|
||||
<string name="xmrto_error" translatable="false">XMR.TO Service Error</string>
|
||||
|
||||
<string name="street_sweep_amount">EVERYTHING!</string>
|
||||
</resources>
|
||||
|
|
Loading…
Reference in New Issue