multi: add migrate-wallet-to-watch-only flag

To enable converting an existing wallet with private key material into a
watch-only wallet on first startup with remote signing enabled, we add a
new flag. Since the conversion is a destructive process, this shouldn't
happen automatically just because remote signing is enabled.
This commit is contained in:
Oliver Gugger committed 2022-01-06 14:35:26 +01:00
1 parent afc53d1c52
commit bab807a57d
6 files changed
+93 -25

No files matched your search

+4 -1
View File
@@ -1612,7 +1612,10 @@ func (c *Config) ImplementationConfig(
// watch-only source of chain and address data. But we don't need any
// private key material in that btcwallet base wallet.
if c.RemoteSigner.Enable {
rpcImpl := NewRPCSignerWalletImpl(c, ltndLog, interceptor)
rpcImpl := NewRPCSignerWalletImpl(
c, ltndLog, interceptor,
c.RemoteSigner.MigrateWatchOnly,
)
return &ImplementationCfg{
GrpcRegistrar: rpcImpl,
RestRegistrar: rpcImpl,