Completed
Pull Request — master (#99)
by
unknown
03:07
created

test/btccom-convert/btccom.addressUnspent.test.js   A

Complexity

Total Complexity 4
Complexity/F 1

Size

Lines of Code 30
Function Count 4

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 0
wmc 4
c 1
b 0
f 0
nc 1
mnd 0
bc 4
fnc 4
dl 0
loc 30
rs 10
bpm 1
cpm 1
noi 4

2 Functions

Rating   Name   Duplication   Size   Complexity  
A sdk.then-1 0 3 1
A sdk.then-0 0 3 1
1
var blocktrail = require('../../main');
2
3
var btccom = !!JSON.parse(process.env.BTCCOM);
4
var sdk = blocktrail.BlocktrailSDK({
5
    apiKey : process.env.BLOCKTRAIL_SDK_APIKEY || "EXAMPLE_BLOCKTRAIL_SDK_NODEJS_APIKEY",
6
    apiSecret : process.env.BLOCKTRAIL_SDK_APISECRET || "EXAMPLE_BLOCKTRAIL_SDK_NODEJS_APISECRET",
7
    btccom: btccom
8
});
9
10
/*
11
 For positive case
12
*/
13
sdk
14
    .addressUnspentOutputs("1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa")
15
    .then(function(tx) {
16
        console.log(tx);
0 ignored issues
show
Debugging Code introduced by
console.log looks like debug code. Are you sure you do not want to remove it?
Loading history...
17
    }, function(error) {
18
        console.log(error);
0 ignored issues
show
Debugging Code introduced by
console.log looks like debug code. Are you sure you do not want to remove it?
Loading history...
19
    });
20
21
/*
22
 For negative case
23
*/
24
sdk
25
    .addressUnspentOutputs("dbaf14e1c476e76ea05a8b71921a46d6b06f0a950f1sdssd7c5f9f1a03b8fae467f10")
26
    .then(function(tx) {
27
        console.log(tx);
0 ignored issues
show
Debugging Code introduced by
console.log looks like debug code. Are you sure you do not want to remove it?
Loading history...
28
    }, function(error) {
29
        console.log(error);
0 ignored issues
show
Debugging Code introduced by
console.log looks like debug code. Are you sure you do not want to remove it?
Loading history...
30
    });
31
32
33
34