File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -198,6 +198,33 @@ describe("WrapCCC", function() {
198198 ) . to . be . rejected ;
199199 } ) . timeout ( 30_000 ) ;
200200
201+ it ( "WCCC tracker should return the corresponding transaction" , async function ( ) {
202+ const wrapCCC = node . sdk . core . createWrapCCCTransaction ( {
203+ shardId : 0 ,
204+ recipient : await node . createP2PKHBurnAddress ( ) ,
205+ quantity : 30 ,
206+ payer : PlatformAddress . fromAccountId ( faucetAccointId , {
207+ networkId : "tc"
208+ } )
209+ } ) ;
210+ const seq = ( await node . sdk . rpc . chain . getSeq ( faucetAddress ) ) ! ;
211+ expect ( seq ) . not . to . be . null ;
212+ const signedWrapCCC = wrapCCC . sign ( {
213+ secret : faucetSecret ,
214+ seq,
215+ fee : 10
216+ } ) ;
217+
218+ const hash = await node . sdk . rpc . chain . sendSignedTransaction (
219+ signedWrapCCC
220+ ) ;
221+ const tracker = wrapCCC . tracker ( ) ;
222+
223+ expect ( await node . sdk . rpc . chain . containsTransaction ( hash ) ) . be . true ;
224+ expect ( await node . sdk . rpc . chain . getTransactionByTracker ( tracker ) ) . not
225+ . null ;
226+ } ) ;
227+
201228 afterEach ( async function ( ) {
202229 await node . clean ( ) ;
203230 } ) ;
You can’t perform that action at this time.
0 commit comments