Skip to content

Commit

Permalink
Set auto optimization before wallet.start(), change standard send amo…
Browse files Browse the repository at this point in the history
…unt to match desktop, changed input optimize input amount
  • Loading branch information
n9lsjr committed Feb 20, 2024
1 parent d9c6d4f commit c56b34f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/Globals.js
Original file line number Diff line number Diff line change
Expand Up @@ -325,8 +325,8 @@ function updateConnection(connection) {
if (Globals.preferences.limitData && connection.type === 'cellular') {
Globals.wallet.stop();
} else {
Globals.wallet.start();
Globals.wallet.enableAutoOptimization(false);
Globals.wallet.start();
}
}

Expand Down Expand Up @@ -368,8 +368,8 @@ export async function initGlobals() {
]
);
} else {
Globals.wallet.start();
Globals.wallet.enableAutoOptimization(false);
Globals.wallet.start();
}

await Globals.updateNodeList();
Expand Down
6 changes: 3 additions & 3 deletions src/HuginUtilities.js
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ export async function optimizeMessages(nbrOfTxs) {
while (i < nbrOfTxs - 1 && i < 10) {
payments.push([
subWallet,
2000
1000
]);

i += 1;
Expand Down Expand Up @@ -575,7 +575,7 @@ export async function sendGroupsMessage(message, group, reply=false) {
let [mainWallet, subWallet] = Globals.wallet.subWallets.getAddresses();

let result = await Globals.wallet.sendTransactionAdvanced(
[[mainWallet, 1]], // destinations,
[[mainWallet, 1000]], // destinations,
3, // mixin
{fixedFee: 1000, isFixedFee: true}, // fee
undefined, //paymentID
Expand Down Expand Up @@ -667,7 +667,7 @@ export async function sendMessage(message, receiver, messageKey, silent=false) {
let [mainWallet, subWallet] = Globals.wallet.subWallets.getAddresses();

let result = await Globals.wallet.sendTransactionAdvanced(
[[receiver, 1]], // destinations,
[[receiver, 1000]], // destinations,
3, // mixin
{fixedFee: 1000, isFixedFee: true}, // fee
undefined, //paymentID
Expand Down
2 changes: 1 addition & 1 deletion src/SettingsScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -1276,8 +1276,8 @@ export class SettingsScreenNoTranslation extends React.Component {
if (Globals.preferences.limitData && netInfo.type === 'cellular') {
Globals.wallet.stop();
} else {
Globals.wallet.start();
Globals.wallet.enableAutoOptimization(false);
Globals.wallet.start();
}

toastPopUp(Globals.preferences.limitData ? t('dataLimitOn') : t('dataLimitOff'));
Expand Down

0 comments on commit c56b34f

Please sign in to comment.