File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -313,8 +313,8 @@ var messageHash = WalletV5R1Utils.NormalizeHash(externalMsg).ToHex();
313313var boc = Convert .ToBase64String (Builder .BeginCell ().StoreMessage (externalMsg ).EndCell ().ToBoc ());
314314
315315// Emulate before sending (optional)
316- var consequences = await client . Wallet .EmulateAsync (boc );
317- Console .WriteLine ($" Estimated fee: {consequences .Event . Fee . Total }" );
316+ var consequences = await Client . Traces .EmulateAsync (bocAsString );
317+ Console .WriteLine ($" Estimated fee: {consequences .GetTotalFees () }" );
318318
319319// Send transaction
320320await client .Blockchain .SendBocAsync (boc : boc );
Original file line number Diff line number Diff line change @@ -313,8 +313,8 @@ var messageHash = WalletV5R1Utils.NormalizeHash(externalMsg).ToHex();
313313var boc = Convert .ToBase64String (Builder .BeginCell ().StoreMessage (externalMsg ).EndCell ().ToBoc ());
314314
315315// Emulate before sending (optional)
316- var consequences = await client . Wallet .EmulateAsync (boc );
317- Console .WriteLine ($" Estimated fee: {consequences .Event . Fee . Total }" );
316+ var consequences = await Client . Traces .EmulateAsync (bocAsString );
317+ Console .WriteLine ($" Estimated fee: {consequences .GetTotalFees () }" );
318318
319319// Send transaction
320320await client .Blockchain .SendBocAsync (boc : boc );
Original file line number Diff line number Diff line change @@ -393,6 +393,10 @@ public async Task TransferTests()
393393 . EndCell ( ) ;
394394 byte [ ] boc = messageCell . ToBoc ( ) ;
395395 var bocAsString = Convert . ToBase64String ( boc ) ;
396+ var consequences = await Client . Traces . EmulateAsync ( bocAsString ) ;
397+ Assert . True ( ! consequences . HasUnsuccessfulTransactions ( ) , "Emulated transaction should be successful" ) ;
398+ Assert . True ( consequences . GetTotalFees ( ) > 0 , "Emulated transaction should have fees" ) ;
399+
396400 // await Client.LiteServer.SendMessageAsync(Convert.ToBase64String(boc));
397401 await Client . Blockchain . SendBocAsync ( bocAsString ) ;
398402 try
You can’t perform that action at this time.
0 commit comments