Skip to content

Cannot Import Account Using Private Key Due to Auto-Copied Address in Petra Wallet #63

@arpitanand333

Description

@arpitanand333

Description:
When trying to import an account in Petra Wallet using a private key, the pasted value gets replaced with the current account’s address. This happens because clicking the "Account" button automatically copies the address, leading to the wrong value being pasted when attempting to import an account.

Steps to Reproduce:
Open Petra Wallet.
Click on the Account button (this automatically copies the current account address).
Go to Account → Add Account → Import using Private Key.
Paste the previously copied private key.
Instead of the private key, the current account address gets pasted.

Expected Behavior:
The pasted value should be the private key copied by the user, not the account address copied due to clicking the "Account" button.

Actual Behavior:
The wallet mistakenly pastes the current account address instead of the intended private key, making it impossible to import an account via copy-paste.

Suggested Fix:
Prevent the account address from being copied automatically when clicking the Account button.
Ensure that pasting a private key in the import field does not get replaced by an unintended clipboard value.
Environment:
Petra Wallet Version: 1.2.88
Browser: (Chrome/Brave)
OS: (Linux)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions