-
Notifications
You must be signed in to change notification settings - Fork 298
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
[LW-12241] Update index.ts to cater for the cleardown of ledger state if not alr… #3276
[LW-12241] Update index.ts to cater for the cleardown of ledger state if not alr… #3276
Conversation
…eady flagged as done Update index.ts to cater for the cleardown of ledger state if not already flagged as done
I have applied the moving of the imports and the build was as clean as it was before changes applied |
c3508e0
to
4e7f3b0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GJ!
Co-authored-by: Szymon Masłowski <[email protected]>
source/main/index.ts
Outdated
|
||
// Check if the flag file exists | ||
if (fs.existsSync(flagFileLongName)) { | ||
logger.log(`${flagFileLongName} found. NoHskpg.`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems there is no log
method on logger. Please use info
instead.
logger.log(`${flagFileLongName} found. NoHskpg.`); | |
logger.info(`${flagFileLongName} found. NoHskpg.`); |
source/main/index.ts
Outdated
if (fs.lstatSync(filePath).isFile()) { | ||
// ?it's a file | ||
fs.unlinkSync(filePath); | ||
console.log(`HskpgDone: ${filePath}`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
console.log(`HskpgDone: ${filePath}`); | |
logger.info(`HskpgDone: ${filePath}`); |
source/main/index.ts
Outdated
// Create v10-upgraded completed marker | ||
fs.writeFileSync(flagFileLongName, 'HskpgNwFlag'); | ||
} catch (err) { | ||
console.error(`Error removing files: ${err}`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
console.error(`Error removing files: ${err}`); | |
logger.error(`Error removing files: ${err}`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have applied those changes and committed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GJ!
LW-12241
Code Changes
Update index.ts to cater for the cleardown of ledger state if not already flagged as done, this involved creating a routine for the cleardown, creating a flag indicating it was completed
check if v10 state clear flag created
if not the remove files under chain/ledger
create non-reentrant flag
Todos
Screenshots
Testing Checklist
Review Checklist
Basics
input-output-hk/daedalus-dev
andinput-output-hk/daedalus-qa
assigned as PR reviewersrelease-vNext
,feature
/bug
/chore
,WIP
)yarn manage:translations
produces no changes)yarn storybook
)yarn.lock
file is updatedCode Quality
Testing
After Review