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
var model = new WalletBuildTransactionModel
{
Hex = transactionResult.hex,
Fee = transactionResult.fee
Fee = transactionResult.fee,
TransactionId = transactionResult.transactionId
};
return this.Json(model);
}
......
......@@ -135,7 +135,7 @@ namespace Breeze.Wallet
/// <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>
/// <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>
/// Sends a transaction to the network.
......
......@@ -13,6 +13,9 @@ namespace Breeze.Wallet.Models
public Money Fee { get; set; }
[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
}
/// <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)
{
......@@ -388,7 +388,7 @@ namespace Breeze.Wallet
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>
......
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