Repository navigation
chore(pos-app): remove unused device ID - #644
Merged
Merged
Conversation
The device ID read via react-native-device-info's getUniqueId() was a leftover from the old POS client init (#267). It was only used as a gate before creating a payment and was never sent anywhere. Drop it from the settings store (with a v21 migration that deletes the persisted value), the root layout, the scan screen, and the tests. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
|
Claude finished @ignaciosantise's task in 1m 36s —— View job Code Review
Found 1 issue(s)Issue 1: Persist version 21 collision with in-flight email-receipt PRID: settingsstore-persist-version-collision-a3f1 Context:
Recommendation: The PR description already flags this — whichever branch merges second must increment version to // Second PR to merge must become:
version: 22,
// and change the guard:
if (version < 22) {
delete persistedState.deviceId; // or email-receipt migration
}The rest of the change is clean:
|
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
react-native-device-info'sgetUniqueId()on launch. It was left over from the old POS client setup (chore: use device id to init pos client #267), which needed a device ID to start.@walletconnect/pay-core, its only use was the checkif (!deviceId || !amount) return;before creating a payment inapp/scan.tsx. The value was never sent to any API, logged, or passed to Sentry.deviceIdandsetDeviceIdfromuseSettingsStore, bumps the persist version to 21, and adds a migration that deletes the device ID already saved on existing devices.getDeviceIdentifier()fromutils/misc.ts, the effect inapp/_layout.tsx, and the related tests and mocks. Adds a migration test.react-native-device-infostays, becauseisTabletandisCameraPresentstill use it.Removing the check doesn't change behaviour: the root layout doesn't render until the settings store has loaded (
_layout.tsx), so the scan screen never ran before the device ID existed.Test plan
npx jest: all 35 suites, 304 tests passnpx expo lintis clean, and Prettier passes on the changed files🤖 Generated with Claude Code