Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge patch 2.0.1 into master #3754

Merged
merged 4 commits into from
Aug 30, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "lisk-desktop",
"version": "2.0.0",
"version": "2.0.1",
"productName": "Lisk",
"description": "Lisk",
"main": "./build/main.js",
Expand Down
5 changes: 2 additions & 3 deletions i18n/locales/en/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -203,12 +203,12 @@
"If you’re not sure how to do this please follow the": "If you’re not sure how to do this please follow the",
"In order to see your recent transactions you need to sign in.": "In order to see your recent transactions you need to sign in.",
"In order to use this feature you need to sign in to your Lisk account.": "In order to use this feature you need to sign in to your Lisk account.",
"Increase or decrease your vote amount, or remove your vote from this delegate. Your updated vote will added to the voting queue.": "Increase or decrease your vote amount, or remove your vote from this delegate. Your updated vote will added to the voting queue.",
"Increase or decrease your vote amount, or remove your vote from this delegate. Your updated vote will be added to the voting queue.": "Increase or decrease your vote amount, or remove your vote from this delegate. Your updated vote will be added to the voting queue.",
"Initialize": "Initialize",
"Initialize your account": "Initialize your account",
"Input transaction data": "Input transaction data",
"Input view": "Input view",
"Insert a vote amount for this delegate. Your new vote will added to the voting queue.": "Insert a vote amount for this delegate. Your new vote will added to the voting queue.",
"Insert a vote amount for this delegate. Your new vote will be added to the voting queue.": "Insert a vote amount for this delegate. Your new vote will be added to the voting queue.",
"Insert entire signed message": "Insert entire signed message",
"Insert label": "Insert label",
"Insert message": "Insert message",
Expand Down Expand Up @@ -253,7 +253,6 @@
"Lisk {{version}} is here!": "Lisk {{version}} is here!",
"Load more": "Load more",
"Loading": "Loading",
"Locale": "Locale",
"Locked balance details": "Locked balance details",
"Looking for a device...": "Looking for a device...",
"Low": "Low",
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Lisk",
"version": "2.0.0",
"version": "2.0.1",
"author": "Lisk Foundation <[email protected]>, lightcurve GmbH <[email protected]>",
"license": "GPL-3.0",
"productName": "Lisk",
Expand Down
4 changes: 2 additions & 2 deletions src/components/screens/editVote/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ import styles from './editVote.css';
const getTitles = t => ({
edit: {
title: t('Edit vote'),
description: t('Increase or decrease your vote amount, or remove your vote from this delegate. Your updated vote will added to the voting queue.'),
description: t('Increase or decrease your vote amount, or remove your vote from this delegate. Your updated vote will be added to the voting queue.'),
},
add: {
title: t('Add vote'),
description: t('Insert a vote amount for this delegate. Your new vote will added to the voting queue.'),
description: t('Insert a vote amount for this delegate. Your new vote will be added to the voting queue.'),
},
});

Expand Down
2 changes: 1 addition & 1 deletion src/components/screens/send/form/formBtc.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const FormBtc = (props) => {
const [
selectedPriority, selectTransactionPriority, priorityOptions,
] = useTransactionPriority(token);
const [amount, setAmountField] = useAmountField(getInitialValue('amount'), token);
const [amount, setAmountField] = useAmountField(getInitialValue('amount'), account.summary?.balance ?? 0, token);
const [recipient, setRecipientField] = useRecipientField(getInitialValue('recipient'));
const { fee, maxAmount, minFee } = useTransactionFeeCalculation({
selectedPriority,
Expand Down
6 changes: 2 additions & 4 deletions src/components/screens/settings/settings.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React from 'react';
import { toast } from 'react-toastify';
import { isEmpty } from '@utils/helpers';
import Piwik from '@utils/piwik';
import { externalLinks, settings as settingsConst } from '@constants';
import Box from '@toolbox/box';
Expand Down Expand Up @@ -78,9 +77,8 @@ class Settings extends React.Component {
</BoxHeader>
<BoxContent className={styles.content}>
<section>
<h2>{t('Locale')}</h2>
<h2>{t('Currency')}</h2>
<div className={styles.fieldGroup}>
<span className={styles.labelName}>{t('Currency')}</span>
<Select
options={currencies.map(currency => ({
label: currency, value: currency,
Expand Down Expand Up @@ -149,7 +147,7 @@ class Settings extends React.Component {
</div>
</label>
{
!isHardwareWalletAccount && !isEmpty(account)
!isHardwareWalletAccount
? (
<label className={`${styles.fieldGroup} ${styles.checkboxField} enableBTC`}>
<CheckBox
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const DelegateProfile = ({
const { data } = delegate;
useEffect(() => {
voters.loadData({ aggregate: true });
delegate.loadData();
}, [account]);

useEffect(() => {
Expand Down
2 changes: 1 addition & 1 deletion src/components/shared/transactionInfo/voteDelegate.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const VoteDelegate = ({
const addedLength = Object.keys(added).length;
const editedLength = Object.keys(edited).length;
const removedLength = Object.keys(removed).length;
const sentVotes = account.dpos.sentVotes?.length ?? 0;
const sentVotes = account.dpos?.sentVotes?.length ?? 0;

return (
<>
Expand Down
2 changes: 1 addition & 1 deletion src/constants/account.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export const balanceNeededForInitialization = 2e7;
export const balanceNeededForReclaim = 1e6;
export const balanceNeededForReclaim = 5e6;
const account = {
lockDuration: 600000, // lock duration time is 10 minutes in milliSecond
warnLockDuration: 480000, // warning time is 8 minutes in milliSecond
Expand Down
5 changes: 4 additions & 1 deletion src/store/actions/account.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,10 @@ export const accountDataUpdated = tokensTypes =>
if (token === tokenMap.LSK.key) {
acc[token] = { address: account.info[tokenMap.LSK.key].summary.address };
} else {
acc[token] = { address: account.info[token].address };
acc[token] = {
address: account.info[token].summary.address,
passphrase: account.passphrase,
};
}
return acc;
}, {});
Expand Down
16 changes: 9 additions & 7 deletions src/store/middlewares/account.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,15 @@ const filterIncomingTransactions = (transactions, account) => transactions.filte
const showNotificationsForIncomingTransactions = (transactions, account, token) => {
filterIncomingTransactions(transactions, account).forEach((transaction) => {
const amount = fromRawLsk(transaction.asset.amount);
const message = transaction.asset.data
? i18n.t('with message {{message}}', { message: transaction.asset.data })
: '';
// eslint-disable-next-line no-new
new Notification(i18n.t('{{amount}} {{token}} Received', { amount, token }), {
body: i18n.t('Your account just received {{amount}} {{token}} {{message}}', { amount, token, message }),
});
if (amount > 0) {
const message = transaction.asset.data
? i18n.t('with message {{message}}', { message: transaction.asset.data })
: '';
// eslint-disable-next-line no-new
new Notification(i18n.t('{{amount}} {{token}} Received', { amount, token }), {
body: i18n.t('Your account just received {{amount}} {{token}} {{message}}', { amount, token, message }),
});
}
});
};

Expand Down
6 changes: 4 additions & 2 deletions src/utils/notification.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,10 @@ export class Notify {
* @memberof Notify
*/
_deposit(amount) { // eslint-disable-line
const body = i18next.t('You\'ve received {{value}} LSK.', { value: fromRawLsk(amount) });
new window.Notification(i18next.t('LSK received'), { body }); // eslint-disable-line
if (amount > 0) {
const body = i18next.t('You\'ve received {{value}} LSK.', { value: fromRawLsk(amount) });
new window.Notification(i18next.t('LSK received'), { body }); // eslint-disable-line
}
}
}

Expand Down