@@ -20,6 +20,7 @@ import { CreateTransactionFromPayload } from '../../../src/infrastructure/transa
2020import { Account } from '../../../src/model/account/Account' ;
2121import { Address } from '../../../src/model/account/Address' ;
2222import { NetworkType } from '../../../src/model/blockchain/NetworkType' ;
23+ import { MessageMarker } from '../../../src/model/message/MessageMarker' ;
2324import { MessageType } from '../../../src/model/message/MessageType' ;
2425import { PersistentHarvestingDelegationMessage } from '../../../src/model/message/PersistentHarvestingDelegationMessage' ;
2526import { PlainMessage } from '../../../src/model/message/PlainMessage' ;
@@ -40,7 +41,7 @@ describe('TransferTransaction', () => {
4041 const generationHash = '57F7DA205008026C776CB6AED843393F04CD458E0AA2D9F1D5F31A402072B2D6' ;
4142 const delegatedPrivateKey = '8A78C9E9B0E59D0F74C0D47AB29FBD523C706293A3FA9CD9FE0EEB2C10EA924A' ;
4243 const recipientPublicKey = '9DBF67474D6E1F8B131B4EB1F5BA0595AFFAE1123607BC1048F342193D7E669F' ;
43- const messageMarker = 'FECC71C764BFE598' ;
44+ const messageMarker = MessageMarker . PersistentDelegationUnlock ;
4445 let statement : Statement ;
4546 const unresolvedAddress = new NamespaceId ( 'address' ) ;
4647 const unresolvedMosaicId = new NamespaceId ( 'mosaic' ) ;
@@ -252,7 +253,7 @@ describe('TransferTransaction', () => {
252253 Address . createFromRawAddress ( 'SBILTA367K2LX2FEXG5TFWAS7GEFYAGY7QLFBYKC' ) ,
253254 [ ] ,
254255 PersistentHarvestingDelegationMessage
255- . create ( delegatedPrivateKey , account . privateKey , recipientPublicKey , NetworkType . MIJIN_TEST ) ,
256+ . create ( delegatedPrivateKey , recipientPublicKey , NetworkType . MIJIN_TEST ) ,
256257 NetworkType . MIJIN_TEST ,
257258 ) ;
258259
@@ -265,11 +266,10 @@ describe('TransferTransaction', () => {
265266 Address . createFromRawAddress ( 'SBILTA367K2LX2FEXG5TFWAS7GEFYAGY7QLFBYKC' ) ,
266267 [ ] ,
267268 PersistentHarvestingDelegationMessage
268- . create ( delegatedPrivateKey , account . privateKey , recipientPublicKey , NetworkType . MIJIN_TEST ) ,
269+ . create ( delegatedPrivateKey , recipientPublicKey , NetworkType . MIJIN_TEST ) ,
269270 NetworkType . MIJIN_TEST ,
270271 ) ;
271-
272- expect ( transferTransaction . message . payload . length ) . to . be . equal ( 192 + messageMarker . length ) ;
272+ expect ( transferTransaction . message . payload . length ) . to . be . equal ( 192 + messageMarker . length + 64 ) ;
273273 expect ( transferTransaction . message . payload . includes ( messageMarker ) ) . to . be . true ;
274274 expect ( transferTransaction . mosaics . length ) . to . be . equal ( 0 ) ;
275275 expect ( transferTransaction . recipientAddress ) . to . be . instanceof ( Address ) ;
@@ -291,7 +291,7 @@ describe('TransferTransaction', () => {
291291 Address . createFromRawAddress ( 'SBILTA367K2LX2FEXG5TFWAS7GEFYAGY7QLFBYKC' ) ,
292292 [ NetworkCurrencyMosaic . createRelative ( 100 ) ] ,
293293 PersistentHarvestingDelegationMessage
294- . create ( delegatedPrivateKey , account . privateKey , recipientPublicKey , NetworkType . MIJIN_TEST ) ,
294+ . create ( delegatedPrivateKey , recipientPublicKey , NetworkType . MIJIN_TEST ) ,
295295 NetworkType . MIJIN_TEST ,
296296 ) ;
297297 } ) . to . throw ( Error , 'PersistentDelegationRequestTransaction should be created without Mosaic' ) ;
@@ -303,7 +303,7 @@ describe('TransferTransaction', () => {
303303 Deadline . create ( ) ,
304304 Address . createFromRawAddress ( 'SBILTA367K2LX2FEXG5TFWAS7GEFYAGY7QLFBYKC' ) ,
305305 [ NetworkCurrencyMosaic . createRelative ( 100 ) ] ,
306- PersistentHarvestingDelegationMessage . create ( 'abc' , account . privateKey , recipientPublicKey , NetworkType . MIJIN_TEST ) ,
306+ PersistentHarvestingDelegationMessage . create ( 'abc' , recipientPublicKey , NetworkType . MIJIN_TEST ) ,
307307 NetworkType . MIJIN_TEST ,
308308 ) ;
309309 } ) . to . throw ( ) ;
@@ -315,7 +315,7 @@ describe('TransferTransaction', () => {
315315 Deadline . create ( ) ,
316316 Address . createFromRawAddress ( 'SBILTA367K2LX2FEXG5TFWAS7GEFYAGY7QLFBYKC' ) ,
317317 [ NetworkCurrencyMosaic . createRelative ( 100 ) ] ,
318- PersistentHarvestingDelegationMessage . create ( delegatedPrivateKey , 'abc' , recipientPublicKey , NetworkType . MIJIN_TEST ) ,
318+ PersistentHarvestingDelegationMessage . create ( delegatedPrivateKey , recipientPublicKey , NetworkType . MIJIN_TEST ) ,
319319 NetworkType . MIJIN_TEST ,
320320 ) ;
321321 } ) . to . throw ( ) ;
0 commit comments