Skip to content

Commit

Permalink
Merge branch 'main' into add-logging
Browse files Browse the repository at this point in the history
  • Loading branch information
Hjort committed Jan 17, 2022
2 parents ff36971 + 8673ab8 commit f68df84
Show file tree
Hide file tree
Showing 279 changed files with 2,997 additions and 2,327 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build-lint-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ name: Build, lint and test
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [main]
branches: [main, release**]
pull_request:
branches: [main]
branches: [main, release**]

# Allows us to run the workflow manually from the Actions tab
workflow_dispatch:
Expand Down Expand Up @@ -77,7 +77,7 @@ jobs:
run: yarn build-proto

- name: Build
run: yarn build
run: yarn build-ci

- name: Save build artifacts in cache
uses: actions/cache@v2
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@
### Added

- Added logging, which can be exported from the application menu.
- Allow users to verify address on Ledger device.

## 1.3.1

### Fixed

- Fixed identity issuance with dts.

## 1.3.0

Expand All @@ -21,6 +28,7 @@
- Updated UI to reflect the rename of GTU to CCD, meaning anywhere tokens were referred to as GTU, it now says CCD. The GTU icon has also been replaced with the icon representing CCD.
- Datetimes are now selected with a date picker from a calendar.
- Finalized transactions are no longer stored in the local database, but are instead always fetched from the wallet proxy when needed.
- Updated the default node configuration to point to concordiumwalletnode.com.

### Fixed

Expand Down
6 changes: 3 additions & 3 deletions app/components/AccountCard/AccountCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ function ShieldedBalance({
</>
);

const rowLeftSide = <h3>Shielded Balance:</h3>;
const rowLeftSide = <h3>Shielded balance:</h3>;

const closeInfo = (e: SyntheticEvent) => {
e.stopPropagation(); // So that we avoid triggering the parent's onClick
Expand Down Expand Up @@ -219,7 +219,7 @@ export function AccountCardView({
/>
<SidedRow
className={styles.row}
left={<h3>Account Total:</h3>}
left={<h3>Account total:</h3>}
right={
<h3>
{displayAsGTU(shielded + unShielded)}
Expand All @@ -235,7 +235,7 @@ export function AccountCardView({
/>
<SidedRow
className={styles.row}
left="- At Disposal:"
left="- At disposal:"
right={displayAsGTU(amountAtDisposal)}
/>
<SidedRow
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
}

.comment {
font-size: $font-size-body4;
font-size: $font-size-body5;
color: $color-text-faded;
}

Expand Down
4 changes: 3 additions & 1 deletion app/components/ButtonNavLink/ButtonNavLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,12 @@ export default function ButtonNavLink({
size = 'huge',
...props
}: ButtonNavLinkProps): JSX.Element {
if (!disabled) {
props.activeClassName = 'active';
}
return (
<Button
as={disabled ? undefined : NavLink}
activeClassName="active"
className={clsx(styles.root, className)}
disabled={disabled}
inverted={inverted}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ export default function DisplayAccountCredentialUpdate({
estimatedFee={transaction.estimatedFee}
/>
<h5>
New Threshold: <b>{transaction.payload.threshold}</b>
New threshold: <b>{transaction.payload.threshold}</b>
</h5>
{removedCredIds.length > 0 ? (
<>
<h5>Removed Credentials:</h5>
<h5>Removed credentials:</h5>
{removedCredIds.map((removedId) => (
<p key={removedId} className={styles.credId}>
{removedId}
Expand All @@ -43,7 +43,7 @@ export default function DisplayAccountCredentialUpdate({
) : null}
{addedCredentials.length > 0 ? (
<>
<h5>Added Credentials:</h5>
<h5>Added credentials:</h5>
{addedCredentials.map((addedCredential) => (
<p
key={addedCredential.value.credId}
Expand Down
41 changes: 35 additions & 6 deletions app/components/DisplayAddress.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,52 @@ import React from 'react';
import clsx from 'clsx';
import { chunkString } from '~/utils/basicHelpers';

export enum AddressDisplayFormat {
Ledger,
DoubleLine,
}

interface DisplayFormatConfig {
baseClassName?: string;
baseLineClassName?: string;
lineLength: number;
}

const formatMap: {
[k in AddressDisplayFormat]: DisplayFormatConfig;
} = {
[AddressDisplayFormat.Ledger]: {
baseClassName: 'flex flexWrap justifyCenter',
baseLineClassName: 'mH5',
lineLength: 10,
},
[AddressDisplayFormat.DoubleLine]: {
baseClassName: 'textCenter',
lineLength: 25,
},
};

interface Props {
address: string;
lineClassName?: string;
outerClassName?: string;
lineLength?: number;
className?: string;
format?: AddressDisplayFormat;
}

export default function DisplayAddress({
address,
lineClassName,
outerClassName,
lineLength = 10,
className,
format = AddressDisplayFormat.Ledger,
}: Props) {
const { baseClassName, baseLineClassName, lineLength } = formatMap[format];
return (
<div className={clsx(outerClassName, 'textCenter mono')}>
<div className={clsx(baseClassName, 'mono', className)}>
{chunkString(address, lineLength).map((text) => (
<div className={clsx(lineClassName, 'm0')} key={text}>
<div
className={clsx(baseLineClassName, lineClassName)}
key={text}
>
{text}
</div>
))}
Expand Down
9 changes: 7 additions & 2 deletions app/components/DisplayEstimatedFee/DisplayEstimatedFee.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import React from 'react';
import clsx from 'clsx';
import styles from './DisplayEstimatedFee.module.scss';
import { displayAsGTU } from '~/utils/gtu';
import { Fraction } from '~/utils/types';
import { collapseFraction } from '~/utils/basicHelpers';

import styles from './DisplayEstimatedFee.module.scss';

interface Props {
estimatedFee: Fraction | undefined;
className?: string;
Expand All @@ -22,5 +23,9 @@ export default function DisplayEstimatedFee({
} else {
fee = 'To be determined';
}
return <p className={clsx(styles.root, className)}>Estimated fee: {fee}</p>;
return (
<p className={clsx(styles.root, 'mono', className)}>
Estimated fee: {fee}
</p>
);
}
2 changes: 1 addition & 1 deletion app/components/DisplayFee.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ interface Props {
export default function DisplayFee({ className, transaction }: Props) {
if (transaction.cost) {
return (
<p className={clsx('body4', className)}>
<p className={clsx('body5', className)}>
{' '}
Fee: {displayAsGTU(transaction.cost)}{' '}
</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,13 @@
}

.value {
font-size: $font-size-body2;
font-family: $font-family-mono;
font-size: $font-size-body3;
margin: 0;
}

.note {
composes: textFaded from global, body3 from global, mT5 from global;
composes: textFaded from global, mT5 from global;
font-family: $font-family-mono;
font-size: $font-size-body4;
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default function DisplayTransactionExpiryTime({
}: Props) {
return (
<>
<p className={styles.title}>Transaction expiry time</p>
<p className={styles.title}>Transaction expiry time:</p>
<p className={styles.value}>
{expiryTime === undefined
? placeholder
Expand Down
4 changes: 2 additions & 2 deletions app/components/ExportBakerCredentials.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export default function ExportBakerCredentials({
);

const success = await saveFile(fileString, {
title: 'Save Baker Credentials',
title: 'Save baker credentials',
defaultPath: 'baker-credentials.json',
});
if (success) {
Expand All @@ -58,7 +58,7 @@ export default function ExportBakerCredentials({
className={clsx('mT50', buttonClassName)}
onClick={onExport}
>
Export Baker Credentials
Export baker credentials
</Button>
</div>
);
Expand Down
2 changes: 1 addition & 1 deletion app/components/FailedIdentityModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export default function FailedIdentityModal({ identity }: Props) {
open={modalOpen}
actions={[
{
label: 'Try Again',
label: 'Try again',
location: {
pathname: routes.IDENTITYISSUANCE,
state: {
Expand Down
2 changes: 1 addition & 1 deletion app/components/Form/Input/Input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const Input = forwardRef<HTMLInputElement, InputProps>(
) => {
return (
<label className={clsx(styles.root, className)}>
<Label>{label}</Label>
<Label className="mB5">{label}</Label>
<input
className={clsx(
styles.field,
Expand Down
2 changes: 1 addition & 1 deletion app/components/Form/TextArea/TextArea.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ const TextArea = forwardRef<HTMLTextAreaElement, TextAreaProps>(

return (
<label className={clsx(styles.root, className)}>
<Label>{label}</Label>
<Label className="mB5">{label}</Label>
<textarea
className={clsx(
styles.field,
Expand Down
2 changes: 1 addition & 1 deletion app/components/IdentityCard/FailedIdentityDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export default function FailedIdentityDetails({
);
const identityProviderName = identityProvider.ipInfo.ipDescription.name;
const cc = '[email protected]';
const subject = `Issuance Reference: ${sessionId}`;
const subject = `Issuance reference: ${sessionId}`;
const body = `Hi! My identity issuance failed.
Here is my info:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@
.back,
.close {
position: absolute;
top: $page-container-padding-vertical;
top: $page-container-padding-vertical - 5px;
}

.back {
left: $page-container-padding-vertical;
left: $page-container-padding-vertical - 5px;
padding-left: 11px;
padding-right: 13px;
}

.close {
right: $page-container-padding-vertical;
right: $page-container-padding-vertical - 5px;
}

.paddingVertical {
Expand Down
2 changes: 1 addition & 1 deletion app/components/PageLayout/PageLayout.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ WithHeaderButtons.args = {
<PageLayout.HeaderButton align="left">
<PlusIcon height="20" />
</PageLayout.HeaderButton>
<h1>Page Title</h1>
<h1>Page title</h1>
<PageLayout.HeaderButton align="right">
<PlusIcon height="20" />
</PageLayout.HeaderButton>
Expand Down
2 changes: 1 addition & 1 deletion app/components/PickAccount.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export default function PickAccount({
<>
<SimpleErrorModal
show={Boolean(error)}
header="Unable to load Accounts"
header="Unable to load accounts"
content={error}
onClick={() => dispatch(push(routes.MULTISIGTRANSACTIONS))}
/>
Expand Down
2 changes: 1 addition & 1 deletion app/components/PickBakerStakeAmount.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export default function PickBakerStakeAmount({
return (
<div className="mV30">
<Label>{header}</Label>
<div className="body1">
<div className="h1 mV5">
{getGTUSymbol()}
<Form.GtuInput
defaultValue={initial}
Expand Down
8 changes: 4 additions & 4 deletions app/components/PrintButton/PrintButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import IconButton from '~/cross-app-components/IconButton';
import SimpleErrorModal, {
ModalErrorInput,
} from '~/components/SimpleErrorModal';
import { alreadyPrinting } from '~/constants/errorMessages.json';
import errorMessages from '~/constants/errorMessages.json';
import { RootState } from '~/store/store';
import { setPrinting } from '~/features/MiscSlice';

Expand Down Expand Up @@ -63,16 +63,16 @@ export default function PrintButton({
.catch((error) =>
setShowError({
show: true,
header: 'Print Failed',
header: 'Print failed',
content: error.toString(),
})
)
.finally(() => dispatch(setPrinting(false)));
}
return setShowError({
show: true,
header: 'Already Printing',
content: alreadyPrinting,
header: 'Already printing',
content: errorMessages.alreadyPrinting,
});
}}
/>
Expand Down
2 changes: 1 addition & 1 deletion app/components/PrintFormat/ScheduledTransfer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ function PrintFormatScheduledTransfer({
{table(
<thead>
<tr>
<th>Release Time</th>
<th>Release time</th>
<th>Amount</th>
</tr>
</thead>,
Expand Down
2 changes: 1 addition & 1 deletion app/components/TransactionHash.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export default function TransactionHashView({ transaction }: Props) {

return (
<>
<h5>Transaction Hash</h5>
<h5>Transaction hash</h5>
{transactionHash}
</>
);
Expand Down
Loading

0 comments on commit f68df84

Please sign in to comment.