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

feat: kk desktop migrate #8927

Conversation

BitHighlander
Copy link
Contributor

@BitHighlander BitHighlander commented Feb 23, 2025

Description

This PR moves ShapeShift to align KeepKey onboarding by directing users to download KeepKey Desktop directly instead of the legacy updater app. The update process now automatically delivers the appropriate installer (whether .exe, .dmg, or .AppImage) without requiring users to manually select their platform-specific file. This change keeps users within the ShapeShift experience, preventing confusion that can arise when redirected to the GitHub releases page. Furthermore, it migrates from the legacy updater app, which has experienced reliability issues and contains outdated Zendesk support links. KeepKey Desktop has successfully onboarded KeepKey users into ShapeShift for multiple years and serves as our primary, documented, and supported onboarding flow.

Issue (if applicable)

Risk

Low – Users have been using KeepKey Desktop for onboarding and updates for years. This change only modifies URLs, translations, and update logic, with no impact on transaction protocols or wallet functionalities.

Testing

Connect a new or un-updated KeepKey to view the onboarding/upgrading flow.

KeepKey onboarding is documented at KeepKey Get Started.

Engineering

  • Verify that the update flow automatically downloads the correct installer for macOS, Windows, and Linux.
  • Ensure that UI translations are updated to reference KeepKey Desktop rather than the legacy updater.
  • Confirm that users remain within ShapeShift and are not redirected to external GitHub release pages.

Operations

  • 🏁 My feature is behind a flag and doesn't require operations testing (yet)

For operations, verify that all updated URLs and support links are correctly routed and monitored. Ensure that the transition to KeepKey Desktop is reflected in documentation and communications, and that there are no adverse effects on existing monitoring or support processes.

Screenshots (if applicable)

New Dynamic version downloader
Screenshot 2025-02-24 at 9 58 59 PM

Update flow
any version under latest

Update button now opens modal
Screenshot 2025-02-24 at 9 59 14 PM

toast now opens modal
Screenshot 2025-02-24 at 9 59 43 PM

@BitHighlander BitHighlander requested a review from a team as a code owner February 23, 2025 01:10
@BitHighlander BitHighlander changed the title Feature kk desktop migrate feat: kk desktop migrate Feb 23, 2025
Copy link
Member

@0xApotheosis 0xApotheosis left a comment

Choose a reason for hiding this comment

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

Some thoughts from a first pass:

❌ We are missing CSPs for https://api.github.com/repos/keepkey/keepkey-desktop/releases/latest:

Screenshot 2025-02-24 at 19 23 12

❌ Clicking "Download Desktop App" opens a blank tab

✅ External links in the KeepKey menu and the toast now point to the new desktop version.

❔ The only way I've found to bring up the "Download Updated App" button is to reject the pairing request when connecting the KeepKey. On the happy path when I connect an un-updated KeepKey it just connects as normal.

Screenshot 2025-02-24 at 19 18 08

See Jam showing each of these behaviours: https://jam.dev/c/76684e0d-f199-444e-aff1-c003459d673d

@@ -1195,7 +1195,7 @@
"button": "Nochmaliger Versuch"
},
"downloadUpdater": {
"header": "Lade den KeepKey-Updater",
Copy link
Member

@0xApotheosis 0xApotheosis Feb 24, 2025

Choose a reason for hiding this comment

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

These translation changes are probably fine as they are literal English strings, but in files like ja/main.json (and ru, uk etc) we'll want to remove the key so it triggers the globalization workstream to come back and re-translate it.

E.g. KeepKeyアップデーターをダウンロード translates to Download the KeepKey Updater..

Alternatively you could probably reasonably skip the re-translation step and use AI to do it in this PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I gave this a shot, I noticed a few of the languages done have the the downloadUpdater field at all id/ko and when I tried to run the script I got. ```➜ web git:(feature-kk-desktop-migrate) ✗ yarn translations:update-path
/Users/highlander/WebstormProjects/web/scripts/translations/updateTranslationPath.ts:12
const splitPreviousPath = previousPath.split('.')
^

TypeError: Cannot read properties of undefined (reading 'split')

.env.base Outdated
@@ -146,9 +146,9 @@ REACT_APP_ONRAMPER_API_KEY=pk_prod_01HWMA66BYRB2271G08XDZVVCX
REACT_APP_YAT_NODE_URL=https://a.y.at

# Keepkey updater
REACT_APP_KEEPKEY_UPDATER_RELEASE_PAGE=https://github.com/keepkey/keepkey-updater/releases/latest
REACT_APP_KEEPKEY_UPDATER_RELEASE_PAGE=https://github.com/keepkey/keepkey-desktop/releases/latest
Copy link
Member

Choose a reason for hiding this comment

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

REACT_APP_KEEPKEY_UPDATER_RELEASE_PAGE isn't actually used anywhere in the app, and I think can actually be removed entirely.

It's imported in src/context/WalletProvider/KeepKey/helpers.ts to no effect.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

removed

.env.base Outdated
REACT_APP_KEEPKEY_DESKTOP_URL=http://localhost:1646/
REACT_APP_KEEPKEY_UPDATER_BASE_URL=https://github.com/keepkey/keepkey-updater/releases/download/v2.1.4/
REACT_APP_KEEPKEY_UPDATER_BASE_URL=https://github.com/keepkey/keepkey-desktop/releases/download/v3.0.27/
Copy link
Member

Choose a reason for hiding this comment

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

Same with REACT_APP_KEEPKEY_UPDATER_BASE_URL.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

removed

@@ -4,5 +4,6 @@ export const csp: Csp = {
'connect-src': [
process.env.REACT_APP_KEEPKEY_VERSIONS_URL!,
process.env.REACT_APP_KEEPKEY_DESKTOP_URL!,
'https://api.github.com/repos/keepkey/keepkey-desktop/releases/*',
Copy link
Member

Choose a reason for hiding this comment

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

This guy should be an env var.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

moved to env.

try {
const resp = await axios({
method: 'GET',
url: 'https://api.github.com/repos/keepkey/keepkey-desktop/releases/latest',
Copy link
Member

Choose a reason for hiding this comment

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

and then use that env var as the prefix here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated

case 'Linux':
return downloadUrls.Linux
default:
return 'https://github.com/keepkey/keepkey-desktop/releases/latest'
Copy link
Member

@0xApotheosis 0xApotheosis Feb 24, 2025

Choose a reason for hiding this comment

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

We actually could use REACT_APP_KEEPKEY_UPDATER_RELEASE_PAGE here instead of removing it.

@BitHighlander BitHighlander force-pushed the feature-kk-desktop-migrate branch from 4f61007 to cff4ac7 Compare February 25, 2025 03:28
@BitHighlander
Copy link
Contributor Author

Thanks for Posting the jam. I modified this pr to handle both the toast and update buttons to open the wallet modal and point to the download page itself. and it should no longer open a new tab and instead keep they on shapeshift and just download.

@gomesalexandre
Copy link
Contributor

Superseeded by #8949

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.

Update KK Updater CTA to KK Dekstop
3 participants