mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-03-12 02:08:32 +01:00
* Renamed "WithdrawAsync" to "WithdrawToStoreWalletAsync" * WIP * WIP withdrawal + Refactored Form saving to JObject * WIP * Form to fix bad values during withdrawing appears correctly * WIP * Lots of cleanup and refactoring + Password field and toggle password view * Cleanup + Finishing touches on withdrawals * Added "Destination" dummy text as this is always the destination. * Fixed broken test * Added support for withdrawing using qty as a percentage if it ends with "%". Needs more testing. * Fixed broken build * Fixed broken build (2) * Update BTCPayServer/wwwroot/swagger/v1/swagger.template.custodians.json Co-authored-by: d11n <mail@dennisreimann.de> * Update BTCPayServer/wwwroot/swagger/v1/swagger.template.custodians.json Co-authored-by: d11n <mail@dennisreimann.de> * Improved unit tests * Fixed swagger bug * Test improvements Make string conversion of quantity explicitely. * Fix build warnings * Swagger: Add missing operationId * Made change Dennis requested * Removed unused file * Removed incorrect comment * Extra contructor * Renamed client methods * Cleanup config before saving * Fixed broken controller * Refactor custodian * Fix build * Make decimal fields strings to match the rest of Greenfield * Improve parsing of % quantities --------- Co-authored-by: d11n <mail@dennisreimann.de> Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
40 lines
1.1 KiB
C#
40 lines
1.1 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using Newtonsoft.Json;
|
|
using Newtonsoft.Json.Converters;
|
|
|
|
namespace BTCPayServer.Client.Models;
|
|
|
|
public class WithdrawalResponseData : WithdrawalBaseResponseData
|
|
{
|
|
|
|
[JsonConverter(typeof(StringEnumConverter))]
|
|
public WithdrawalStatus Status { get; }
|
|
|
|
public string WithdrawalId { get; }
|
|
public DateTimeOffset CreatedTime { get; }
|
|
|
|
public string TransactionId { get; }
|
|
|
|
public string TargetAddress { get; }
|
|
|
|
public WithdrawalResponseData(string paymentMethod, string asset, List<LedgerEntryData> ledgerEntries, string withdrawalId, string accountId,
|
|
string custodianCode, WithdrawalStatus status, DateTimeOffset createdTime, string targetAddress, string transactionId) : base(paymentMethod, asset, ledgerEntries, accountId,
|
|
custodianCode)
|
|
{
|
|
WithdrawalId = withdrawalId;
|
|
TargetAddress = targetAddress;
|
|
TransactionId = transactionId;
|
|
Status = status;
|
|
CreatedTime = createdTime;
|
|
}
|
|
|
|
|
|
public enum WithdrawalStatus
|
|
{
|
|
Unknown = 0,
|
|
Queued = 1,
|
|
Complete = 2,
|
|
Failed = 3
|
|
}
|
|
}
|