btcpay-plugin/BTCPayServer.Plugins.UnitTests/Zano/RPC/ZanoEventTests.cs
ravaga 595d88ceaa
Adapt BTCPay Server plugin for Zano cryptocurrency
Fork of btcpayserver-monero-plugin, fully adapted for Zano's RPC API.

Key changes from the Monero plugin:
- Integrated addresses with payment_id (replaces Monero subaddresses)
- Payment detection via get_bulk_payments polling every 15s
  (Zano has no block-notify/tx-notify callbacks)
- Daemon RPC: getinfo with flags (replaces Monero's get_info)
- Wallet RPC: get_wallet_info for height (replaces getheight)
- Fixed 0.01 ZANO network fee (no dynamic fee estimation)
- Rate source: CoinGecko (ZANO_BTC)
- Simplified store UI: no account management, no RPC wallet creation

Removed Monero-specific features:
- Subaddress/account system (CreateAddress, GetAccounts, etc.)
- Block/tx notification callback controller
- View-only wallet creation via RPC (generate_from_keys)
- HTTP Basic auth on RPC client
- Dynamic fee estimation

Added:
- Zano RPC models (MakeIntegratedAddress, GetBulkPayments, GetWalletInfo)
- Payment deduplication (Zano returns confirmed + mempool entries)
- Docker image: pavelravaga/zano:2.2.0.455
- Dockerfiles for source build and pre-built binary variants

Verified:
- All RPC calls tested against live Zano testnet
- Full E2E test: BTCPay Server checkout page with integrated address,
  QR code, and zano: URI payment link
- 23 unit tests pass
2026-03-25 12:10:45 +04:00

28 lines
626 B
C#

using BTCPayServer.Plugins.Zano.RPC;
using Xunit;
namespace BTCPayServer.Plugins.UnitTests.Zano.RPC
{
public class ZanoPollEventTest
{
[Fact]
public void DefaultInitialization_ShouldHaveNullCryptoCode()
{
var pollEvent = new ZanoPollEvent();
Assert.Null(pollEvent.CryptoCode);
}
[Fact]
public void PropertyAssignment_ShouldSetAndRetrieveValues()
{
var pollEvent = new ZanoPollEvent
{
CryptoCode = "ZANO"
};
Assert.Equal("ZANO", pollEvent.CryptoCode);
}
}
}