Skip to content

Commit

Permalink
Merge branch 'develop' into feature/ddw-452-show-ada-amounts-in-other…
Browse files Browse the repository at this point in the history
…-currencies
  • Loading branch information
nikolaglumac committed Jan 14, 2021
2 parents 3010622 + 9aed847 commit aca89b4
Show file tree
Hide file tree
Showing 41 changed files with 275 additions and 153 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Expand Up @@ -8,8 +8,15 @@ Changelog
- Improve Mnemonic Phrase Input UX [PR 2280](https://github.com/input-output-hk/daedalus/pull/2280)
- Added wallet public key viewing feature ([PR 2271](https://github.com/input-output-hk/daedalus/pull/2271))

### Fixes

- Fixed Ledger TXs to Byron addresses ([PR 2299](https://github.com/input-output-hk/daedalus/pull/2299))

### Chores

- Improved "Settings" screen scrolling actions ([PR 2302](https://github.com/input-output-hk/daedalus/pull/2302))
- Improved scrollable dialogs ([PR 2285](https://github.com/input-output-hk/daedalus/pull/2285))
- Disabled and hid copy and paste context menu items on some scenarios ([PR 2300](https://github.com/input-output-hk/daedalus/pull/2300))
- Applied validation to spending password to be not longer than 255 characters ([PR 2287](https://github.com/input-output-hk/daedalus/pull/2287))
- Update `axios` package ([PR 2291](https://github.com/input-output-hk/daedalus/pull/2291))

Expand Down
6 changes: 3 additions & 3 deletions source/common/types/hardware-wallets.types.js
Expand Up @@ -109,9 +109,9 @@ export type StakingBlockchainPointer = {|

export type LedgerSignTransactionInputsType = Array<LedgerSignTransactionInputType>;

export type LedgerSignTransactionOutputsType = Array<
LedgerOutputTypeAddress | LedgerOutputTypeChange
>;
export type LedgerSignTransactionOutputsType =
| []
| Array<LedgerOutputTypeAddress | LedgerOutputTypeChange>;

export type TrezorSignTransactionInputType = {
path: string,
Expand Down
24 changes: 19 additions & 5 deletions source/main/windows/main.js
Expand Up @@ -84,10 +84,22 @@ export const createMainWindow = (locale: string) => {
window.setTitle(getWindowTitle(locale));

window.webContents.on('context-menu', (e, props) => {
const contextMenuOptions = [
{ label: 'Copy', accelerator: 'CmdOrCtrl+C', role: 'copy' },
{ label: 'Paste', accelerator: 'CmdOrCtrl+V', role: 'paste' },
];
const { canCopy, canPaste } = props.editFlags;
const contextMenuOptions = [];
if (canCopy && props.selectionText) {
contextMenuOptions.push({
label: 'Copy',
accelerator: 'CmdOrCtrl+C',
role: 'copy',
});
}
if (canPaste) {
contextMenuOptions.push({
label: 'Paste',
accelerator: 'CmdOrCtrl+V',
role: 'paste',
});
}

if (isDev || isTest) {
const { x, y } = props;
Expand All @@ -99,7 +111,9 @@ export const createMainWindow = (locale: string) => {
});
}

Menu.buildFromTemplate(contextMenuOptions).popup(window);
if (contextMenuOptions.length) {
Menu.buildFromTemplate(contextMenuOptions).popup(window);
}
});

window.webContents.on('did-frame-finish-load', () => {
Expand Down
3 changes: 2 additions & 1 deletion source/renderer/app/api/addresses/requests/inspectAddress.js
@@ -1,11 +1,12 @@
// @flow
import { request } from '../../utils/request';
import type { RequestConfig } from '../../common/types';
import type { InspectAddressResponse } from '../types';

export const inspectAddress = (
config: RequestConfig,
{ addressId }: any // @TODO
): Promise<any> =>
): Promise<InspectAddressResponse> =>
request(
{
method: 'GET',
Expand Down
20 changes: 20 additions & 0 deletions source/renderer/app/api/addresses/types.js
@@ -1,6 +1,10 @@
// @flow
export type AddressState = 'used' | 'unused';

export type AddressStyle = 'Byron' | 'Shelley' | 'Icarus';

export type StakeReference = 'none' | 'by value' | 'by pointer';

export type GetAddressesRequestQueryParams = {
state: AddressState,
};
Expand All @@ -19,6 +23,22 @@ export type GetAddressesRequest = {
isHardwareWallet?: boolean,
};

export type InspectAddressResponse = {
address_style: AddressStyle,
stake_reference: StakeReference,
network_tag?: number,
spending_key_hash?: string,
stake_key_hash?: string,
script_hash?: string,
pointer?: {
slot_num: number,
transaction_index: number,
output_index: number,
},
address_root?: string,
derivation_path?: string,
};

// Byron related types

export type CreateByronWalletAddressRequest = {
Expand Down
7 changes: 4 additions & 3 deletions source/renderer/app/api/api.js
Expand Up @@ -113,6 +113,7 @@ import type {
Address,
GetAddressesRequest,
CreateByronWalletAddressRequest,
InspectAddressResponse,
} from './addresses/types';

// Common Types
Expand Down Expand Up @@ -1004,9 +1005,9 @@ export default class AdaApi {
}
};

inspectAddress = async (
request: any // @TODO
): Promise<any> => {
inspectAddress = async (request: {
addressId: string,
}): Promise<InspectAddressResponse> => {
logger.debug('AdaApi::inspectAddress called', {
parameters: filterLogData(request),
});
Expand Down
4 changes: 0 additions & 4 deletions source/renderer/app/components/layout/SidebarLayout.scss
Expand Up @@ -33,10 +33,6 @@
overflow-x: hidden;
overflow-y: overlay;
position: relative;
&::-webkit-scrollbar-button {
display: block;
height: 7px;
}
}

.content {
Expand Down
Expand Up @@ -4,9 +4,4 @@
height: 100%;
overflow-y: overlay;
position: relative;

&::-webkit-scrollbar-button {
display: block;
height: 7px;
}
}
5 changes: 5 additions & 0 deletions source/renderer/app/components/news/NewsFeed.scss
Expand Up @@ -111,6 +111,10 @@
}
}

*::-webkit-scrollbar-button {
display: none;
}

*::-webkit-scrollbar-track {
margin-bottom: 11px;
margin-top: 25px;
Expand All @@ -122,6 +126,7 @@
--theme-splash-network-scrollbar-thumb-background
);
min-height: 150px;

&:hover {
background-color: var(
--theme-splash-network-scrollbar-thumb-background-hover
Expand Down
Expand Up @@ -6,10 +6,6 @@
overflow-x: hidden;
overflow-y: overlay;
padding: 20px;
&::-webkit-scrollbar-button {
display: block;
height: 7px;
}
}

.centeredBox {
Expand Down
19 changes: 19 additions & 0 deletions source/renderer/app/components/settings/SettingsLayout.js
Expand Up @@ -7,10 +7,29 @@ import styles from './SettingsLayout.scss';
type Props = {
children: Node,
menu: Node,
activePage: string,
};

@observer
export default class SettingsLayout extends Component<Props> {
scrollableDomElement: ?HTMLElement = null;

componentDidMount() {
this.scrollableDomElement = document.querySelector(
'.SettingsLayout_settingsPaneWrapper'
);
}

componentDidUpdate(prevProps: Props) {
const didActivePageChange = this.props.activePage !== prevProps.activePage;
if (
this.scrollableDomElement instanceof HTMLElement &&
didActivePageChange
) {
this.scrollableDomElement.scrollTop = 0;
}
}

render() {
const { menu, children } = this.props;
return (
Expand Down
4 changes: 0 additions & 4 deletions source/renderer/app/components/settings/SettingsLayout.scss
Expand Up @@ -12,10 +12,6 @@
overflow-x: hidden;
overflow-y: overlay;
padding: 20px 20px 20px 0;
&::-webkit-scrollbar-button {
display: block;
height: 7px;
}
}

.settingsPane {
Expand Down
Expand Up @@ -326,7 +326,7 @@ export default class DelegationStepsChooseStakePoolDialog extends Component<
backButton={<DialogBackButton onBack={onBack} />}
>
<BackToTopButton
scrollableElementClassName="Dialog_content"
scrollableElementClassName="Dialog_contentWrapper"
buttonTopPosition={100}
scrollTopToActivate={100}
/>
Expand Down
Expand Up @@ -10,14 +10,6 @@
.Dialog_subtitle {
color: var(--theme-delegation-steps-choose-wallet-steps-indicator-color);
}

.Dialog_content {
padding: 0 25px 4px 4px;
}

.Dialog_actions button {
margin-top: 10px !important;
}
}

.stakePoolsListWrapper {
Expand All @@ -26,7 +18,6 @@

.content {
color: var(--theme-delegation-steps-choose-stake-pool-title-color);
margin-bottom: 20px;

.description {
font-family: var(--font-medium);
Expand Down
Expand Up @@ -2,8 +2,14 @@
@import '../../../themes/mixins/link';

.delegationStepsIntroDialogWrapper {
:global {
.Dialog_title {
margin-bottom: 20px;
}
}
.content {
color: var(--theme-delegation-steps-intro-content-text-color);
margin-top: 0;

.link {
font-size: 16px;
Expand Down
Expand Up @@ -78,7 +78,7 @@
font-family: var(--font-regular);
font-size: 14px;
line-height: 1.43;
padding: 10px 20px;
padding: 10px 20px 0;

p {
margin-bottom: 3px;
Expand Down
11 changes: 5 additions & 6 deletions source/renderer/app/components/status/DaedalusDiagnostics.scss
Expand Up @@ -57,6 +57,11 @@

.table {
width: calc(50% - 15px);

&:nth-child(2) {
margin-bottom: 30px;
}

@media (max-width: 1000px) {
width: 100%;

Expand All @@ -65,12 +70,6 @@
}
}

@media (max-height: 800px) {
&:nth-child(2) {
margin-bottom: 70px;
}
}

.layoutRow {
display: flex;
justify-content: space-between;
Expand Down
Expand Up @@ -3,6 +3,10 @@
width: 100%;
width: -webkit-calc(100% + 20px);

*::-webkit-scrollbar-button {
display: none;
}

:global(.ReactVirtualized__Grid__innerScrollContainer) {
overflow: visible !important;
}
Expand All @@ -12,6 +16,7 @@
overflow-x: hidden !important;
padding-right: 2px;
will-change: none !important;

&:focus {
outline: 0;
}
Expand Down
Expand Up @@ -7,10 +7,7 @@
overflow-x: hidden;
overflow-y: overlay;
padding: 20px;
&::-webkit-scrollbar-button {
display: block;
height: 7px;
}

@media (max-width: 1000px) {
min-height: 600px;
}
Expand Down
Expand Up @@ -9,10 +9,7 @@
overflow-x: hidden;
overflow-y: overlay;
padding: 20px;
&::-webkit-scrollbar-button {
display: block;
height: 7px;
}

@media (max-width: 1000px) {
min-height: 600px;
}
Expand Down
Expand Up @@ -4,14 +4,6 @@
.dialog {
font-family: var(--font-light);

:global .Dialog_title {
margin-bottom: 0;
}

:global .Dialog_content {
padding-top: 25px;
}

.spendingPasswordFields {
transition: all 400ms ease;

Expand All @@ -30,13 +22,14 @@

.spendingPasswordField {
display: flex;
position: relative;

> span {
height: 12px;
left: 145px;
outline: none;
position: absolute;
top: 54px;
top: 4px;
width: 12px;
}

Expand Down
Expand Up @@ -67,5 +67,5 @@

.showMoreTransactionsButton {
display: block !important;
margin: 30px auto;
margin: 30px auto 20px;
}

0 comments on commit aca89b4

Please sign in to comment.