mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2026-02-18 04:34:21 +01:00
Better event messages
This commit is contained in:
@@ -6,5 +6,11 @@ namespace BTCPayServer.Events
|
||||
{
|
||||
public NewTransactionEvent NewTransactionEvent { get; set; }
|
||||
public string CryptoCode { get; set; }
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
var state = NewTransactionEvent.BlockId == null ? "Unconfirmed" : "Confirmed";
|
||||
return $"{CryptoCode}: New transaction {NewTransactionEvent.TransactionData.TransactionHash} ({state})";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -346,7 +346,7 @@ namespace BTCPayServer.Payments.Bitcoin
|
||||
var address = await wallet.ReserveAddressAsync(strategy);
|
||||
btc.DepositAddress = address.Address.ToString();
|
||||
await _InvoiceRepository.NewAddress(invoice.Id, btc, wallet.Network);
|
||||
_Aggregator.Publish(new InvoiceNewAddressEvent(invoice.Id, address.ToString(), wallet.Network));
|
||||
_Aggregator.Publish(new InvoiceNewAddressEvent(invoice.Id, btc.DepositAddress, wallet.Network));
|
||||
paymentMethod.SetPaymentMethodDetails(btc);
|
||||
invoice.SetPaymentMethod(paymentMethod);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user