fix wallet setup binding
This commit is contained in:
parent
613e3b8239
commit
24c6ca7e12
@ -20,7 +20,8 @@
|
||||
private async Task Callback(BTCPayServerOnchainWalletConfigure.ChosenConfiguration obj)
|
||||
{
|
||||
var kp = new KeyPath("m/84'/0'/0'");
|
||||
var mKey = new Mnemonic(obj.Mnemonic).DeriveExtKey();
|
||||
var seed = new Mnemonic(obj.Mnemonic ?? State.Value.PairConfig.PairingResult.ExistingWalletSeed);
|
||||
var mKey = seed.DeriveExtKey();
|
||||
var xpub = mKey.Derive(kp).Neuter().ToString(Network.Main);
|
||||
if (obj is {UseExisting: false,SetStore: true})
|
||||
{
|
||||
@ -33,7 +34,7 @@
|
||||
}
|
||||
Dispatcher.Dispatch(new RootState.WalletConfigLoadedAction(new WalletConfig()
|
||||
{
|
||||
Mnemonic = obj.Mnemonic,
|
||||
Mnemonic = seed.ToString(),
|
||||
DerivationPath = kp.ToString(),
|
||||
StandaloneMode = false
|
||||
}));
|
||||
|
||||
@ -18,10 +18,10 @@
|
||||
}
|
||||
|
||||
<ValidationEditContext Model="this" @ref="_validationEditContext" Validate="Validate" OnValidSubmit="OnSubmit">
|
||||
<MudRadioGroup Label="Wallet Creation Options" @bind-Value="SelectedOption" For="() => SelectedOption">
|
||||
<MudRadioGroup Label="Wallet Creation Options" @bind-SelectedOption="@SelectedOption" For="() => SelectedOption">
|
||||
@foreach (var option in Options)
|
||||
{
|
||||
<MudRadio T="string" Value="@option.Key">@option.Value</MudRadio>
|
||||
<MudRadio T="string" Option="@option.Key">@option.Value</MudRadio>
|
||||
}
|
||||
</MudRadioGroup>
|
||||
@if (IsMnemonicRequired)
|
||||
@ -148,5 +148,5 @@
|
||||
Mnemonic = new Mnemonic(Wordlist.English, WordCount.Twelve).ToString();
|
||||
}
|
||||
|
||||
public record ChosenConfiguration(bool UseExisting, bool SetStore, string Mnemonic);
|
||||
public record ChosenConfiguration(bool UseExisting, bool SetStore, string? Mnemonic);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user