-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add cost method for transacion, update docs
- Loading branch information
Nikolay Nozdrin-Plotnitsky
committed
Oct 28, 2018
1 parent
9c86abd
commit a6e1853
Showing
8 changed files
with
82 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
const | ||
assert = require("assert"), | ||
//fs = require("fs"), | ||
BitShares = require("../index.js"); | ||
|
||
require("dotenv").config(); | ||
|
||
describe("Transaction class", () => { | ||
before(async () => { | ||
await BitShares.connect(process.env.BITSHARES_NODE) | ||
}) | ||
|
||
describe("#cost()", () => { | ||
it.only("get cost", async () => { | ||
let acc = await BitShares.login(process.env.BITSHARES_ACCOUNT, process.env.BITSHARES_PASSWORD) | ||
let tx = acc.newTx() | ||
|
||
let operation = await acc.transferOperation("trade-bot", "TEST", 1) | ||
tx.add(operation) | ||
|
||
operation = await acc.transferOperation("trade-bot", "TEST", 1) | ||
tx.add(operation) | ||
|
||
let cost = await tx.cost().catch(console.log) | ||
console.log(JSON.stringify(cost,null,2)) | ||
}) | ||
}) | ||
}) |