Commit 4a8ef7cb authored by Jeremy Bokobza's avatar Jeremy Bokobza

Added transactionId to the "build transaction" return message

parent a17b5dd1
...@@ -280,7 +280,8 @@ namespace Breeze.Wallet.Controllers ...@@ -280,7 +280,8 @@ namespace Breeze.Wallet.Controllers
var model = new WalletBuildTransactionModel var model = new WalletBuildTransactionModel
{ {
Hex = transactionResult.hex, Hex = transactionResult.hex,
Fee = transactionResult.fee Fee = transactionResult.fee,
TransactionId = transactionResult.transactionId
}; };
return this.Json(model); return this.Json(model);
} }
......
...@@ -135,7 +135,7 @@ namespace Breeze.Wallet ...@@ -135,7 +135,7 @@ namespace Breeze.Wallet
/// <param name="feeType">The type of fee to be included.</param> /// <param name="feeType">The type of fee to be included.</param>
/// <param name="allowUnconfirmed">Whether or not we allow this transaction to rely on unconfirmed outputs.</param> /// <param name="allowUnconfirmed">Whether or not we allow this transaction to rely on unconfirmed outputs.</param>
/// <returns></returns> /// <returns></returns>
(string hex, Money fee) BuildTransaction(string walletName, string accountName, CoinType coinType, string password, string destinationAddress, Money amount, string feeType, bool allowUnconfirmed); (string hex, uint256 transactionId, Money fee) BuildTransaction(string walletName, string accountName, CoinType coinType, string password, string destinationAddress, Money amount, string feeType, bool allowUnconfirmed);
/// <summary> /// <summary>
/// Sends a transaction to the network. /// Sends a transaction to the network.
......
...@@ -14,5 +14,8 @@ namespace Breeze.Wallet.Models ...@@ -14,5 +14,8 @@ namespace Breeze.Wallet.Models
[JsonProperty(PropertyName = "hex")] [JsonProperty(PropertyName = "hex")]
public string Hex { get; set; } public string Hex { get; set; }
[JsonProperty(PropertyName = "transactionId")]
public uint256 TransactionId { get; set; }
} }
} }
...@@ -325,7 +325,7 @@ namespace Breeze.Wallet ...@@ -325,7 +325,7 @@ namespace Breeze.Wallet
} }
/// <inheritdoc /> /// <inheritdoc />
public (string hex, Money fee) BuildTransaction(string walletName, string accountName, CoinType coinType, string password, string destinationAddress, Money amount, string feeType, bool allowUnconfirmed) public (string hex, uint256 transactionId, Money fee) BuildTransaction(string walletName, string accountName, CoinType coinType, string password, string destinationAddress, Money amount, string feeType, bool allowUnconfirmed)
{ {
if (amount == Money.Zero) if (amount == Money.Zero)
{ {
...@@ -388,7 +388,7 @@ namespace Breeze.Wallet ...@@ -388,7 +388,7 @@ namespace Breeze.Wallet
throw new Exception("Could not build transaction, please make sure you entered the correct data."); throw new Exception("Could not build transaction, please make sure you entered the correct data.");
} }
return (tx.ToHex(), calculationResult.fee); return (tx.ToHex(), tx.GetHash(), calculationResult.fee);
} }
/// <summary> /// <summary>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment