Skip to content

Commit 928db03

Browse files
committed
tx: removed rawTxHash() alias (reduce complexity for now)
1 parent ced64de commit 928db03

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

packages/tx/src/baseTransaction.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ export abstract class BaseTransaction<TransactionObject> {
1919
public readonly data: Buffer
2020
public readonly common: Common
2121

22+
public readonly v?: BN
23+
public readonly r?: BN
24+
public readonly s?: BN
25+
2226
constructor(txData: BaseTransactionData, txOptions: BaseTxOptions = {}) {
2327
const { nonce, gasLimit, gasPrice, to, value, data } = txData
2428

@@ -134,14 +138,12 @@ export abstract class BaseTransaction<TransactionObject> {
134138
/**
135139
* Computes a sha3-256 hash of the serialized unsigned tx, which is used to sign the transaction.
136140
*/
137-
rawTxHash(): Buffer {
138-
return this.getMessageToSign()
139-
}
140-
141141
abstract getMessageToSign(): Buffer
142142

143143
abstract hash(): Buffer
144144

145+
abstract getMessageToVerifySignature(): Buffer
146+
145147
abstract isSigned(): boolean
146148

147149
/**
@@ -157,14 +159,13 @@ export abstract class BaseTransaction<TransactionObject> {
157159
}
158160
}
159161

160-
abstract getMessageToVerifySignature(): Buffer
161-
162162
/**
163163
* Returns the sender's address
164164
*/
165165
getSenderAddress(): Address {
166166
return new Address(publicToAddress(this.getSenderPublicKey()))
167167
}
168+
168169
abstract getSenderPublicKey(): Buffer
169170

170171
sign(privateKey: Buffer): TransactionObject {

packages/tx/src/legacyTransaction.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,6 @@ export default class Transaction extends BaseTransaction<Transaction> {
177177

178178
getMessageToVerifySignature() {
179179
const withEIP155 = this._signedTxImplementsEIP155()
180-
181180
return this._getMessageToSign(withEIP155)
182181
}
183182

0 commit comments

Comments
 (0)