Hathor.Faucet.Services/WalletTransactionService.cs
/// <summary>
/// Save Hathor TX ID in DB
/// </summary>
/// <param name="id"></param>
/// <param name="txId"></param>
/// <param name="isSuccess"></param>
/// <param name="error"></param>
/// <returns></returns>
Save Hathor TX ID in DB
Save Hathor TX ID in DB
public async Task SetHathorTxFinishedAsync(Guid id, string? txId, bool isSuccess, string? error)
        {
            WalletTransaction? tx = await GetTransactionAsync(id);
            if (tx == null)
            {
                throw new Exception($"DB Transaction with id: {id} not found.");
            }
            tx.HathorTransactionId = txId;
            tx.TransactionDateTime = DateTimeOffset.UtcNow;
            tx.IsSuccess = isSuccess;
            tx.Error = error;
            await dbContext.SaveChangesAsync();
        }
public async Task SetHathorTxFinishedAsync ( Guid id , string ? txId , bool isSuccess , string ? error ) { WalletTransaction ? tx = await GetTransactionAsync ( id ) ; if ( tx == null ) { throw new Exception ( $" DB Transaction with id:  { id }  not found. " ) ; } tx . HathorTransactionId = txId ; tx . TransactionDateTime = DateTimeOffset . UtcNow ; tx . IsSuccess = isSuccess ; tx . Error = error ; await dbContext . SaveChangesAsync ( ) ; }
Save Hathor TX ID in DB
Save Hathor TX ID in DB
None
id
Guid
None
txId
string?
None
isSuccess
bool
None
error
string?
None