Skip to content

Commit 1614d76

Browse files
Lucas Araujodanielmain
authored andcommitted
[DDW-1068] Get fund number from fund name
1 parent b9a5b27 commit 1614d76

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
## 4.9.1
44

55
### Fixes
6-
6+
7+
- Fixed catalyst fund name ([PR 2946](https://github.com/input-output-hk/daedalus/pull/2946))
78
- Fixed macOS installer on Monterey 12.3 ([PR 2929](https://github.com/input-output-hk/daedalus/pull/2929))
89

910
### Chores

source/renderer/app/api/api.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2944,9 +2944,13 @@ export default class AdaApi {
29442944
catalystFund,
29452945
});
29462946

2947+
const fundNumber =
2948+
Number(catalystFund.fund_name?.match(/\d+/)?.[0]) ||
2949+
catalystFund.id + 1;
2950+
29472951
return {
29482952
current: {
2949-
number: catalystFund.id + 1,
2953+
number: fundNumber,
29502954
startTime: new Date(catalystFund.fund_start_time),
29512955
endTime: new Date(catalystFund.fund_end_time),
29522956
resultsTime: new Date(
@@ -2957,7 +2961,7 @@ export default class AdaApi {
29572961
),
29582962
},
29592963
next: {
2960-
number: catalystFund.id + 2,
2964+
number: fundNumber + 1,
29612965
startTime: new Date(catalystFund.next_fund_start_time),
29622966
registrationSnapshotTime: new Date(
29632967
catalystFund.next_registration_snapshot_time

0 commit comments

Comments
 (0)