Merge pull request #1768 from sotblad/MonetaryUnit

Add MonetaryUnit (MUE) support
This commit is contained in:
Nicolas Dorier 2020-09-30 18:33:41 +09:00 committed by GitHub
commit 40bfc9b368
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 40 additions and 3 deletions

View File

@ -0,0 +1,29 @@
using NBitcoin;
using NBXplorer;
namespace BTCPayServer
{
public partial class BTCPayNetworkProvider
{
public void InitMonetaryUnit()
{
var nbxplorerNetwork = NBXplorerNetworkProvider.GetFromCryptoCode("MUE");
Add(new BTCPayNetwork()
{
CryptoCode = nbxplorerNetwork.CryptoCode,
DisplayName = "MonetaryUnit",
BlockExplorerLink = NetworkType == NetworkType.Mainnet ? "https://explorer.monetaryunit.org/#/MUE/mainnet/tx/{0}" : "https://explorer.monetaryunit.org/#/MUE/mainnet/tx/{0}",
NBXplorerNetwork = nbxplorerNetwork,
UriScheme = "monetaryunit",
DefaultRateRules = new[]
{
"MUE_X = MUE_BTC * BTC_X",
"MUE_BTC = bittrex(MUE_BTC)"
},
CryptoImagePath = "imlegacy/monetaryunit.png",
DefaultSettings = BTCPayDefaultSettings.GetDefaultSettings(NetworkType),
CoinType = NetworkType == NetworkType.Mainnet ? new KeyPath("31'") : new KeyPath("1'")
});
}
}
}

View File

@ -58,6 +58,7 @@ namespace BTCPayServer
InitPolis();
InitChaincoin();
// InitArgoneum();//their rate source is down 9/15/20.
InitMonetaryUnit();
InitEthereum();
InitERC20();
@ -132,4 +133,4 @@ namespace BTCPayServer
return network as T;
}
}
}
}

View File

@ -4,9 +4,9 @@
<ItemGroup>
<FrameworkReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="NBXplorer.Client" Version="3.0.17" />
<PackageReference Include="NBXplorer.Client" Version="3.0.18" />
</ItemGroup>
<ItemGroup Condition="'$(Altcoins)' != 'true'">
<Compile Remove="Altcoins\**\*.cs"></Compile>
</ItemGroup>
</Project>
</Project>

View File

@ -1280,6 +1280,13 @@
"symbol":null,
"crypto":true
},
{
"name":"MonetaryUnit",
"code":"MUE",
"divisibility":8,
"symbol":null,
"crypto":true
},
{
"name":"Satoshis",
"code":"SATS",

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB