mirror of
https://codeberg.org/r4v3r23/mysu.git
synced 2024-11-26 15:52:28 +00:00
Update version to 0.4.1.1
This commit is contained in:
parent
8ddb57e36d
commit
4a0302fbdf
2 changed files with 7 additions and 6 deletions
|
@ -9,8 +9,8 @@ android {
|
||||||
applicationId "net.mynero.wallet"
|
applicationId "net.mynero.wallet"
|
||||||
minSdkVersion 21
|
minSdkVersion 21
|
||||||
targetSdkVersion 33
|
targetSdkVersion 33
|
||||||
versionCode 401
|
versionCode 40101
|
||||||
versionName "0.4.1 'Fluorine Fermi'"
|
versionName "0.4.1.1 'Fluorine Fermi'"
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
externalNativeBuild {
|
externalNativeBuild {
|
||||||
cmake {
|
cmake {
|
||||||
|
|
|
@ -158,14 +158,15 @@ public class MoneroHandlerThread extends Thread implements WalletListener {
|
||||||
ArrayList<TransactionOutput> newOutputs = new ArrayList<>(outputs);
|
ArrayList<TransactionOutput> newOutputs = new ArrayList<>(outputs);
|
||||||
boolean donatePerTx = PrefService.getInstance().getBoolean(Constants.PREF_DONATE_PER_TX, false);
|
boolean donatePerTx = PrefService.getInstance().getBoolean(Constants.PREF_DONATE_PER_TX, false);
|
||||||
if(donatePerTx && paymentId.isEmpty()) { // only attach donation when no payment id is needed (i.e. integrated address)
|
if(donatePerTx && paymentId.isEmpty()) { // only attach donation when no payment id is needed (i.e. integrated address)
|
||||||
|
SecureRandom rand = new SecureRandom();
|
||||||
float randomDonatePct = getRandomDonateAmount(0.005f, 0.015f); // occasionally attaches a 0.5% to 1.5% donation. It is random so that not even I know how much exactly you are sending.
|
float randomDonatePct = getRandomDonateAmount(0.005f, 0.015f); // occasionally attaches a 0.5% to 1.5% donation. It is random so that not even I know how much exactly you are sending.
|
||||||
/*
|
/*
|
||||||
It's also not entirely "per tx". It won't always attach it so as to not have a consistently uncommon fingerprint on-chain. When it does attach a donation,
|
It's also not entirely "per tx". It won't always attach it so as to not have a consistently uncommon fingerprint on-chain. When it does attach a donation,
|
||||||
it will periodically split it up into multiple outputs instead of one.
|
it will periodically split it up into multiple outputs instead of one.
|
||||||
*/
|
*/
|
||||||
int attachDonationRoll = new SecureRandom().nextInt(100);
|
int attachDonationRoll = rand.nextInt(100);
|
||||||
if(attachDonationRoll > 90) { // 10% chance of being added
|
if(attachDonationRoll > 90) { // 10% chance of being added
|
||||||
int splitDonationRoll = new SecureRandom().nextInt(100);
|
int splitDonationRoll = rand.nextInt(100);
|
||||||
long donateAmount = (long) (amount*randomDonatePct);
|
long donateAmount = (long) (amount*randomDonatePct);
|
||||||
if(splitDonationRoll > 50) { // 50% chance of being split
|
if(splitDonationRoll > 50) { // 50% chance of being split
|
||||||
// split
|
// split
|
||||||
|
@ -174,7 +175,7 @@ public class MoneroHandlerThread extends Thread implements WalletListener {
|
||||||
for(int i = 0; i < split; i++) {
|
for(int i = 0; i < split; i++) {
|
||||||
// TODO this can be expanded upon into the future to perform an auto-splitting/auto-churning for the user if their wallet is fresh and has few utxos.
|
// TODO this can be expanded upon into the future to perform an auto-splitting/auto-churning for the user if their wallet is fresh and has few utxos.
|
||||||
// randomly split between multiple wallets
|
// randomly split between multiple wallets
|
||||||
int randomDonationAddress = new SecureRandom().nextInt(Constants.DONATION_ADDRESSES.length);
|
int randomDonationAddress = rand.nextInt(Constants.DONATION_ADDRESSES.length);
|
||||||
String donationAddress = Constants.DONATION_ADDRESSES[randomDonationAddress];
|
String donationAddress = Constants.DONATION_ADDRESSES[randomDonationAddress];
|
||||||
newOutputs.add(new TransactionOutput(donationAddress, splitAmount));
|
newOutputs.add(new TransactionOutput(donationAddress, splitAmount));
|
||||||
}
|
}
|
||||||
|
@ -222,7 +223,7 @@ public class MoneroHandlerThread extends Thread implements WalletListener {
|
||||||
|
|
||||||
private int genRandomDonationSplit(int min, int max) {
|
private int genRandomDonationSplit(int min, int max) {
|
||||||
SecureRandom rand = new SecureRandom();
|
SecureRandom rand = new SecureRandom();
|
||||||
return rand.nextInt() * (max - min) + min;
|
return rand.nextInt(max) + min;
|
||||||
}
|
}
|
||||||
|
|
||||||
public interface Listener {
|
public interface Listener {
|
||||||
|
|
Loading…
Reference in a new issue