Skip to content

Commit

Permalink
remove 0x from eth pk
Browse files Browse the repository at this point in the history
  • Loading branch information
nsjames committed Jun 20, 2018
1 parent 6f3e86e commit c2d476a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/views/KeyPairView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,15 @@
},
async makePublicKey(){
setTimeout(async () => {
console.log(this.keypair.privateKey.length);
if(this.keypair.privateKey.length < 50) return false;
// Special handling for malformatted ETH keypairs.
if(this.keypair.privateKey.indexOf('0x') === 0)
this.keypair.privateKey.replace('0x', '');
this.isValid = false;
await KeyPairService.makePublicKey(this.keypair);
console.log('kp', this.keypair);
if(this.keypair.publicKey) this.isValid = true;
else this[Actions.PUSH_ALERT](AlertMsg.InvalidPrivateKey());
Expand Down

0 comments on commit c2d476a

Please sign in to comment.