@@ -163,10 +163,11 @@ describe('Eth Transaction builder flush tokens', function () {
163163 forwarderVersion : 4 ,
164164 } ) ;
165165 const txBuiderFromRaw : any = getBuilder ( 'teth' ) ;
166- txBuiderFromRaw . fromImplementation ( tx . toBroadcastFormat ( ) ) ;
167- // txBuiderFromRaw.type.should.equal(TransactionType.FlushTokens);
168- txBuiderFromRaw . _forwarderAddress . should . equal ( '0x53b8e91bb3b8f618b5f01004ef108f134f219573' ) ;
169- txBuiderFromRaw . _tokenAddress . should . equal ( '0xbcf935d206ca32929e1b887a07ed240f0d8ccd22' ) ;
166+ txBuiderFromRaw . from ( tx . toBroadcastFormat ( ) ) ;
167+ const result = await txBuiderFromRaw . build ( ) ;
168+ const txJson = result . toJson ( ) ;
169+ txJson . to . should . equal ( '0x53b8e91bb3b8f618b5f01004ef108f134f219573' ) ;
170+ txJson . data . should . containEql ( 'bcf935d206ca32929e1b887a07ed240f0d8ccd22' ) ;
170171 } ) ;
171172
172173 it ( 'decode wallet flush forwarder transaction with forwarder Version < 4' , async ( ) => {
@@ -182,10 +183,12 @@ describe('Eth Transaction builder flush tokens', function () {
182183 forwarderVersion : 2 ,
183184 } ) ;
184185 const txBuiderFromRaw : any = getBuilder ( 'teth' ) ;
185- txBuiderFromRaw . fromImplementation ( tx . toBroadcastFormat ( ) ) ;
186- // txBuiderFromRaw.type.should.equal(TransactionType.FlushTokens);
187- txBuiderFromRaw . _forwarderAddress . should . equal ( '0x53b8e91bb3b8f618b5f01004ef108f134f219573' ) ;
188- txBuiderFromRaw . _tokenAddress . should . equal ( '0xbcf935d206ca32929e1b887a07ed240f0d8ccd22' ) ;
186+ txBuiderFromRaw . from ( tx . toBroadcastFormat ( ) ) ;
187+ const result = await txBuiderFromRaw . build ( ) ;
188+ const txJson = result . toJson ( ) ;
189+ txJson . to . should . equal ( '0x8f977e912ef500548a0c3be6ddde9899f1199b81' ) ;
190+ txJson . data . should . containEql ( 'bcf935d206ca32929e1b887a07ed240f0d8ccd22' ) ;
191+ txJson . data . should . containEql ( '53b8e91bb3b8f618b5f01004ef108f134f219573' ) ;
189192 } ) ;
190193
191194 it ( 'an unsigned flush transaction from serialized' , async ( ) => {
0 commit comments