Skip to content

Commit

Permalink
added sign method to Transaction class
Browse files Browse the repository at this point in the history
  • Loading branch information
scientistnik committed Nov 23, 2019
1 parent 2f94a03 commit c901f89
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "btsdex",
"version": "0.7.2",
"version": "0.7.3",
"description": "Package for work with BitShares DEX",
"main": "lib",
"bin": {
Expand Down
6 changes: 5 additions & 1 deletion src/transaction/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,15 @@ class Transaction {
);
};

broadcast = async keys => {
sign = async keys => {
await this.tx.set_required_fees();
(keys ? keys : this.keys).forEach(key =>
this.tx.add_signer(key, key.toPublicKey().toPublicKeyString())
);
};

broadcast = async keys => {
await this.sign(keys);
return this.tx.broadcast();
};

Expand Down

0 comments on commit c901f89

Please sign in to comment.