Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions quarkchain-ethereum-tx.js
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,15 @@ class Transaction {
.imul(new BN(this.gasPrice))
.iadd(new BN(this.value));
}

getSenderAddress() {
if (this._from) {
return this._from;
}
const pubkey = this.getSenderPublicKey();
this._from = ethUtil.publicToAddress(pubkey);
return this._from;
}

/**
* validates the signature and checks to see if it has enough gas
Expand Down