mirror of
https://github.com/aljazceru/BTCPayServerPlugins.git
synced 2025-12-17 23:54:26 +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
|
apiKey = apiKey
|
||||||
};
|
};
|
||||||
|
|
||||||
var seed = mnemonic.DeriveSeed();
|
var seed = new Seed.Mnemonic(mnemonic: mnemonic.ToString(), passphrase: null);
|
||||||
var sdk = await BreezSdkSparkMethods.Connect(new ConnectRequest(config, seed.ToList(), workingDir));
|
var sdk = await BreezSdkSparkMethods.Connect(new ConnectRequest(config, seed, workingDir));
|
||||||
|
|
||||||
return new BreezLightningClient(sdk, network, paymentKey);
|
return new BreezLightningClient(sdk, network, paymentKey);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user