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

Prevent hardware wallets from being attached to accounts multiple times #678

Merged
merged 4 commits into from May 3, 2022

Conversation

hpeebles
Copy link
Contributor

@hpeebles hpeebles commented Apr 8, 2022

Motivation

This PR fixes a bug where a hardware wallet could be attached to a single account multiple times. This would result in the user who own's the account seeing duplicate transactions for the hardware wallet.

Changes

  • Prevent a hardware wallet from being attached to an account multiple times.

Tests

I attached my hardware wallet twice on 2 test versions of the NNS Dapp, one with the fix, and one without.
On the one without the fix my transactions were duplicated, on the one with the fix they were not.

Use II anchor 27 to view the test account.

No fix - https://s24we-diaaa-aaaaa-aaaka-cai.nnsdapp.dfinity.network/#/wallet/bf7999cc05364166ec0bab77c69fa6842ec03160095ef404db71adfdd986f099

Fix - https://su63m-yyaaa-aaaaa-aaala-cai.nnsdapp.dfinity.network/#/wallet/bf7999cc05364166ec0bab77c69fa6842ec03160095ef404db71adfdd986f099

@hpeebles hpeebles changed the title Prevent duplicate hardware wallets from being attached to an account Prevent hardware wallet from being attached to an account multiple times Apr 8, 2022
@hpeebles hpeebles changed the title Prevent hardware wallet from being attached to an account multiple times Prevent each hardware wallet from being attached to an account multiple times Apr 8, 2022
@hpeebles hpeebles changed the title Prevent each hardware wallet from being attached to an account multiple times Prevent hardware wallets from being attached to accounts multiple times Apr 8, 2022
@hpeebles hpeebles marked this pull request as ready for review April 14, 2022 10:50
@ielashi
Copy link
Contributor

ielashi commented Apr 21, 2022

@hpeebles Late to the party. LGTM!

@hpeebles hpeebles merged commit 36664af into main May 3, 2022
@hpeebles hpeebles deleted the duplicate_hw_wallets branch May 3, 2022 09:00
bitdivine pushed a commit that referenced this pull request May 9, 2022
# Motivation

Prior to #678, hardware wallets could be attached to accounts multiple times. This would result in duplicate transactions appearing in the transactions list for those hardware wallet accounts.

This PR removes the duplicate hardware wallets and the duplicate transactions.
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.

None yet

2 participants