Skip to content

Commit

Permalink
Merge pull request #2759 from bsnowden3/fix-schnorr-verify
Browse files Browse the repository at this point in the history
Fix schnorr verify
  • Loading branch information
matiu committed Mar 19, 2020
2 parents ff706b1 + d5888f1 commit 1c1e377
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
2 changes: 1 addition & 1 deletion packages/bitcore-lib-cash/lib/crypto/schnorr.js
Expand Up @@ -198,7 +198,7 @@ Schnorr.prototype._findSignature = function(d, e) {
return Schnorr().set({
hashbuf: hashbuf,
endian: endian,
sig: {...sig, isSchnorr: true },
sig: sig,
pubkey: pubkey
}).verify().verified;
};
Expand Down
Expand Up @@ -28,11 +28,10 @@ export class TransactionDetailsComponent implements OnInit {
public showCoins = true;
@Input()
public chainNetwork: ChainNetwork;
public confirmations: number;
@Input()
public page: string;

public confirmations;

private COIN = 100000000;
private DEFAULT_RBF_SEQNUMBER = 0xffffffff;

Expand All @@ -47,11 +46,8 @@ export class TransactionDetailsComponent implements OnInit {
) {}

public ngOnInit(): void {
this.getConfirmations();
if (this.chainNetwork.chain !== 'ETH') {
if (!this.tx.vin || !this.tx.vin.length) {
this.getCoins();
}
this.getConfirmations();
}
}

Expand All @@ -63,15 +59,13 @@ export class TransactionDetailsComponent implements OnInit {
this.tx.vout = data.outputs;
this.tx.fee = this.txProvider.getFee(this.tx);
this.tx.isRBF = _.some(data.inputs, input => {
return (
input.sequenceNumber &&
input.sequenceNumber < this.DEFAULT_RBF_SEQNUMBER - 1
);
return input.sequenceNumber && input.sequenceNumber < this.DEFAULT_RBF_SEQNUMBER - 1;
});
this.tx.hasUnconfirmedInputs = _.some(data.inputs, input => {
return input.mintHeight < 0;
});
this.tx.valueOut = data.outputs.reduce((a, b) => a + b.value, 0);
this.getConfirmations();
});
}

Expand Down

0 comments on commit 1c1e377

Please sign in to comment.