mirror of
https://github.com/aljazceru/BTCPayServerPlugins.git
synced 2025-12-16 23:24:25 +01:00
Fix seed initialization to use Spark SDK Seed.Mnemonic type
The previous implementation incorrectly converted the mnemonic to bytes: - OLD: var seed = mnemonic.DeriveSeed(); ... seed.ToList() - NEW: var seed = new Seed.Mnemonic(mnemonic: mnemonic.ToString(), passphrase: null); This matches the official Spark SDK C# snippets pattern where ConnectRequest expects a Seed discriminated union type, not a List<byte>. Reference: https://github.com/breez/spark-sdk/tree/main/docs/breez-sdk/snippets/csharp
This commit is contained in:
@@ -39,8 +39,8 @@ public class BreezLightningClient : ILightningClient, IDisposable
|
||||
apiKey = apiKey
|
||||
};
|
||||
|
||||
var seed = mnemonic.DeriveSeed();
|
||||
var sdk = await BreezSdkSparkMethods.Connect(new ConnectRequest(config, seed.ToList(), workingDir));
|
||||
var seed = new Seed.Mnemonic(mnemonic: mnemonic.ToString(), passphrase: null);
|
||||
var sdk = await BreezSdkSparkMethods.Connect(new ConnectRequest(config, seed, workingDir));
|
||||
|
||||
return new BreezLightningClient(sdk, network, paymentKey);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user