fix: serializing an unsigned tx should throw
This commit is contained in:
committed by
Trent Nelson
parent
57576b07ef
commit
3e3241125f
@@ -400,7 +400,7 @@ export class Transaction {
|
||||
*/
|
||||
serialize(): Buffer {
|
||||
const {signatures} = this;
|
||||
if (!signatures) {
|
||||
if (!signatures || signatures.length === 0 || !this.verifySignatures()) {
|
||||
throw new Error('Transaction has not been signed');
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user