@@ -8,7 +8,7 @@ const waitForSTPropagated = require('../../lib/waitForSTPropagated');
8
8
9
9
// TODO: temporary disabled due to flakiness. These tests aren't important for now, since we are
10
10
// going to release v1.0.0 with withdrawals disabled.
11
- describe . skip ( 'Withdrawals' , function withdrawalsTest ( ) {
11
+ describe ( 'Withdrawals' , function withdrawalsTest ( ) {
12
12
this . bail ( true ) ;
13
13
14
14
let client ;
@@ -38,7 +38,7 @@ describe.skip('Withdrawals', function withdrawalsTest() {
38
38
} ) ;
39
39
40
40
describe ( 'Any Identity' , ( ) => {
41
- const INITIAL_BALANCE = 1000000 ;
41
+ const INITIAL_BALANCE = 2000000 ;
42
42
43
43
before ( async ( ) => {
44
44
identity = await client . platform . identities . register ( INITIAL_BALANCE ) ;
@@ -57,7 +57,9 @@ describe.skip('Withdrawals', function withdrawalsTest() {
57
57
await client . platform . identities . withdrawCredits (
58
58
identity ,
59
59
BigInt ( amountToWithdraw ) ,
60
- withdrawTo . address ,
60
+ {
61
+ toAddress : withdrawTo . address ,
62
+ } ,
61
63
) ;
62
64
63
65
// Re-fetch identity to obtain latest core chain lock height
@@ -125,7 +127,9 @@ describe.skip('Withdrawals', function withdrawalsTest() {
125
127
const { height : withdrawalHeight } = await client . platform . identities . withdrawCredits (
126
128
identity ,
127
129
BigInt ( amountToWithdraw ) ,
128
- withdrawTo . address ,
130
+ {
131
+ toAddress : withdrawTo . address ,
132
+ } ,
129
133
) ;
130
134
131
135
let withdrawalBroadcasted = false ;
@@ -173,7 +177,9 @@ describe.skip('Withdrawals', function withdrawalsTest() {
173
177
await expect ( client . platform . identities . withdrawCredits (
174
178
identity ,
175
179
BigInt ( amountToWithdraw ) ,
176
- withdrawTo . address ,
180
+ {
181
+ toAddress : withdrawTo . address ,
182
+ } ,
177
183
) ) . to . be . rejectedWith ( `Withdrawal amount "${ amountToWithdraw } " is bigger that identity balance "${ identityBalanceBefore } "` ) ;
178
184
} ) ;
179
185
@@ -186,11 +192,11 @@ describe.skip('Withdrawals', function withdrawalsTest() {
186
192
await expect ( client . platform . identities . withdrawCredits (
187
193
identity ,
188
194
BigInt ( amountToWithdraw ) ,
189
- withdrawTo . address ,
190
195
{
196
+ toAddress : withdrawTo . address ,
191
197
signingKeyIndex : 1 ,
192
198
} ,
193
- ) ) . to . be . rejectedWith ( 'Error conversion not implemented: Invalid public key security level HIGH. The state transition requires one of CRITICAL ' ) ;
199
+ ) ) . to . be . rejectedWith ( 'Error conversion not implemented: Invalid public key security level HIGH. The state transition requires one of MASTER ' ) ;
194
200
} ) ;
195
201
196
202
// TODO: Figure out how to overcome client-side validation and implement
@@ -227,7 +233,9 @@ describe.skip('Withdrawals', function withdrawalsTest() {
227
233
await client . platform . identities . withdrawCredits (
228
234
identity ,
229
235
BigInt ( 1000000 ) ,
230
- withdrawTo . address ,
236
+ {
237
+ toAddress : withdrawTo . address ,
238
+ } ,
231
239
) ;
232
240
233
241
await waitForSTPropagated ( ) ;
0 commit comments