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

SDK 1.4.1 integration #652

Merged
merged 20 commits into from
Oct 30, 2023
Merged

SDK 1.4.1 integration #652

merged 20 commits into from
Oct 30, 2023

Conversation

kpyszkowski
Copy link
Contributor

@kpyszkowski kpyszkowski commented Oct 25, 2023

Ref: #647

  • Integrated SDK 1.4.1 with dApp
  • Updated project to support Node 18
  • Tested build process for goerli and development packages
  • Bumped Node version in CI/CD process configuration files

Note:

  • There is a brand new warning while yarn installing ✨
    It ain't a blocker and I couldn't pass through it easily so I decided to leave it for now.

Updated from 1.3.0-dev.9 to 2.0.0-dev.0
Applied changes proposed in commit d20aee1
@kpyszkowski kpyszkowski linked an issue Oct 25, 2023 that may be closed by this pull request
@kpyszkowski kpyszkowski force-pushed the sdk-1.4.1-integration branch from 1b8a6e6 to c87c7b0 Compare October 25, 2023 14:51
Defined mock bitcoin network transaction fee. Adjusted
missing/missplaced function parameters.
- Defined Node engine version in package.json file (<=16)
- Added .nvmrc file for improved developer experience
  (https://github.com/nvm-sh/nvm#deeper-shell-integration)
- Updated `@chakra-ui/cli` package (0.0.0-pr-20211126153854 -> 2.4.1)
- Narrowed react-icons library versions scope (^4.3.1 -> <=4.3.1)
- Bumped tsconfig module value (ES5 -> ES6)
- Resolved Webpack issue with legacy Node polyfills (crypto) -
  (webpack/webpack#14532)
Bumped NodeJS version (14 -> 18)
@kpyszkowski kpyszkowski force-pushed the sdk-1.4.1-integration branch from c87c7b0 to b7f806a Compare October 25, 2023 14:53
package.json Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
.nvmrc Show resolved Hide resolved
package.json Show resolved Hide resolved
package.json Show resolved Hide resolved
src/tbtc/mock-bitcoin-client.ts Outdated Show resolved Hide resolved
src/tbtc/mock-bitcoin-client.ts Show resolved Hide resolved
src/threshold-ts/tbtc/index.ts Outdated Show resolved Hide resolved
src/utils/tBTC.ts Outdated Show resolved Hide resolved
Updated `<=` into `>=`
Limited resolution to 4.8.0's patches (~)
Instead of analysing environmental variable the value is currently
available to use in corelated data structures. Addded comment
elaborating on mock Bitcoin network transaction fee. Refactored tBTC
utility functions to pass bitcoin network as a parameter.
@kpyszkowski kpyszkowski force-pushed the sdk-1.4.1-integration branch from 2cb19bd to d77bab2 Compare October 26, 2023 12:20
lukasz-zimnoch
lukasz-zimnoch previously approved these changes Oct 26, 2023
Copy link
Member

@lukasz-zimnoch lukasz-zimnoch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Last comments! Otherwise, LGTM! Leaving the final approval for @michalsmiarowski. Let's cut a release once this PR is merged and test those changes on mainnet preview.

src/utils/tBTC.ts Outdated Show resolved Hide resolved
src/threshold-ts/tbtc/index.ts Outdated Show resolved Hide resolved
Removed unused imports and variables
lukasz-zimnoch
lukasz-zimnoch previously approved these changes Oct 26, 2023
@kpyszkowski
Copy link
Contributor Author

@lukasz-zimnoch Your approval has been canceled, I had to push minor fixes 🙌🏼

Repositioned config comment
Updated lint-staged package to the latest version since it was causing
issues with the latest Node version
@github-actions
Copy link

1 similar comment
@github-actions
Copy link

@github-actions
Copy link

Copy link
Contributor

@michalsmiarowski michalsmiarowski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left one non-blocking comment down below

craco.config.js Show resolved Hide resolved
@michalsmiarowski
Copy link
Contributor

michalsmiarowski commented Oct 27, 2023

@kpyszkowski

It looks like all (or almost all) libraries in yarn.lock got updates which IMO is not a good idea as it is easy to miss some bugs and not all libraries could follow semantic versioning, which means not all changes could be non-braking. For example, since we updated prettier, we now had to do the changes in 545a5c3, but it looks like we don't have to update prettier to run the app on Node 18 and integrate SDK 1.4.1. It probalby got updated because you removed yarn.lock file while installing libs. For such a big transition (from Node 14 to 18) I believe the less changes we made the better. If we want to update some of the libraries, we can always do that in a separate PR.

As of now I recommend to:

  1. Revert the yarn.lock file to it's main version
  2. Revert the changes made in 545a5c3
  3. In package.json revert react-icons to ^4.3.1 and lint-staged to >=10. As of now those updates are not necessary to migrate the app to Node 18
  4. Run yarn install
  5. Check if the site builds and run properly (I already checked that but it would be good to double check)
  6. Push the changes to the branch

@michalsmiarowski michalsmiarowski added this to the v1.12.0 milestone Oct 27, 2023
@kpyszkowski
Copy link
Contributor Author

@michalsmiarowski
Thanks for analysis. I have:

  • reverted 545a5c3 commit, ref: 7ca2f5d
  • checked out yarn.lock file to origin/main branch, ref: b8cfd0f
  • reverted updated packages, ref: 8972db2
  • added comment about @babel/plugin-transform-class-properties babel plugin, ref: f5b5358

I tested build processes for goerli and development packages, all works well.

@github-actions
Copy link

Copy link
Contributor

@michalsmiarowski michalsmiarowski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@lukasz-zimnoch lukasz-zimnoch merged commit 50f2a42 into main Oct 30, 2023
5 checks passed
@lukasz-zimnoch lukasz-zimnoch deleted the sdk-1.4.1-integration branch October 30, 2023 09:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Switch dApp to SDK v1.4.1
3 participants