Skip to content

Add privkey in WIF format#25

Open
rrozek555 wants to merge 1 commit intobitcoinvault:masterfrom
rrozek555:privkey_WIF
Open

Add privkey in WIF format#25
rrozek555 wants to merge 1 commit intobitcoinvault:masterfrom
rrozek555:privkey_WIF

Conversation

@rrozek555
Copy link

image

Copy link
Contributor

@msmorawski msmorawski left a comment

Choose a reason for hiding this comment

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

You should change base branch to develop, as far I'm aware

networkWIF = 0xef;
} else {
networkWIF = 0x80;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Wouldn't it be clearer to extract it to function?

import * as ecurve from 'ecurve';
import { GeneratedKey } from '../components/pages/keyGenerator/KeyGeneratorContent';
const bigi = require('bigi');
const wif = require('wif');
Copy link
Contributor

Choose a reason for hiding this comment

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

As far as I can see wif comes with types, so instead of

const wif = require('wif');

use import

multiline: 'Multiline',
publicKeyQrCode: 'Public key QR code',
privateKey: 'Private key',
privateKeyWIF: 'Private key in WIF',
Copy link
Contributor

Choose a reason for hiding this comment

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

Before merge, please add translations or at least placeholders. We don't want the users to see typical for JS "undefined"

{words?.map((word, index) => (<Chip key={index} label={`${index + 1}. ${word}`} />))}
</div>
<Label label={en.content.privateKeyWIF} />
<Label label={privateKeyWIF} />
Copy link
Contributor

Choose a reason for hiding this comment

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

Wouldn't it better to place it in a multiline field? It should be easier for users to copy it then, I believe

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.

2 participants