Skip to content
This repository has been archived by the owner on May 24, 2024. It is now read-only.

Commit

Permalink
Update operations to use IAccountId
Browse files Browse the repository at this point in the history
  • Loading branch information
fracek committed Apr 29, 2020
1 parent 1958f2b commit db8735c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions stellar-dotnet-sdk/InflationOperation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace stellar_dotnet_sdk
{
/// <summary>
/// Use <see cref="Builder"/> to create a new InflationOperation.
///
///
/// See also: <see href="https://www.stellar.org/developers/guides/concepts/list-of-operations.html#inflation">Inflation</see>
/// </summary>
public class InflationOperation : Operation
Expand All @@ -22,14 +22,14 @@ public override xdr.Operation.OperationBody ToOperationBody()

public class Builder
{
private KeyPair mSourceAccount;
private IAccountId mSourceAccount;

/// <summary>
/// Sets the source account for this operation.
/// </summary>
/// <param name="sourceAccount">The operation's source account.</param>
/// <returns>Builder object so you can chain methods.</returns>
public Builder SetSourceAccount(KeyPair sourceAccount)
public Builder SetSourceAccount(IAccountId sourceAccount)
{
mSourceAccount = sourceAccount ?? throw new ArgumentNullException(nameof(sourceAccount), "sourceAccount cannot be null");
return this;
Expand Down
4 changes: 2 additions & 2 deletions stellar-dotnet-sdk/PathPaymentStrictReceiveOperation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public Builder(sdkxdr.PathPaymentStrictReceiveOp op)
/// <param name="destAsset"> The asset the destination account receives.</param>
/// <param name="destAmount"> The amount of destination asset the destination account receives.</param>
/// <exception cref="ArithmeticException"> When sendMax or destAmount has more than 7 decimal places.</exception>
public Builder(Asset sendAsset, string sendMax, KeyPair destination, Asset destAsset, string destAmount)
public Builder(Asset sendAsset, string sendMax, IAccountId destination, Asset destAsset, string destAmount)
{
_SendAsset = sendAsset ?? throw new ArgumentNullException(nameof(sendAsset), "sendAsset cannot be null");
_SendMax = sendMax ?? throw new ArgumentNullException(nameof(sendMax), "sendMax cannot be null");
Expand Down Expand Up @@ -143,7 +143,7 @@ public Builder SetPath(Asset[] path)
/// </summary>
/// <param name="sourceAccount"> The operation's source account.</param>
/// <returns>Builder object so you can chain methods.</returns>
public Builder SetSourceAccount(KeyPair sourceAccount)
public Builder SetSourceAccount(IAccountId sourceAccount)
{
_SourceAccount = sourceAccount ?? throw new ArgumentNullException(nameof(sourceAccount), "sourceAccount cannot be null");
return this;
Expand Down
4 changes: 2 additions & 2 deletions stellar-dotnet-sdk/PathPaymentStrictSendOperation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public Builder(sdkxdr.PathPaymentStrictSendOp op)
/// <param name="destAsset"> The asset the destination account receives.</param>
/// <param name="destMin"> The amount of destination asset the destination account receives.</param>
/// <exception cref="ArithmeticException"> When sendAmount or destMin has more than 7 decimal places.</exception>
public Builder(Asset sendAsset, string sendAmount, KeyPair destination, Asset destAsset, string destMin)
public Builder(Asset sendAsset, string sendAmount, IAccountId destination, Asset destAsset, string destMin)
{
_SendAsset = sendAsset ?? throw new ArgumentNullException(nameof(sendAsset), "sendAsset cannot be null");
_SendAmount = sendAmount ?? throw new ArgumentNullException(nameof(sendAmount), "sendAmount cannot be null");
Expand Down Expand Up @@ -144,7 +144,7 @@ public Builder SetPath(Asset[] path)
/// </summary>
/// <param name="sourceAccount"> The operation's source account.</param>
/// <returns>Builder object so you can chain methods.</returns>
public Builder SetSourceAccount(KeyPair sourceAccount)
public Builder SetSourceAccount(IAccountId sourceAccount)
{
_SourceAccount = sourceAccount ?? throw new ArgumentNullException(nameof(sourceAccount), "sourceAccount cannot be null");
return this;
Expand Down

0 comments on commit db8735c

Please sign in to comment.