@@ -50,6 +50,7 @@ describe("Timelock", function() {
50
50
tx . addOutputs ( {
51
51
quantity : 1 ,
52
52
assetType : asset . assetType ,
53
+ shardId : asset . shardId ,
53
54
recipient : await node . createP2PKHAddress ( )
54
55
} ) ;
55
56
await node . signTransactionInput ( tx , 0 ) ;
@@ -113,6 +114,7 @@ describe("Timelock", function() {
113
114
failedTx . addOutputs ( {
114
115
quantity : 1 ,
115
116
assetType : asset . assetType ,
117
+ shardId : asset . shardId ,
116
118
recipient : await node . createP2PKHAddress ( )
117
119
} ) ;
118
120
const invoices1 = await node . sendAssetTransaction ( failedTx ) ;
@@ -132,6 +134,7 @@ describe("Timelock", function() {
132
134
tx . addOutputs ( {
133
135
quantity : 1 ,
134
136
assetType : asset . assetType ,
137
+ shardId : asset . shardId ,
135
138
recipient : await node . createP2PKHAddress ( )
136
139
} ) ;
137
140
await node . signTransactionInput ( tx , 0 ) ;
@@ -202,6 +205,7 @@ describe("Timelock", function() {
202
205
tx . addOutputs ( {
203
206
quantity : 1 ,
204
207
assetType : asset . assetType ,
208
+ shardId : asset . shardId ,
205
209
recipient : await node . createP2PKHAddress ( )
206
210
} ) ;
207
211
await node . signTransactionInput ( tx , 0 ) ;
@@ -245,6 +249,7 @@ describe("Timelock", function() {
245
249
transferTx . addOutputs (
246
250
Array . from ( Array ( count ) ) . map ( _ => ( {
247
251
assetType : asset . assetType ,
252
+ shardId : asset . shardId ,
248
253
quantity : 1 ,
249
254
recipient
250
255
} ) )
@@ -256,7 +261,7 @@ describe("Timelock", function() {
256
261
257
262
it ( "2 inputs [Block(4), Block(6)] => Block(6)" , async function ( ) {
258
263
const assets = await createUTXOs ( 2 ) ;
259
- const { assetType } = assets [ 0 ] ;
264
+ const { assetType, shardId } = assets [ 0 ] ;
260
265
const tx = node . sdk . core . createTransferAssetTransaction ( ) ;
261
266
tx . addInputs ( [
262
267
assets [ 0 ] . createTransferInput ( {
@@ -272,7 +277,7 @@ describe("Timelock", function() {
272
277
}
273
278
} )
274
279
] ) ;
275
- tx . addOutputs ( { quantity : 2 , recipient, assetType } ) ;
280
+ tx . addOutputs ( { quantity : 2 , recipient, assetType, shardId } ) ;
276
281
await node . signTransactionInput ( tx , 0 ) ;
277
282
await node . signTransactionInput ( tx , 1 ) ;
278
283
await node . sendAssetTransaction ( tx , { awaitInvoice : false } ) ;
@@ -293,7 +298,7 @@ describe("Timelock", function() {
293
298
294
299
it ( "2 inputs [Block(6), Block(4)] => Block(4)" , async function ( ) {
295
300
const assets = await createUTXOs ( 2 ) ;
296
- const { assetType } = assets [ 0 ] ;
301
+ const { assetType, shardId } = assets [ 0 ] ;
297
302
const tx = node . sdk . core . createTransferAssetTransaction ( ) ;
298
303
tx . addInputs ( [
299
304
assets [ 0 ] . createTransferInput ( {
@@ -309,7 +314,7 @@ describe("Timelock", function() {
309
314
}
310
315
} )
311
316
] ) ;
312
- tx . addOutputs ( { quantity : 2 , recipient, assetType } ) ;
317
+ tx . addOutputs ( { quantity : 2 , recipient, assetType, shardId } ) ;
313
318
await node . signTransactionInput ( tx , 0 ) ;
314
319
await node . signTransactionInput ( tx , 1 ) ;
315
320
await node . sendAssetTransaction ( tx , { awaitInvoice : false } ) ;
@@ -330,7 +335,7 @@ describe("Timelock", function() {
330
335
331
336
it ( "2 inputs [Time(0), Block(4)] => Block(4)" , async function ( ) {
332
337
const assets = await createUTXOs ( 2 ) ;
333
- const { assetType } = assets [ 0 ] ;
338
+ const { assetType, shardId } = assets [ 0 ] ;
334
339
const tx = node . sdk . core . createTransferAssetTransaction ( ) ;
335
340
tx . addInputs ( [
336
341
assets [ 0 ] . createTransferInput ( {
@@ -346,7 +351,7 @@ describe("Timelock", function() {
346
351
}
347
352
} )
348
353
] ) ;
349
- tx . addOutputs ( { quantity : 2 , recipient, assetType } ) ;
354
+ tx . addOutputs ( { quantity : 2 , recipient, assetType, shardId } ) ;
350
355
await node . signTransactionInput ( tx , 0 ) ;
351
356
await node . signTransactionInput ( tx , 1 ) ;
352
357
await node . sendAssetTransaction ( tx , { awaitInvoice : false } ) ;
@@ -362,7 +367,7 @@ describe("Timelock", function() {
362
367
363
368
it ( "2 inputs [Time(now + 3 seconds), Block(4)] => Time(..)" , async function ( ) {
364
369
const assets = await createUTXOs ( 2 ) ;
365
- const { assetType } = assets [ 0 ] ;
370
+ const { assetType, shardId } = assets [ 0 ] ;
366
371
const tx = node . sdk . core . createTransferAssetTransaction ( ) ;
367
372
tx . addInputs ( [
368
373
assets [ 0 ] . createTransferInput ( {
@@ -378,7 +383,7 @@ describe("Timelock", function() {
378
383
}
379
384
} )
380
385
] ) ;
381
- tx . addOutputs ( { quantity : 2 , recipient, assetType } ) ;
386
+ tx . addOutputs ( { quantity : 2 , recipient, assetType, shardId } ) ;
382
387
await node . signTransactionInput ( tx , 0 ) ;
383
388
await node . signTransactionInput ( tx , 1 ) ;
384
389
await node . sendAssetTransaction ( tx , { awaitInvoice : false } ) ;
0 commit comments