mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-02-22 14:22:40 +01:00
Can only sign with NBX if imported with NBX
This commit is contained in:
parent
ef271a088a
commit
56283df05a
3 changed files with 11 additions and 7 deletions
|
@ -475,11 +475,14 @@ namespace BTCPayServer.Controllers
|
||||||
if (await CanUseHotWallet())
|
if (await CanUseHotWallet())
|
||||||
{
|
{
|
||||||
var derivationScheme = GetDerivationSchemeSettings(walletId);
|
var derivationScheme = GetDerivationSchemeSettings(walletId);
|
||||||
var extKey = await ExplorerClientProvider.GetExplorerClient(walletId.CryptoCode)
|
if (derivationScheme.IsHotWallet)
|
||||||
.GetMetadataAsync<string>(derivationScheme.AccountDerivation,
|
{
|
||||||
WellknownMetadataKeys.MasterHDKey);
|
var extKey = await ExplorerClientProvider.GetExplorerClient(walletId.CryptoCode)
|
||||||
return SignWithSeed(walletId,
|
.GetMetadataAsync<string>(derivationScheme.AccountDerivation,
|
||||||
new SignWithSeedViewModel() {SeedOrKey = extKey, SigningContext = signingContext });
|
WellknownMetadataKeys.MasterHDKey);
|
||||||
|
return SignWithSeed(walletId,
|
||||||
|
new SignWithSeedViewModel() { SeedOrKey = extKey, SigningContext = signingContext });
|
||||||
|
}
|
||||||
}
|
}
|
||||||
TempData.SetStatusMessageModel(new StatusMessageModel()
|
TempData.SetStatusMessageModel(new StatusMessageModel()
|
||||||
{
|
{
|
||||||
|
|
|
@ -151,6 +151,8 @@ namespace BTCPayServer
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public BTCPayNetwork Network { get; set; }
|
public BTCPayNetwork Network { get; set; }
|
||||||
public string Source { get; set; }
|
public string Source { get; set; }
|
||||||
|
[JsonIgnore]
|
||||||
|
public bool IsHotWallet => Source == "NBXplorer";
|
||||||
|
|
||||||
[Obsolete("Use GetAccountKeySettings().AccountKeyPath instead")]
|
[Obsolete("Use GetAccountKeySettings().AccountKeyPath instead")]
|
||||||
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)]
|
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)]
|
||||||
|
|
|
@ -169,8 +169,7 @@ namespace BTCPayServer.Payments.Bitcoin
|
||||||
var prefix = $"{supportedPaymentMethod.PaymentId.ToPrettyString()}:";
|
var prefix = $"{supportedPaymentMethod.PaymentId.ToPrettyString()}:";
|
||||||
var nodeSupport = _dashboard?.Get(network.CryptoCode)?.Status?.BitcoinStatus?.Capabilities
|
var nodeSupport = _dashboard?.Get(network.CryptoCode)?.Status?.BitcoinStatus?.Capabilities
|
||||||
?.CanSupportTransactionCheck is true;
|
?.CanSupportTransactionCheck is true;
|
||||||
bool isHotwallet = supportedPaymentMethod.Source == "NBXplorer";
|
onchainMethod.PayjoinEnabled &= supportedPaymentMethod.IsHotWallet && nodeSupport;
|
||||||
onchainMethod.PayjoinEnabled &= isHotwallet && nodeSupport;
|
|
||||||
if (!isHotwallet)
|
if (!isHotwallet)
|
||||||
logs.Write($"{prefix} Payjoin should have been enabled, but your store is not a hotwallet");
|
logs.Write($"{prefix} Payjoin should have been enabled, but your store is not a hotwallet");
|
||||||
if (!nodeSupport)
|
if (!nodeSupport)
|
||||||
|
|
Loading…
Add table
Reference in a new issue