Skip to content

Commit

Permalink
fix: small visuals for the output descriptors feature (#337)
Browse files Browse the repository at this point in the history
  • Loading branch information
markettes authored Oct 31, 2023
1 parent 613898d commit 554c001
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/Pages/Wallets.razor
Original file line number Diff line number Diff line change
Expand Up @@ -703,17 +703,17 @@
</ModalContent>
</Modal>
<Modal @ref="_exportOutputDescriptorModal">
<ModalContent Size="ModalSize.Large">
<ModalContent Centered Size="ModalSize.ExtraLarge">
<ModalHeader>
@($"Export wallet")
</ModalHeader>
<ModalBody>
<Paragraph>
@("Output descriptor: " + StringHelper.TruncateHeadAndTail(_outputDescriptorContentModal, 25))
<Button Color="Color.Primary" Clicked="@(()=> CopyStrToClipboard(_outputDescriptorContentModal))">Copy</Button>
<Button Color="Color.Primary" Clicked="@(()=> CopyStrToClipboard(_outputDescriptorContentModal, "Output Descriptor"))">Copy</Button>
</Paragraph>
@("Wallet derivation strategy (NBITCOIN): " + StringHelper.TruncateHeadAndTail(_derivationScheme, 25))
<Button Color="Color.Primary" Clicked="@(()=> CopyStrToClipboard(_derivationScheme))">Copy</Button>
<Button Color="Color.Primary" Clicked="@(()=> CopyStrToClipboard(_derivationScheme, "Derivation Strategy"))">Copy</Button>
</ModalBody>
<ModalFooter>
<Button Color="Color.Secondary" Clicked="@CloseExportOutputDescriptorModal">Close</Button>
Expand Down Expand Up @@ -1558,10 +1558,10 @@
}
}
private async Task CopyStrToClipboard(string arg)
private async Task CopyStrToClipboard(string arg, string whatCopied = "Address")
{
await ClipboardService.WriteTextAsync(arg);
ToastService.ShowSuccess("Address copied");
ToastService.ShowSuccess(whatCopied + " copied");
await CloseTextModal();
}
Expand Down

0 comments on commit 554c001

Please sign in to comment.