mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-01-18 21:32:27 +01:00
Better event messages
This commit is contained in:
parent
95f859b6db
commit
c8e1db2102
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user