@@ -12,7 +12,7 @@ describe('Tao Unstake Builder', function () {
12
12
beforeEach ( function ( ) {
13
13
const config = buildTestConfig ( ) ;
14
14
const material = utils . getMaterial ( config . network . type ) ;
15
- // console.log('Material:', material);
15
+ //console.log('Material:', material);
16
16
builder = new UnstakeBuilder ( config ) . material ( material ) ;
17
17
} ) ;
18
18
describe ( 'setter validation' , function ( ) {
@@ -38,14 +38,14 @@ describe('Tao Unstake Builder', function () {
38
38
. sequenceId ( { name : 'Nonce' , keyword : 'nonce' , value : 200 } )
39
39
. fee ( { amount : 0 , type : 'tip' } )
40
40
. addSignature ( { pub : sender . publicKey } , Buffer . from ( mockTssSignature , 'hex' ) ) ;
41
-
41
+ // console.log('Builder after setting properties:', builder);
42
42
const tx = await builder . build ( ) ;
43
- // console.log('Transaction built:', tx);
43
+ // console.log('Transaction built:', tx);
44
44
const txJson = tx . toJson ( ) ;
45
- console . log ( 'Transaction JSON:' , JSON . stringify ( txJson , null , 2 ) ) ;
46
- should . deepEqual ( txJson . amount , 50000000000000 ) ;
47
- should . deepEqual ( txJson . hotkey , '5H56KVtb3sSMxuhFsH51iFi1gei7tnBQjpVmj6hu9tK7CBDR' ) ;
48
- should . deepEqual ( txJson . netuid , 0 ) ;
45
+ // console.log('Transaction JSON:', JSON.stringify(txJson, null, 2));
46
+ should . deepEqual ( txJson . amount , ' 50000000000000' ) ;
47
+ should . deepEqual ( txJson . to , '5H56KVtb3sSMxuhFsH51iFi1gei7tnBQjpVmj6hu9tK7CBDR' ) ;
48
+ should . deepEqual ( txJson . netuid , '0' ) ;
49
49
should . deepEqual ( txJson . sender , sender . address ) ;
50
50
should . deepEqual ( txJson . blockNumber , 3933 ) ;
51
51
should . deepEqual ( txJson . referenceBlock , referenceBlock ) ;
@@ -67,14 +67,12 @@ describe('Tao Unstake Builder', function () {
67
67
. referenceBlock ( referenceBlock )
68
68
. sequenceId ( { name : 'Nonce' , keyword : 'nonce' , value : 200 } )
69
69
. fee ( { amount : 0 , type : 'tip' } ) ;
70
- // console.log('Builder after setting properties:', builder);
71
70
console . log ( 'Building transaction...' ) ;
72
71
const tx = await builder . build ( ) ;
73
72
const txJson = tx . toJson ( ) ;
74
- // console.log('Transaction JSON:', JSON.stringify(txJson, null, 2));
75
- should . deepEqual ( txJson . amount , 50000000000000 ) ;
76
- should . deepEqual ( txJson . hotkey , '5H56KVtb3sSMxuhFsH51iFi1gei7tnBQjpVmj6hu9tK7CBDR' ) ;
77
- should . deepEqual ( txJson . netuid , 0 ) ;
73
+ should . deepEqual ( txJson . amount , '50000000000000' ) ;
74
+ should . deepEqual ( txJson . to , '5H56KVtb3sSMxuhFsH51iFi1gei7tnBQjpVmj6hu9tK7CBDR' ) ;
75
+ should . deepEqual ( txJson . netuid , '0' ) ;
78
76
should . deepEqual ( txJson . sender , sender . address ) ;
79
77
should . deepEqual ( txJson . blockNumber , 3933 ) ;
80
78
should . deepEqual ( txJson . referenceBlock , referenceBlock ) ;
@@ -88,12 +86,12 @@ describe('Tao Unstake Builder', function () {
88
86
} ) ;
89
87
it ( 'should build from raw signed tx' , async function ( ) {
90
88
builder . from ( rawTx . unstake . signed ) ;
91
- builder . validity ( { firstValid : 3933 , maxDuration : 64 } ) . referenceBlock ( referenceBlock ) ;
89
+ // builder.validity({ firstValid: 3933, maxDuration: 64 }).referenceBlock(referenceBlock);
92
90
const tx = await builder . build ( ) ;
93
91
const txJson = tx . toJson ( ) ;
94
- should . deepEqual ( txJson . amount , 50000000000000 ) ;
95
- should . deepEqual ( txJson . hotkey , '5H56KVtb3sSMxuhFsH51iFi1gei7tnBQjpVmj6hu9tK7CBDR' ) ;
96
- should . deepEqual ( txJson . netuid , 0 ) ;
92
+ should . deepEqual ( txJson . amount , ' 50000000000000' ) ;
93
+ should . deepEqual ( txJson . to , '5H56KVtb3sSMxuhFsH51iFi1gei7tnBQjpVmj6hu9tK7CBDR' ) ;
94
+ should . deepEqual ( txJson . netuid , '0' ) ;
97
95
should . deepEqual ( txJson . sender , '5F1mFBGhm7FrSKftDxzFPN8U1BqHKSAxEDhTV2Yx5JhCe2Nk' ) ;
98
96
should . deepEqual ( txJson . blockNumber , 3933 ) ;
99
97
should . deepEqual ( txJson . referenceBlock , referenceBlock ) ;
@@ -114,9 +112,9 @@ describe('Tao Unstake Builder', function () {
114
112
. addSignature ( { pub : sender . publicKey } , Buffer . from ( mockTssSignature , 'hex' ) ) ;
115
113
const tx = await builder . build ( ) ;
116
114
const txJson = tx . toJson ( ) ;
117
- should . deepEqual ( txJson . amount , 50000000000000 ) ;
118
- should . deepEqual ( txJson . hotkey , '5H56KVtb3sSMxuhFsH51iFi1gei7tnBQjpVmj6hu9tK7CBDR' ) ;
119
- should . deepEqual ( txJson . netuid , 0 ) ;
115
+ should . deepEqual ( txJson . amount , ' 50000000000000' ) ;
116
+ should . deepEqual ( txJson . to , '5H56KVtb3sSMxuhFsH51iFi1gei7tnBQjpVmj6hu9tK7CBDR' ) ;
117
+ should . deepEqual ( txJson . netuid , '0' ) ;
120
118
should . deepEqual ( txJson . sender , '5F1mFBGhm7FrSKftDxzFPN8U1BqHKSAxEDhTV2Yx5JhCe2Nk' ) ;
121
119
should . deepEqual ( txJson . blockNumber , 3933 ) ;
122
120
should . deepEqual ( txJson . referenceBlock , referenceBlock ) ;
0 commit comments