Added NBitcoin & more
This commit is contained in:
@@ -63,6 +63,14 @@
|
||||
<HintPath>..\External Libraries\mono.posix.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="MySql.Data, Version=6.2.2.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d, processorArchitecture=MSIL" />
|
||||
<Reference Include="NBitcoin, Version=2.1.4.7, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\NBitcoin.2.1.4.7\lib\net45\NBitcoin.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="NBitcoin.BouncyCastle, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\NBitcoin.2.1.4.7\lib\net45\NBitcoin.BouncyCastle.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.6.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
|
||||
@@ -49,6 +49,14 @@
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="NBitcoin, Version=2.1.4.7, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\NBitcoin.2.1.4.7\lib\net45\NBitcoin.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="NBitcoin.BouncyCastle, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\NBitcoin.2.1.4.7\lib\net45\NBitcoin.BouncyCastle.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.6.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
|
||||
@@ -324,6 +324,21 @@ namespace Swarmops.Common.Enums
|
||||
/// <summary>
|
||||
/// If bitcoin is preferred instead of banking details
|
||||
/// </summary>
|
||||
BitcoinPayoutAddress
|
||||
BitcoinPayoutAddress,
|
||||
|
||||
/// <summary>
|
||||
/// If there's a hotwallet, its private root key (encrypted with file and db keys)
|
||||
/// </summary>
|
||||
BudgetBitcoinPrivateRoot,
|
||||
|
||||
/// <summary>
|
||||
/// If there's another wallet, its public root key (encrypted with db key)
|
||||
/// </summary>
|
||||
BudgetBitcoinPublicRoot,
|
||||
|
||||
/// <summary>
|
||||
/// For cold wallets, we may prefer listing the public addresses directly
|
||||
/// </summary>
|
||||
BudgetBitcoinPublicAddress
|
||||
}
|
||||
}
|
||||
@@ -56,6 +56,14 @@
|
||||
<StartupObject>Swarmops.BotConsole</StartupObject>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="NBitcoin, Version=2.1.4.7, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\NBitcoin.2.1.4.7\lib\net45\NBitcoin.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="NBitcoin.BouncyCastle, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\NBitcoin.2.1.4.7\lib\net45\NBitcoin.BouncyCastle.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.6.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
|
||||
@@ -269,7 +269,10 @@ namespace Swarmops.Logic.Financial
|
||||
salary.PayoutDate.ToString ("yyyy-MMM", CultureInfo.InvariantCulture));
|
||||
transaction.AddRow (payrollItem.Budget, salary.CostTotalCents, null);
|
||||
transaction.AddRow (payrollItem.Organization.FinancialAccounts.DebtsSalary, -salary.NetSalaryCents, null);
|
||||
transaction.AddRow (payrollItem.Organization.FinancialAccounts.DebtsTax, -salary.TaxTotalCents, null);
|
||||
if (salary.TaxTotalCents != 0)
|
||||
{
|
||||
transaction.AddRow (payrollItem.Organization.FinancialAccounts.DebtsTax, -salary.TaxTotalCents, null);
|
||||
}
|
||||
transaction.Dependency = salary;
|
||||
|
||||
// Finally, check if net and/or tax are zero, and if so, mark them as already-paid (i.e. not due for payment)
|
||||
|
||||
+7
-3
@@ -64,9 +64,13 @@
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\External Libraries\MySql.Data.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="NBitcoin, Version=1.0.5.20, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\External Dependencies\bin\NBitcoin.dll</HintPath>
|
||||
<Reference Include="NBitcoin, Version=2.1.4.7, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\NBitcoin.2.1.4.7\lib\net45\NBitcoin.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="NBitcoin.BouncyCastle, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\NBitcoin.2.1.4.7\lib\net45\NBitcoin.BouncyCastle.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.6.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
|
||||
@@ -32,6 +32,14 @@
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="NBitcoin, Version=2.1.4.7, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\NBitcoin.2.1.4.7\lib\net45\NBitcoin.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="NBitcoin.BouncyCastle, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\NBitcoin.2.1.4.7\lib\net45\NBitcoin.BouncyCastle.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.6.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
|
||||
@@ -51,6 +51,14 @@
|
||||
<ItemGroup>
|
||||
<Reference Include="adodb, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<Reference Include="MySql.Data, Version=6.2.2.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d, processorArchitecture=MSIL" />
|
||||
<Reference Include="NBitcoin, Version=2.1.4.7, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\NBitcoin.2.1.4.7\lib\net45\NBitcoin.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="NBitcoin.BouncyCastle, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\NBitcoin.2.1.4.7\lib\net45\NBitcoin.BouncyCastle.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.6.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
|
||||
Reference in New Issue
Block a user