mirror of https://github.com/m2049r/xmrwallet.git
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) {
|
if (pendingTransaction != null) {
|
||||||
llConfirmSend.setVisibility(View.VISIBLE);
|
llConfirmSend.setVisibility(View.VISIBLE);
|
||||||
bSend.setEnabled(true);
|
bSend.setEnabled(true);
|
||||||
tvTxAmount.setText(Wallet.getDisplayAmount(pendingTransaction.getAmount()));
|
|
||||||
tvTxFee.setText(Wallet.getDisplayAmount(pendingTransaction.getFee()));
|
tvTxFee.setText(Wallet.getDisplayAmount(pendingTransaction.getFee()));
|
||||||
//tvTxDust.setText(Wallet.getDisplayAmount(pendingTransaction.getDust()));
|
if (getActivityCallback().isStreetMode()
|
||||||
tvTxTotal.setText(Wallet.getDisplayAmount(
|
&& (sendListener.getTxData().getAmount() == Wallet.SWEEP_ALL)) {
|
||||||
pendingTransaction.getFee() + pendingTransaction.getAmount()));
|
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 {
|
} else {
|
||||||
llConfirmSend.setVisibility(View.GONE);
|
llConfirmSend.setVisibility(View.GONE);
|
||||||
bSend.setEnabled(false);
|
bSend.setEnabled(false);
|
||||||
|
|
|
@ -27,6 +27,7 @@ import android.widget.Toast;
|
||||||
import com.m2049r.xmrwallet.R;
|
import com.m2049r.xmrwallet.R;
|
||||||
import com.m2049r.xmrwallet.data.PendingTx;
|
import com.m2049r.xmrwallet.data.PendingTx;
|
||||||
import com.m2049r.xmrwallet.data.TxData;
|
import com.m2049r.xmrwallet.data.TxData;
|
||||||
|
import com.m2049r.xmrwallet.model.Wallet;
|
||||||
import com.m2049r.xmrwallet.util.Helper;
|
import com.m2049r.xmrwallet.util.Helper;
|
||||||
|
|
||||||
import timber.log.Timber;
|
import timber.log.Timber;
|
||||||
|
@ -54,6 +55,8 @@ public class SendSuccessWizardFragment extends SendWizardFragment {
|
||||||
void enableDone();
|
void enableDone();
|
||||||
|
|
||||||
SendFragment.Mode getMode();
|
SendFragment.Mode getMode();
|
||||||
|
|
||||||
|
SendFragment.Listener getActivityCallback();
|
||||||
}
|
}
|
||||||
|
|
||||||
ImageButton bCopyTxId;
|
ImageButton bCopyTxId;
|
||||||
|
@ -120,7 +123,13 @@ public class SendSuccessWizardFragment extends SendWizardFragment {
|
||||||
tvTxId.setText(committedTx.txId);
|
tvTxId.setText(committedTx.txId);
|
||||||
bCopyTxId.setEnabled(true);
|
bCopyTxId.setEnabled(true);
|
||||||
bCopyTxId.setImageResource(R.drawable.ic_content_copy_black_24dp);
|
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)));
|
tvTxFee.setText(getString(R.string.send_fee, Helper.getDisplayAmount(committedTx.fee)));
|
||||||
}
|
}
|
||||||
sendListener.enableDone();
|
sendListener.enableDone();
|
||||||
|
|
|
@ -374,4 +374,6 @@
|
||||||
<string name="xmrto_error_004">BTC amount out of bounds</string>
|
<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_010">Invalid or outdated Payment URL</string>
|
||||||
<string name="xmrto_error_012">Too many requests</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>
|
</resources>
|
||||||
|
|
|
@ -373,4 +373,6 @@
|
||||||
<string name="xmrto_error_004">BTC amount out of bounds</string>
|
<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_010">Invalid or outdated Payment URL</string>
|
||||||
<string name="xmrto_error_012">Too many requests</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>
|
</resources>
|
||||||
|
|
|
@ -363,4 +363,6 @@
|
||||||
<string name="xmrto_error_004">BTC amount out of bounds</string>
|
<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_010">Invalid or outdated Payment URL</string>
|
||||||
<string name="xmrto_error_012">Too many requests</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>
|
</resources>
|
||||||
|
|
|
@ -371,4 +371,6 @@
|
||||||
<string name="xmrto_error_004">BTC amount out of bounds</string>
|
<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_010">Invalid or outdated Payment URL</string>
|
||||||
<string name="xmrto_error_012">Too many requests</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>
|
</resources>
|
||||||
|
|
|
@ -377,4 +377,6 @@
|
||||||
<string name="xmrto_error_004">BTC amount out of bounds</string>
|
<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_010">Invalid or outdated Payment URL</string>
|
||||||
<string name="xmrto_error_012">Too many requests</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>
|
</resources>
|
||||||
|
|
|
@ -375,4 +375,6 @@
|
||||||
<string name="xmrto_error_004">BTC amount out of bounds</string>
|
<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_010">Invalid or outdated Payment URL</string>
|
||||||
<string name="xmrto_error_012">Too many requests</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>
|
</resources>
|
||||||
|
|
|
@ -376,4 +376,6 @@
|
||||||
<string name="xmrto_error_004">BTC amount out of bounds</string>
|
<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_010">Invalid or outdated Payment URL</string>
|
||||||
<string name="xmrto_error_012">Too many requests</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>
|
</resources>
|
||||||
|
|
|
@ -419,4 +419,6 @@
|
||||||
<string name="xmrto_error_004">BTC amount out of bounds</string>
|
<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_010">Invalid or outdated Payment URL</string>
|
||||||
<string name="xmrto_error_012">Too many requests</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>
|
</resources>
|
||||||
|
|
|
@ -373,4 +373,6 @@
|
||||||
<string name="xmrto_error_004">BTC amount out of bounds</string>
|
<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_010">Invalid or outdated Payment URL</string>
|
||||||
<string name="xmrto_error_012">Too many requests</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>
|
</resources>
|
||||||
|
|
|
@ -373,4 +373,6 @@
|
||||||
<string name="xmrto_error_004">BTC amount out of bounds</string>
|
<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_010">Invalid or outdated Payment URL</string>
|
||||||
<string name="xmrto_error_012">Too many requests</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>
|
</resources>
|
||||||
|
|
|
@ -365,4 +365,6 @@
|
||||||
<string name="xmrto_error_004">BTC amount out of bounds</string>
|
<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_010">Invalid or outdated Payment URL</string>
|
||||||
<string name="xmrto_error_012">Too many requests</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>
|
</resources>
|
||||||
|
|
|
@ -377,4 +377,6 @@
|
||||||
<string name="xmrto_error_004">BTC amount out of bounds</string>
|
<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_010">Invalid or outdated Payment URL</string>
|
||||||
<string name="xmrto_error_012">Too many requests</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>
|
</resources>
|
||||||
|
|
|
@ -373,4 +373,6 @@
|
||||||
<string name="xmrto_error_004">BTC amount out of bounds</string>
|
<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_010">Invalid or outdated Payment URL</string>
|
||||||
<string name="xmrto_error_012">Too many requests</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>
|
</resources>
|
||||||
|
|
|
@ -377,4 +377,6 @@
|
||||||
<string name="xmrto_error_004">BTC amount out of bounds</string>
|
<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_010">Invalid or outdated Payment URL</string>
|
||||||
<string name="xmrto_error_012">Too many requests</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>
|
</resources>
|
||||||
|
|
|
@ -374,4 +374,6 @@
|
||||||
<string name="xmrto_error_004">BTC amount out of bounds</string>
|
<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_010">Invalid or outdated Payment URL</string>
|
||||||
<string name="xmrto_error_012">Too many requests</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>
|
</resources>
|
||||||
|
|
|
@ -358,4 +358,6 @@
|
||||||
<string name="xmrto_error_004">BTC amount out of bounds</string>
|
<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_010">Invalid or outdated Payment URL</string>
|
||||||
<string name="xmrto_error_012">Too many requests</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>
|
</resources>
|
||||||
|
|
|
@ -377,4 +377,6 @@
|
||||||
<string name="xmrto_error_004">BTC amount out of bounds</string>
|
<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_010">Invalid or outdated Payment URL</string>
|
||||||
<string name="xmrto_error_012">Too many requests</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>
|
</resources>
|
||||||
|
|
|
@ -371,4 +371,6 @@
|
||||||
<string name="xmrto_error_004">BTC amount out of bounds</string>
|
<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_010">Invalid or outdated Payment URL</string>
|
||||||
<string name="xmrto_error_012">Too many requests</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>
|
</resources>
|
||||||
|
|
|
@ -373,4 +373,6 @@
|
||||||
<string name="xmrto_error_004">BTC amount out of bounds</string>
|
<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_010">Invalid or outdated Payment URL</string>
|
||||||
<string name="xmrto_error_012">Too many requests</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>
|
</resources>
|
||||||
|
|
|
@ -422,4 +422,6 @@
|
||||||
<string name="xmrto_error_012">Too many requests</string>
|
<string name="xmrto_error_012">Too many requests</string>
|
||||||
|
|
||||||
<string name="xmrto_error" translatable="false">XMR.TO Service Error</string>
|
<string name="xmrto_error" translatable="false">XMR.TO Service Error</string>
|
||||||
|
|
||||||
|
<string name="street_sweep_amount">EVERYTHING!</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
Loading…
Reference in New Issue