Strip the r and s (since we not pad) for transactions.
This commit is contained in:
parent
5631f071c3
commit
2feced5937
@ -55,8 +55,8 @@ function SigningKey(privateKey) {
|
||||
|
||||
utils.defineProperty(this, 'signDigest', function(digest) {
|
||||
var signature = keyPair.sign(utils.arrayify(digest), {canonical: true});
|
||||
const r = '0x' + signature.r.toString(16);
|
||||
const s = '0x' + signature.s.toString(16);
|
||||
var r = '0x' + signature.r.toString(16);
|
||||
var s = '0x' + signature.s.toString(16);
|
||||
|
||||
return {
|
||||
recoveryParam: signature.recoveryParam,
|
||||
|
@ -133,8 +133,8 @@ function Wallet(privateKey, provider) {
|
||||
}
|
||||
|
||||
raw.push(utils.hexlify(v));
|
||||
raw.push(signature.r);
|
||||
raw.push(signature.s);
|
||||
raw.push(utils.stripZeros(utils.arrayify(signature.r)));
|
||||
raw.push(utils.stripZeros(utils.arrayify(signature.s)));
|
||||
|
||||
return utils.RLP.encode(raw);
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user