Skip to content

Commit 3afbc85

Browse files
authored
Merge pull request #168 from BrantaOps/release/0.10.2
Release/0.10.2
2 parents 19c440b + a35f736 commit 3afbc85

7 files changed

Lines changed: 48 additions & 9 deletions

File tree

app/main.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,11 +145,17 @@ function createWindow() {
145145
}
146146

147147
ipcMain.handle('show-notification', (_event, title, body) => {
148-
new ENotification({
148+
const notification = new ENotification({
149149
title,
150150
body,
151151
icon
152-
}).show();
152+
});
153+
154+
notification.on('click', () => {
155+
mainWindow?.show();
156+
});
157+
158+
notification.show();
153159
});
154160

155161
ipcMain.handle('verify-address', (_event, wallets, address) => {

installers/windows/Branta.Wix/Package.wxs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
22
<Package Name="Branta"
33
Manufacturer="Branta LLC"
4-
Version="0.10.1"
4+
Version="0.10.2"
55
UpgradeCode="4df52912-9d80-4a14-b98b-33a114a4f5ac">
66
<MajorUpgrade DowngradeErrorMessage="!(loc.DowngradeError)" />
77

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "branta",
33
"productName": "Branta",
4-
"version": "0.10.1",
4+
"version": "0.10.2",
55
"main": "build/app/main.js",
66
"author": "Branta LLC",
77
"description": "Verify your bitcoin payments.",

src/app/features/clipboard/clipboard-details/clipboard-details.component.ts

Lines changed: 32 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,45 @@ export class ClipboardDetailsComponent extends BaseClipboardComponent {
2929

3030
onVerify(): void {
3131
(async () => {
32-
var result = await this.queryPayments(this.clipboardItem?.value ?? "")
32+
const value = this.clipboardItem?.value;
33+
34+
if (!value) {
35+
return;
36+
}
37+
38+
const result = await this.queryPayments(value);
3339

3440
if (result) {
3541
this.clipboardItemChange.emit(result as PaymentClipboardItem);
36-
} else {
37-
this.toastrService.error(`Payment not found.`);
42+
return;
3843
}
44+
45+
this.showPaymentNotFoundToast(value);
3946
})();
4047
}
4148

49+
private showPaymentNotFoundToast(value: string): void {
50+
this.toastrService.error(
51+
`For more info on why this payment was not found click <a href="#" class="payment-link">here</a>.`,
52+
'Payment not found',
53+
{
54+
enableHtml: true,
55+
tapToDismiss: false
56+
}
57+
);
58+
59+
setTimeout(() => {
60+
const link = document.querySelector('.toast-error .payment-link');
61+
if (link) {
62+
link.addEventListener('click', (e) => {
63+
e.preventDefault();
64+
const url = `${this.serverService.baseUrl}/v2/verify/${encodeURIComponent(value)}`;
65+
window.electron.openUrl(url);
66+
});
67+
}
68+
}, 100);
69+
}
70+
4271
private async queryPayments(value: string): Promise<PaymentClipboardItem | null> {
4372
try {
4473
const paymentClipboardItems = await lastValueFrom(this.serverService.getPayment(value));

src/app/features/settings/settings.component.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,10 @@ export class SettingsComponent {
5252
developerMode: new FormControl(settings.developerMode)
5353
});
5454

55+
this.formGroup.valueChanges.subscribe((settings) => {
56+
this.settingsService.save(settings);
57+
});
58+
5559
this.formGroup.get('developerMode')?.valueChanges.subscribe(() => {
5660
this.clipboardService.rerunGetClipboardItem();
5761
});

src/app/shared/services/server.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export class ServerService {
1818
return this.httpClient.get<PaymentClipboardItem[]>(`${this.baseUrl}/v2/payments/${encodeURIComponent(value)}`);
1919
}
2020

21-
private get baseUrl(): string {
21+
get baseUrl(): string {
2222
if (environment.production == false) {
2323
return 'http://localhost:3000';
2424
}

0 commit comments

Comments
 (0)