Skip to content
This repository has been archived by the owner on Jun 7, 2019. It is now read-only.

Commit

Permalink
Merge pull request #731 from LiskHQ/730-standardise_prettier
Browse files Browse the repository at this point in the history
Standardise prettier - Closes #730
  • Loading branch information
willclarktech authored Jul 18, 2018
2 parents 3276f60 + 24b69d2 commit cab23d8
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 16 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,6 @@
"husky": "0.14.3",
"lerna": "2.11.0",
"lint-staged": "4.2.3",
"prettier": "1.8.2"
"prettier": "1.12.1"
}
}
4 changes: 1 addition & 3 deletions packages/lisk-api-client/src/api_client.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,7 @@ const getClientHeaders = clientOptions => {
}`;

return {
'User-Agent': `${name}/${version} (${engine}) ${liskElementsInformation} ${
systemInformation
}`,
'User-Agent': `${name}/${version} (${engine}) ${liskElementsInformation} ${systemInformation}`,
};
};

Expand Down
8 changes: 2 additions & 6 deletions packages/lisk-api-client/test/api_client.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,8 @@ describe('APIClient module', () => {
const platformInfo = `${os.platform()} ${os.release()}; ${os.arch()}${
locale ? `; ${locale}` : ''
}`;
const baseUserAgent = `LiskElements/1.0 (+https://github.com/LiskHQ/lisk-elements) ${
platformInfo
}`;
const customUserAgent = `LiskHub/5.0 (+https://github.com/LiskHQ/lisk-hub) ${
baseUserAgent
}`;
const baseUserAgent = `LiskElements/1.0 (+https://github.com/LiskHQ/lisk-elements) ${platformInfo}`;
const customUserAgent = `LiskHub/5.0 (+https://github.com/LiskHQ/lisk-hub) ${baseUserAgent}`;
const defaultHeaders = {
Accept: 'application/json',
'Content-Type': 'application/json',
Expand Down
2 changes: 1 addition & 1 deletion packages/lisk-cryptography/src/convert.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ export const stringifyEncryptedPassphrase = encryptedPassphrase => {
iv: encryptedPassphrase.iv,
tag: encryptedPassphrase.tag,
version: encryptedPassphrase.version,
};
};
return querystring.stringify(objectToStringify);
};

Expand Down
6 changes: 4 additions & 2 deletions packages/lisk-transactions/src/utils/get_transaction_bytes.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,9 @@ const REQUIRED_TRANSACTION_PARAMETERS = [

export const checkTransaction = transaction => {
checkRequiredFields(REQUIRED_TRANSACTION_PARAMETERS, transaction);
const { asset: { data } } = transaction;
const {
asset: { data },
} = transaction;
if (data && data.length > BYTESIZES.DATA) {
throw new Error(
`Transaction asset data exceeds size of ${BYTESIZES.DATA}.`,
Expand Down Expand Up @@ -169,7 +171,7 @@ const getTransactionBytes = transaction => {
? cryptography.bigNumberToBuffer(
recipientId.slice(0, -1),
BYTESIZES.RECIPIENT_ID,
)
)
: Buffer.alloc(BYTESIZES.RECIPIENT_ID);

const amountBigNum = bignum(amount);
Expand Down
4 changes: 1 addition & 3 deletions packages/lisk-transactions/src/utils/validation.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@ export const validatePublicKey = publicKey => {
const publicKeyBuffer = cryptography.hexToBuffer(publicKey);
if (publicKeyBuffer.length !== 32) {
throw new Error(
`Public key ${
publicKey
} length differs from the expected 32 bytes for a public key.`,
`Public key ${publicKey} length differs from the expected 32 bytes for a public key.`,
);
}
return true;
Expand Down

0 comments on commit cab23d8

Please sign in to comment.