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

Fix issues observed on 3.0.0-rc.3 #5430

Merged
merged 3 commits into from
Nov 13, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,28 @@ export default (t) => [
{
title: t('ID'),
classList: grid['col-xs-2'],
placeholder: 'walletWithAddress',
},
{
title: t('Sender'),
classList: grid['col-xs-2'],
placeholder: 'walletWithAddress',
},
{
title: t('Height'),
classList: grid['col-xs-2'],
classList: `${grid['col-xs-1']} ${styles.transactionFeeCell}`,
},
{
title: t('Type'),
classList: `${grid['col-xs-4']} ${grid['col-md-3']}`,
classList: `${grid['col-xs-2']} ${grid['col-md-2']}`,
},
{
title: t('Value'),
classList: `${grid['col-xs-2']} ${grid['col-md-2']}`,
},
{
title: t('Date'),
classList: `${grid['col-md-2']} ${styles.transactionFeeCell}`,
classList: `${grid['col-md-2']} ${grid['col-xs-3']}`,
},
{
title: t('Status'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import styles from './ExplorerTransactions.css';

export default (t, activeToken, changeSort) => [
{
title: t('Recipient'),
title: t('Sender'),
classList: `${grid['col-xs-3']} ${styles.transactionTitle}`,
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,14 @@ const TxSignatureCollector = ({
};

const onEnterPasswordSuccess = ({ privateKey }) => {
const paramsSchema = moduleCommandSchemas[moduleCommand];
const transaction = fromTransactionJSON(transactionJSON, paramsSchema);
const buffer = encodeTransaction(transaction, paramsSchema);
const transactionHex = cryptography.utils.hash(buffer).toString('hex');
if (isTransactionAuthor) {
incrementNonce(transactionHex);
if (transactionJSON.nonce) {
ManuGowda marked this conversation as resolved.
Show resolved Hide resolved
const paramsSchema = moduleCommandSchemas[moduleCommand];
const transaction = fromTransactionJSON(transactionJSON, paramsSchema);
const buffer = encodeTransaction(transaction, paramsSchema);
const transactionHex = cryptography.utils.hash(buffer).toString('hex');
if (isTransactionAuthor) {
incrementNonce(transactionHex);
}
}
txVerification(privateKey, currentAccount?.metadata.pubkey);
};
Expand Down
11 changes: 11 additions & 0 deletions src/modules/wallet/components/RegisterMultisigForm/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { useTranslation } from 'react-i18next';
import BoxContent from 'src/theme/box/content';
import BoxHeader from 'src/theme/box/header';
import { TertiaryButton } from 'src/theme/buttons';
import Feedback from 'src/theme/feedback/feedback';
import { Input } from 'src/theme';
import { MODULE_COMMANDS_NAME_MAP } from '@transaction/configuration/moduleCommand';
import TxComposer from '@transaction/components/TxComposer';
Expand Down Expand Up @@ -77,6 +78,7 @@ const Form = ({ nextStep, prevState = {}, onNext, authQuery }) => {
getInitialSignaturesState(prevState)
);
const [members, setMembers] = useState(() => getInitialMembersState(prevState));
const [requiredSignatureError, setRequiredSignatureError] = useState('');

const [currentAccount] = useCurrentAccount();
const [currentApplication] = useCurrentApplication();
Expand Down Expand Up @@ -124,6 +126,12 @@ const Form = ({ nextStep, prevState = {}, onNext, authQuery }) => {
const changeNumberOfSignatures = (e) => {
const value = e.target.value ? Number(e.target.value) : undefined;

if (value > 64) {
setRequiredSignatureError('Cannot have more than 64 required signature');
ManuGowda marked this conversation as resolved.
Show resolved Hide resolved
return;
}

setRequiredSignatureError('');
setNumberOfSignatures(value);
};

Expand Down Expand Up @@ -226,6 +234,9 @@ const Form = ({ nextStep, prevState = {}, onNext, authQuery }) => {
autoComplete="off"
name="required-signatures"
/>
{!!requiredSignatureError && (
<Feedback message={requiredSignatureError} status="error" />
)}
</div>
<div className={`${styles.membersControls} multisignature-members-controls`}>
<span>{t('Members')}</span>
Expand Down