Skip to content

Commit

Permalink
Implemented changes based on PR review
Browse files Browse the repository at this point in the history
  • Loading branch information
ikem-legend committed May 15, 2024
1 parent c2caf4e commit 66e64ef
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"PRODUCTION": true,
"LISK_DOMAIN": true,
"REACT_APP_DEFAULT_NETWORK": true,
"REACT_APP_MAPBOX_ACCESS_TOKEN": true,
"REACT_APP_MAPBOX_ACCESS_TOKEN": true
},
"env": {
"es2020": true,
Expand Down
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,13 @@ app/app.js
blockchain_explorer.db.gz
reports
.history
.env.*
yarn-error.log
*.tgz

## Local environment files
.env.*
!.env.example

## Commercial fonts
setup/react/assets/fonts/basierCircle/
setup/react/assets/fonts/gilroy/
Expand Down
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ pipeline {
ansiColor('xterm')
}
parameters {
string(name: 'CORE_VERSION', defaultValue: '4.0.2')
string(name: 'CORE_VERSION', defaultValue: '4.0.5')
string(name: 'SERVICE_BRANCH_NAME', defaultValue: 'development')
}
stages {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ const isHexString = (data) => {
return data === '' || /^([0-9a-f]{2})+$/i.test(data);
};

const NO_ERRORS = 'No errors';

export async function getPubKey({ devicePath, accountIndex, showOnDevice }) {
let transport;
try {
Expand All @@ -20,7 +22,7 @@ export async function getPubKey({ devicePath, accountIndex, showOnDevice }) {
? await liskLedger.showAddressAndPubKey(ledgerAccount.derivePath())
: await liskLedger.getAddressAndPubKey(ledgerAccount.derivePath());
await transport?.close();
if (response?.error_message === 'No errors') {
if (response?.error_message === NO_ERRORS) {
return response?.pubKey;
}
return Promise.reject(response.return_code);
Expand All @@ -37,7 +39,7 @@ export async function getMultipleAddresses({ devicePath, accountIndexes }) {
const liskLedger = new LiskApp(transport);
const response = await liskLedger.getMultipleAddresses(accountIndexes);
await transport?.close();
if (response?.error_message === 'No errors') {
if (response?.error_message === NO_ERRORS) {
return response?.addr;
}
return Promise.reject(response.return_code);
Expand All @@ -58,7 +60,7 @@ export async function getSignedTransaction({ devicePath, accountIndex, unsignedM
Buffer.from(unsignedMessage, 'hex')
);
if (transport && transport.close) await transport.close();
if (response?.error_message === 'No errors') {
if (response?.error_message === NO_ERRORS) {
return response;
}
return Promise.reject(response.return_code);
Expand All @@ -80,7 +82,7 @@ export async function getSignedMessage({ devicePath, accountIndex, unsignedMessa
const response = await liskLedger.signMessage(ledgerAccount.derivePath(), message);
await transport?.close();

if (response?.error_message === 'No errors') {
if (response?.error_message === NO_ERRORS) {
return response;
}
return Promise.reject(response.return_code);
Expand All @@ -102,7 +104,7 @@ export async function getSignedRawMessage({ devicePath, accountIndex, unsignedMe
const response = await liskLedger.claimMessage(ledgerAccount.derivePath(), message);
await transport?.close();

if (response?.error_message === 'No errors') {
if (response?.error_message === NO_ERRORS) {
return response;
}
return Promise.reject(response.return_code);
Expand Down

0 comments on commit 66e64ef

Please sign in to comment.