Skip to content

Commit 00d6fab

Browse files
committed
Merge branch 'feature/ddw-614-add-display-of-current-rewards-balance' of github.com:input-output-hk/daedalus into feature/ddw-614-add-display-of-current-rewards-balance
# Conflicts: # CHANGELOG.md
2 parents b4580e3 + 32c4fab commit 00d6fab

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+1007
-604
lines changed

CHANGELOG.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,19 @@
44

55
### Features
66

7+
78
- Added display of current/unspent rewards ([PR 2803](https://github.com/input-output-hk/daedalus/pull/2803))
9+
- Improved stake pool searchbar ([PR 2847](https://github.com/input-output-hk/daedalus/pull/2847))
10+
- Implemented catalyst dynamic content ([PR 2856](https://github.com/input-output-hk/daedalus/pull/2856))
11+
12+
### Fixes
13+
14+
- Fixed main container zIndex ([PR 2863](https://github.com/input-output-hk/daedalus/pull/2863))
15+
16+
## 4.9.0-FC1
17+
18+
### Features
19+
820
- Added table view for delegated stake pools list ([PR 2837](https://github.com/input-output-hk/daedalus/pull/2837))
921
- Removed Discreet mode notification ([PR 2852](https://github.com/input-output-hk/daedalus/pull/2852))
1022
- Unified CPU info in diagnostics dialog ([PR 2818](https://github.com/input-output-hk/daedalus/pull/2818))
@@ -17,7 +29,7 @@
1729
- Fixed behaviour of wallet settings option of the app menu ([PR 2838](https://github.com/input-output-hk/daedalus/pull/2838))
1830
- Fixed styling of ITN rewards feature ([PR 2861](https://github.com/input-output-hk/daedalus/pull/2861))
1931
- Fixed available disk space takes a long time to show ([PR 2849](https://github.com/input-output-hk/daedalus/pull/2849))
20-
32+
2133
### Chores
2234

2335
- Migrated codebase from javascript to typescript ([PR 2843](https://github.com/input-output-hk/daedalus/pull/2843))

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "daedalus",
33
"productName": "Daedalus",
4-
"version": "4.8.0",
4+
"version": "4.9.0-FC1",
55
"description": "Cryptocurrency Wallet",
66
"main": "./dist/main/index.js",
77
"scripts": {

source/common/config/electron-store.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ export const STORAGE_KEYS: Record<string, StorageKey> = {
2020
READ_NEWS: 'READ-NEWS',
2121
RESET: 'RESET',
2222
SMASH_SERVER: 'SMASH-SERVER',
23+
STAKE_POOLS_LIST_VIEW_TOOLTIP: 'STAKE-POOLS-LIST-VIEW-TOOLTIP',
2324
STAKING_INFO_WAS_OPEN: 'ALONZO-INFO-WAS-OPEN',
2425
TERMS_OF_USE_ACCEPTANCE: 'TERMS-OF-USE-ACCEPTANCE',
2526
THEME: 'THEME',

source/common/types/electron-store.types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ export type StorageKey =
1515
| 'READ-NEWS'
1616
| 'RESET'
1717
| 'SMASH-SERVER'
18+
| 'STAKE-POOLS-LIST-VIEW-TOOLTIP'
1819
| 'TERMS-OF-USE-ACCEPTANCE'
1920
| 'THEME'
2021
| 'TOKEN-FAVORITES'

source/main/ipc/electronStoreConversation.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ const reset = async () => {
3737
await unset(keys.READ_NEWS);
3838
await unset(keys.SMASH_SERVER);
3939
await unset(keys.STAKING_INFO_WAS_OPEN);
40+
await unset(keys.STAKE_POOLS_LIST_VIEW_TOOLTIP);
4041
await unset(keys.TERMS_OF_USE_ACCEPTANCE);
4142
await unset(keys.THEME);
4243
await unset(keys.USER_DATE_FORMAT_ENGLISH);

source/renderer/app/api/api.ts

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ import { getPublicKey } from './transactions/requests/getPublicKey';
4040
import { getICOPublicKey } from './transactions/requests/getICOPublicKey';
4141
// Voting requests
4242
import { createWalletSignature } from './voting/requests/createWalletSignature';
43+
import { getCatalystFund } from './voting/requests/getCatalystFund';
4344
// Wallets requests
4445
import { updateSpendingPassword } from './wallets/requests/updateSpendingPassword';
4546
import { updateByronSpendingPassword } from './wallets/requests/updateByronSpendingPassword';
@@ -204,6 +205,8 @@ import type {
204205
import type {
205206
CreateVotingRegistrationRequest,
206207
CreateWalletSignatureRequest,
208+
GetCatalystFundResponse,
209+
CatalystFund,
207210
} from './voting/types';
208211
import type { StakePoolProps } from '../domains/StakePool';
209212
import type { FaultInjectionIpcRequest } from '../../../common/types/cardano-node.types';
@@ -2931,6 +2934,42 @@ export default class AdaApi {
29312934
fakeStakePoolsJson: Array<StakePool>
29322935
) => void;
29332936
setStakePoolsFetchingFailed: () => void;
2937+
getCatalystFund = async (): Promise<CatalystFund> => {
2938+
logger.debug('AdaApi::getCatalystFund called', {});
2939+
2940+
try {
2941+
const catalystFund = await getCatalystFund();
2942+
2943+
logger.debug('AdaApi::getCatalystFund success', {
2944+
catalystFund,
2945+
});
2946+
2947+
return {
2948+
current: {
2949+
number: catalystFund.id + 1,
2950+
startTime: new Date(catalystFund.fund_start_time),
2951+
endTime: new Date(catalystFund.fund_end_time),
2952+
resultsTime: new Date(
2953+
catalystFund.chain_vote_plans?.[0]?.chain_committee_end_time
2954+
),
2955+
registrationSnapshotTime: new Date(
2956+
catalystFund.registration_snapshot_time
2957+
),
2958+
},
2959+
next: {
2960+
number: catalystFund.id + 2,
2961+
startTime: new Date(catalystFund.next_fund_start_time),
2962+
registrationSnapshotTime: new Date(
2963+
catalystFund.next_registration_snapshot_time
2964+
),
2965+
},
2966+
};
2967+
} catch (error) {
2968+
logger.error('AdaApi::getCatalystFund error', {
2969+
error,
2970+
});
2971+
}
2972+
};
29342973
} // ========== TRANSFORM SERVER DATA INTO FRONTEND MODELS =========
29352974

29362975
const _createWalletFromServerData = action(

source/renderer/app/api/utils/localStorage.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -398,6 +398,12 @@ export default class LocalStorageApi {
398398
LocalStorageApi.unset(keys.HARDWARE_WALLET_DEVICES, deviceId);
399399
unsetHardwareWalletDevicesAll = async (): Promise<void> =>
400400
LocalStorageApi.unset(keys.HARDWARE_WALLET_DEVICES);
401+
setStakePoolsListViewTooltip = async (visited: boolean): Promise<void> =>
402+
LocalStorageApi.set(keys.STAKE_POOLS_LIST_VIEW_TOOLTIP, visited);
403+
getStakePoolsListViewTooltip = async (): Promise<boolean> =>
404+
LocalStorageApi.get(keys.STAKE_POOLS_LIST_VIEW_TOOLTIP, true);
405+
unsetStakePoolsListViewTooltip = async (): Promise<void> =>
406+
LocalStorageApi.unset(keys.STAKE_POOLS_LIST_VIEW_TOOLTIP);
401407
reset = async () => {
402408
await LocalStorageApi.reset();
403409
};
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { externalRequest } from '../../utils/externalRequest';
2+
import { MAINNET_SERVICING_STATION_URL } from '../../../config/urlsConfig';
3+
import { GetCatalystFundResponse } from '../types';
4+
5+
export const getCatalystFund = (): Promise<GetCatalystFundResponse> =>
6+
externalRequest({
7+
hostname: MAINNET_SERVICING_STATION_URL,
8+
path: '/api/v0/fund',
9+
method: 'GET',
10+
protocol: 'https',
11+
});

source/renderer/app/api/voting/types.ts

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,29 @@ export type SignatureParams = {
2727
passphrase: string;
2828
};
2929
};
30+
export type GetCatalystFundResponse = {
31+
id: number;
32+
fund_end_time: string;
33+
fund_name: string;
34+
fund_start_time: string;
35+
next_fund_start_time: string;
36+
next_registration_snapshot_time: string;
37+
registration_snapshot_time: string;
38+
chain_vote_plans: Array<{
39+
chain_committee_end_time: string;
40+
}>;
41+
};
42+
export type CatalystFund = {
43+
current: {
44+
number: number;
45+
startTime: Date;
46+
endTime: Date;
47+
resultsTime: Date;
48+
registrationSnapshotTime: Date;
49+
};
50+
next: {
51+
number: number;
52+
startTime: Date;
53+
registrationSnapshotTime: Date;
54+
};
55+
};

source/renderer/app/components/layout/SidebarLayout.scss

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212
overflow: hidden;
1313
position: relative;
1414
width: 100%;
15-
// Show elements that overflow the main above the sidebar area
16-
z-index: 20;
1715
}
1816

1917
.sidebar {
@@ -24,8 +22,6 @@
2422
.topbar {
2523
box-shadow: 0 5px 20px 0 var(--theme-sidebar-layout-topbar-shadow-color);
2624
flex-shrink: 0;
27-
// Show elements that overflow the topbar above the content area
28-
z-index: 20;
2925
}
3026

3127
.contentWrapper {

0 commit comments

Comments
 (0)