Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions csharp/src/Infrastructure/Quote/QuoteService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@ await CalculateTotalFeeAsync(route, amount, rewardAmountInDestNative: rewardAmou
TotalServiceFee = totalServiceFee,
TotalExpenseFee = totalExpenseFee,
TotalRewardFee = totalRewardFee,
Rate = swapRate.Truncate(6),
SourceSolverAddress = route.SourceWallet.Address,
DestinationSolverAddress = route.DestinationWallet.Address,
Route = route,
Expand Down
6 changes: 4 additions & 2 deletions csharp/src/Shared.Models/Models/QuoteDto.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@ namespace Train.Solver.Shared.Models;

public class QuoteDto
{
public BigInteger TotalFee { get; set; }
public BigInteger TotalFee { get; set; }

public BigInteger TotalServiceFee { get; set; }
public BigInteger TotalServiceFee { get; set; }

public BigInteger TotalExpenseFee { get; set; }

public BigInteger TotalRewardFee { get; set; }

public BigInteger ReceiveAmount { get; set; }

public decimal Rate { get; set; }
}
1 change: 1 addition & 0 deletions csharp/src/Shared.Proto/SolverProtoMapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ public static class SolverProtoMapper
TotalExpenseFee = quote.TotalExpenseFee.ToString(),
TotalRewardFee = quote.TotalRewardFee.ToString(),
Amount = quote.Amount.ToString(),
Rate = quote.Rate.ToString(System.Globalization.CultureInfo.InvariantCulture),
};

#endregion
Expand Down
1 change: 1 addition & 0 deletions protos/solver.proto
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ message GetQuoteResponse {
string total_expense_fee = 11; // BigInteger as string (source token units)
string total_reward_fee = 12; // BigInteger as string (source token units)
string amount = 13; // BigInteger as string (source amount — useful for reverse quotes)
string rate = 14; // decimal as invariant string — dest/source conversion rate, truncated to 6 decimals
}

message RewardInfo {
Expand Down
Loading