Skip to content

Commit

Permalink
feat: add smart contract address on CoinInfo (#62)
Browse files Browse the repository at this point in the history
  • Loading branch information
monsieurleberre authored and joancaron committed Jan 7, 2020
1 parent 00ef07f commit e8e2cf4
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/CryptoCompare/Models/Responses/CoinInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,11 @@ public class CoinInfo
/// Gets or sets the symbol.
/// </summary>
public string Symbol { get; set; }

/// <summary>
/// Gets or sets the smart contract address.
/// </summary>
public string SmartContractAddress { get; set; }

/// <summary>
/// Gets or sets the total number of freed coins.
Expand Down
12 changes: 11 additions & 1 deletion test/Cryptocompare.Integration.Tests/Clients/CoinsClientTests.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System.Threading.Tasks;
using System.Linq;
using System.Threading.Tasks;

using CryptoCompare;

Expand All @@ -15,6 +16,15 @@ public async Task CanCallListEndpoint()
Assert.NotNull(result);
}

[Fact]
public async Task CanCallListEndpointAndRetrieveSmartContractAddresses()
{
var result = await CryptoCompareClient.Instance.Coins.ListAsync();
Assert.NotNull(result);
var foundSmartContractTokens = result.Coins.Any(c => c.Value.SmartContractAddress.StartsWith("0x"));
Assert.True(foundSmartContractTokens);
}

[Fact]
public async Task CanCallSnapshotEndpoint()
{
Expand Down

0 comments on commit e8e2cf4

Please sign in to comment.