Skip to content

Commit 126e9fb

Browse files
authored
Merge pull request #388 from bitfinexcom/staging
Release version 4.25.0
2 parents bbb4c9d + 3008f15 commit 126e9fb

8 files changed

Lines changed: 108 additions & 3 deletions

File tree

CHANGELOG.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,61 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [4.25.0] - 2024-07-31
11+
12+
### Added
13+
14+
- Added transaction tax report. PRs: [bfx-reports-framework#373](https://github.com/bitfinexcom/bfx-reports-framework/pull/373), [bfx-reports-framework#378](https://github.com/bitfinexcom/bfx-reports-framework/pull/378), [bfx-reports-framework#379](https://github.com/bitfinexcom/bfx-reports-framework/pull/379), [bfx-reports-framework#380](https://github.com/bitfinexcom/bfx-reports-framework/pull/380), [bfx-reports-framework#381](https://github.com/bitfinexcom/bfx-reports-framework/pull/381), [bfx-reports-framework#382](https://github.com/bitfinexcom/bfx-reports-framework/pull/382), [bfx-reports-framework#383](https://github.com/bitfinexcom/bfx-reports-framework/pull/383), [bfx-reports-framework#384](https://github.com/bitfinexcom/bfx-reports-framework/pull/384), [bfx-reports-framework#385](https://github.com/bitfinexcom/bfx-reports-framework/pull/385)
15+
- Increased the math precision of the trx tax report using `bignumber.js`. PR: [bfx-reports-framework#386](https://github.com/bitfinexcom/bfx-reports-framework/pull/386)
16+
- Added test coverage for the transaction tax report. PR: [bfx-reports-framework#387](https://github.com/bitfinexcom/bfx-reports-framework/pull/387)
17+
- Added unit test for core `look-up-trades` fn of the transaction tax report. PR: [bfx-reports-framework#388](https://github.com/bitfinexcom/bfx-reports-framework/pull/388)
18+
- Added ability to select `EXCHANGE` trades for the trx tax report. PR: [bfx-reports-framework#389](https://github.com/bitfinexcom/bfx-reports-framework/pull/389)
19+
- Added `_isInvoicePayOrder`, `_isAirdropOnWallet`, `_isMarginFundingPayment`, `_isAffiliateRebate`, `_isStakingPayments` ledgers to movements. PR: [bfx-reports-framework#391](https://github.com/bitfinexcom/bfx-reports-framework/pull/391)
20+
- Added ability to show taxable payment amounts in the tax report. PR: [bfx-reports-framework#392](https://github.com/bitfinexcom/bfx-reports-framework/pull/392)
21+
- Added perc progress of the trx tax report based on transactions that should be converted to USD using the pub-trade endpoint. PR: [bfx-reports-framework#394](https://github.com/bitfinexcom/bfx-reports-framework/pull/394)
22+
- Added ability to send `IPC` messages when the trx tax report is ready. This is used in the electronjs environment to show a native OS notification to the app in case the tax report is being generated in the background. PR: [bfx-reports-framework#397](https://github.com/bitfinexcom/bfx-reports-framework/pull/397)
23+
- Added ability to overwrite common interrupter when query bfx api. PR: [bfx-report#371](https://github.com/bitfinexcom/bfx-report/pull/371)
24+
- Added interruption ability in case rate limit. When getting `Rate Limit` or `cool down` due to `Rate Limit` for 1min occurs, it needs to provide a feature to interrupt the tax report and sync being processed. PR: [bfx-report#373](https://github.com/bitfinexcom/bfx-report/pull/373)
25+
- Added `TRY` to the FOREX ccy list. PR: [bfx-report#377](https://github.com/bitfinexcom/bfx-report/pull/377)
26+
- Added `CSV`/`PDF` formatter for the tax report `source` field to follow the UI view, eg show `AIRDROP_ON_WALLET` as `Airdrop on wallet`. PR: [bfx-report#381](https://github.com/bitfinexcom/bfx-report/pull/381)
27+
- Added `source` field to `CSV`/`PDF` of the tax report to follow the UI view. PR: [bfx-reports-framework#398](https://github.com/bitfinexcom/bfx-reports-framework/pull/398)
28+
- Added ability to show the native notification in the electron app in case the tax report is being generated in the background. There we check if the main window is invisible show a notification otherwise don't. PR: [bfx-report-electron#386](https://github.com/bitfinexcom/bfx-report-electron/pull/386)
29+
- Implemented UI representation for the new Tax Report. PR: [bfx-report-ui#816](https://github.com/bitfinexcom/bfx-report-ui/pull/816)
30+
- Implemented dismissable `Disclaimer` message for the new `Tax Report`. PR: [bfx-report-ui#831](https://github.com/bitfinexcom/bfx-report-ui/pull/831)
31+
- Implemented `Source` column representation for the new Tax Report and formatted like `Airdrop on wallet`. PR: [bfx-report-ui#836](https://github.com/bitfinexcom/bfx-report-ui/pull/836)
32+
- Implemented generation `progress` representation for the new `Tax Report`. Implemented notification on `Tax Report` generation finish. PR: [bfx-report-ui#837](https://github.com/bitfinexcom/bfx-report-ui/pull/837)
33+
34+
### Changed
35+
36+
- Refactored DB models to be moved to separate files for easier supporting and readability. PR: [bfx-reports-framework#393](https://github.com/bitfinexcom/bfx-reports-framework/pull/393)
37+
- Refactored sync schema to be moved to separate files for easier supporting and readability. PR: [bfx-reports-framework#395](https://github.com/bitfinexcom/bfx-reports-framework/pull/395)
38+
- Refactored and optimizes `CollapsedTable` component. PR: [bfx-report-ui#815](https://github.com/bitfinexcom/bfx-report-ui/pull/815)
39+
- Reworked and optimized `Spot` report column configuration getters. PR: [bfx-report-ui#817](https://github.com/bitfinexcom/bfx-report-ui/pull/817)
40+
- Refactored and optimized the `DateFormatSelector` component. PR: [bfx-report-ui#818](https://github.com/bitfinexcom/bfx-report-ui/pull/818)
41+
- Reworked and optimized `Funding Bids & Offers`, `Funding Loans (Unused)` and `Funding Credits (Used)` reports column configuration getters. Extended unified cell getter customizability for the cases when the tooltip content should be formatted differently from the main cell content. PR: [bfx-report-ui#819](https://github.com/bitfinexcom/bfx-report-ui/pull/819)
42+
- Reworked and optimized the `LangMenu` component in a more performant way and reduces redundant code to avoid potential issues in the future. PR: [bfx-report-ui#820](https://github.com/bitfinexcom/bfx-report-ui/pull/820)
43+
- Enhanced and unified `Ledgers`, `Funding Earnings`, `Staking Earnings` and `Affiliates Earnings` reports configuration getters. PR: [bfx-report-ui#821](https://github.com/bitfinexcom/bfx-report-ui/pull/821)
44+
- Reworked and optimized the `Export` menu toggler component in a more performant way and reduces redundant code. PR: [bfx-report-ui#822](https://github.com/bitfinexcom/bfx-report-ui/pull/822)
45+
- Reworked and optimized `Public Trades`, `Public Funding` and `Derivatives` reports column configuration getters. Implemented unified `formatType` utility for better reusability. PR: [bfx-report-ui#823](https://github.com/bitfinexcom/bfx-report-ui/pull/823)
46+
- Reworked and optimized the `NavSwitcher` component and improved props linting. PR: [bfx-report-ui#824](https://github.com/bitfinexcom/bfx-report-ui/pull/824)
47+
- Reworked and optimized `Invoices` report columns configuration getters. Implemented unified `getLinkCell` and `getJsonFormattedCell` utilities for better reusability. PR: [bfx-report-ui#827](https://github.com/bitfinexcom/bfx-report-ui/pull/827)
48+
- Reworked and optimized the `ShowMilliseconds` component in a more performant way and reduces redundant code. PR: [bfx-report-ui#828](https://github.com/bitfinexcom/bfx-report-ui/pull/828)
49+
- Prevented the `Tax Report` loading state still active in cases when the `emitTrxTaxReportGenerationInBackgroundToOne` event returns an `error` during report generation. PR: [bfx-report-ui#832](https://github.com/bitfinexcom/bfx-report-ui/pull/832)
50+
51+
### Fixed
52+
53+
- Strengthened consistency data for export. PR: [bfx-report#372](https://github.com/bitfinexcom/bfx-report/pull/372)
54+
- Fixed pub-trade price lookup for the trx tax report. PR: [bfx-reports-framework#390](https://github.com/bitfinexcom/bfx-reports-framework/pull/390)
55+
- Fixed the tax report if bfx-api `pub-trades` endpoint does not return array. PR: [bfx-reports-framework#396](https://github.com/bitfinexcom/bfx-reports-framework/pull/396)
56+
- Prevented requests duplication on `Tax Report` refreshing in some cases. PR: [bfx-report-ui#833](https://github.com/bitfinexcom/bfx-report-ui/pull/833)
57+
- Fixed issue with showing the sync state in some cases when the scheduler launches the synchronization. PR: [bfx-report-ui#835](https://github.com/bitfinexcom/bfx-report-ui/pull/835)
58+
- Fixed `disabling` the `Authenticate` button during the `2FA` login flow to prevent the possibility of requests with the same token duplication and related errors. PR: [bfx-report-ui#838](https://github.com/bitfinexcom/bfx-report-ui/pull/838)
59+
60+
### Security
61+
62+
- Added `dependabot` config for the ability to open new PRs against the `staging` branch. Also bumped `pug` version to `3.0.3` to have a [security improvement](https://github.com/pugjs/pug/pull/3438). PR: [bfx-report#380](https://github.com/bitfinexcom/bfx-report/pull/380)
63+
- Bumped `braces` from `3.0.2` to `3.0.3`. PR: [bfx-report-ui#826](https://github.com/bitfinexcom/bfx-report-ui/pull/826)
64+
1065
## [4.24.0] - 2024-05-08
1166

1267
### Added

bfx-report-ui

Submodule bfx-report-ui updated 74 files

bfx-reports-framework

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "bfx-report-electron",
3-
"version": "4.24.0",
3+
"version": "4.25.0",
44
"repository": "https://github.com/bitfinexcom/bfx-report-electron",
55
"description": "Reporting tool",
66
"author": "bitfinex.com",

server.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@ const allowedProcessMessagesSet = _getAllowedStatesSet({
5858
'READY_MIGRATIONS',
5959
'ERROR_MIGRATIONS',
6060

61+
'READY_TRX_TAX_REPORT',
62+
'ERROR_TRX_TAX_REPORT',
63+
6164
'ALL_TABLE_HAVE_BEEN_CLEARED',
6265
'ALL_TABLE_HAVE_NOT_BEEN_CLEARED',
6366

src/initialize-app.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,11 @@ module.exports = async () => {
157157
await app.whenReady()
158158
await enforceMacOSAppLocation()
159159

160+
// https://www.electronjs.org/docs/latest/tutorial/notifications#windows
161+
if (process.platform === 'win32') {
162+
app.setAppUserModelId(app.name)
163+
}
164+
160165
const pathToUserData = app.getPath('userData')
161166
const pathToUserDocuments = app.getPath('documents')
162167

src/manage-worker-messages.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ const isMainWinAvailable = require(
1111
'./helpers/is-main-win-available'
1212
)
1313
const { showWindow } = require('./helpers/manage-window')
14+
const showNotification = require('./show-notification')
1415
const PROCESS_MESSAGES = require(
1516
'../bfx-reports-framework/workers/loc.api/process.message.manager/process.messages'
1617
)
@@ -236,6 +237,21 @@ module.exports = (ipc) => {
236237

237238
ipc.send({ state: PROCESS_STATES.REMOVE_ALL_TABLES })
238239
}
240+
if (
241+
(
242+
state === PROCESS_MESSAGES.READY_TRX_TAX_REPORT ||
243+
state === PROCESS_MESSAGES.ERROR_TRX_TAX_REPORT
244+
) &&
245+
!wins?.mainWindow?.isVisible()
246+
) {
247+
const isError = state === PROCESS_MESSAGES.ERROR_TRX_TAX_REPORT
248+
const body = isError
249+
? 'An unexpected error occurred while generating the tax report!'
250+
: 'Your tax report is ready!'
251+
const urgency = isError ? 'critical' : 'normal'
252+
253+
showNotification({ body, urgency })
254+
}
239255
} catch (err) {
240256
console.error(err)
241257
}

src/show-notification/index.js

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
'use strict'
2+
3+
const { Notification } = require('electron')
4+
const path = require('path')
5+
6+
const icon = path.join(__dirname, '../../build/icons/64x64.png')
7+
8+
module.exports = (params) => {
9+
if (!Notification.isSupported()) {
10+
return
11+
}
12+
13+
const notification = new Notification({
14+
title: 'Bitfinex Report',
15+
body: 'Notification',
16+
silent: false,
17+
timeoutType: 'never',
18+
urgency: 'normal',
19+
icon,
20+
21+
...params
22+
})
23+
notification.show()
24+
25+
return notification
26+
}

0 commit comments

Comments
 (0)