Skip to content

Commit

Permalink
Allow User To See Wallet's Private Key (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
StrungSafe authored Mar 19, 2024
1 parent d9798da commit 2384df9
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/components/Wallets.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import {
generatePrivateKey,
instantiateRipemd160,
instantiateSha256,
Base58AddressFormatVersion,
encodeCashAddress,
encodePrivateKeyWif,
} from '@bitauth/libauth'
import InfoUtxos from './InfoUtxos'

Expand Down Expand Up @@ -150,6 +150,15 @@ const WalletInfo: React.FC<Props> = ({network, setShowWallets, wallets, setWall
<strong>Wallet utxos</strong>
<p>{wallet.utxos?.length} {wallet.utxos?.length == 1 ? "utxo" : "utxos"}</p>
</Card.Text>
<details>
<summary>Show Private Key</summary>
<div>
WIF: {encodePrivateKeyWif(wallet.privKey, network === "mainnet" ? "mainnet" : "testnet")}
</div>
<div>
Hex: {wallet.privKeyHex}
</div>
</details>
<details onClick={() => updateUtxosWallet(wallet,index)}>
<summary>Show utxos</summary>
<div>
Expand Down

0 comments on commit 2384df9

Please sign in to comment.