mirror of
https://codeberg.org/anoncontributorxmr/mysu.git
synced 2024-12-22 21:17:47 +00:00
add fee parameter to send methods
This commit is contained in:
parent
de5c096261
commit
d37fe29c14
3 changed files with 7 additions and 7 deletions
|
@ -121,7 +121,7 @@ public class SendBottomSheetDialog extends BottomSheetDialogFragment {
|
|||
}
|
||||
Toast.makeText(getActivity(), getString(R.string.creating_tx), Toast.LENGTH_SHORT).show();
|
||||
createButton.setEnabled(false);
|
||||
createTx(address, amount, sendAll);
|
||||
createTx(address, amount, sendAll, PendingTransaction.Priority.Priority_Default);
|
||||
} else if (!validAddress) {
|
||||
Toast.makeText(getActivity(), getString(R.string.send_address_invalid), Toast.LENGTH_SHORT).show();
|
||||
} else {
|
||||
|
@ -193,9 +193,9 @@ public class SendBottomSheetDialog extends BottomSheetDialogFragment {
|
|||
});
|
||||
}
|
||||
|
||||
private void createTx(String address, String amount, boolean sendAll) {
|
||||
private void createTx(String address, String amount, boolean sendAll, PendingTransaction.Priority feePriority) {
|
||||
AsyncTask.execute(() -> {
|
||||
PendingTransaction pendingTx = TxService.getInstance().createTx(address, amount, sendAll);
|
||||
PendingTransaction pendingTx = TxService.getInstance().createTx(address, amount, sendAll, feePriority);
|
||||
if(pendingTx != null) {
|
||||
_pendingTransaction.postValue(pendingTx);
|
||||
} else {
|
||||
|
|
|
@ -118,9 +118,9 @@ public class MoneroHandlerThread extends Thread implements WalletListener {
|
|||
listener.onRefresh();
|
||||
}
|
||||
|
||||
public PendingTransaction createTx(String address, String amountStr, boolean sendAll) {
|
||||
public PendingTransaction createTx(String address, String amountStr, boolean sendAll, PendingTransaction.Priority feePriority) {
|
||||
long amount = sendAll ? SWEEP_ALL : Wallet.getAmountFromString(amountStr);
|
||||
return wallet.createTransaction(new TxData(address, amount, 0, PendingTransaction.Priority.Priority_Default));
|
||||
return wallet.createTransaction(new TxData(address, amount, 0, feePriority));
|
||||
}
|
||||
|
||||
public boolean sendTx(PendingTransaction pendingTx) {
|
||||
|
|
|
@ -16,8 +16,8 @@ public class TxService extends ServiceBase {
|
|||
instance = this;
|
||||
}
|
||||
|
||||
public PendingTransaction createTx(String address, String amount, boolean sendAll) {
|
||||
return this.getThread().createTx(address, amount, sendAll);
|
||||
public PendingTransaction createTx(String address, String amount, boolean sendAll, PendingTransaction.Priority feePriority) {
|
||||
return this.getThread().createTx(address, amount, sendAll, feePriority);
|
||||
}
|
||||
|
||||
public boolean sendTx(PendingTransaction pendingTransaction) {
|
||||
|
|
Loading…
Reference in a new issue