Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DDW-581] Replace ada symbol images with unicode character #1317

6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
Changelog
=========

## vNext

### Features

- Replaced ada symbol images with unicode character ([PR 1317](https://github.com/input-output-hk/daedalus/pull/1317))

## 0.13.0

### Features
Expand Down
6 changes: 3 additions & 3 deletions features/step_definitions/wallets-steps.js
Original file line number Diff line number Diff line change
Expand Up @@ -434,14 +434,14 @@ Then(/^the latest transaction should show:$/, async function (table) {
await this.client.waitForVisible('.Transaction_title');
let transactionTitles = await this.client.getText('.Transaction_title');
transactionTitles = [].concat(transactionTitles);
const expectedTransactionTitle = await this.intl(expectedData.title, { currency: 'ADA' });
const expectedTransactionTitle = await this.intl(expectedData.title, { currency: 'Ada' });
expect(expectedTransactionTitle).to.equal(transactionTitles[0]);
let transactionAmounts = await this.client.getText('.Transaction_amount');
transactionAmounts = [].concat(transactionAmounts);
// Transaction amount includes transaction fees so we need to
// substract them in order to get a match with expectedData.amountWithoutFees.
// NOTE: we use "add()" as this is outgoing transaction and amount is a negative value!
const transactionAmount = new BigNumber(transactionAmounts[0]);
const transactionAmount = new BigNumber(transactionAmounts[0].split(' ').shift());
const transactionAmountWithoutFees = transactionAmount.add(this.fees).toFormat(DECIMAL_PLACES_IN_ADA);
expect(expectedData.amountWithoutFees).to.equal(transactionAmountWithoutFees);
});
Expand All @@ -453,7 +453,7 @@ Then(/^the balance of "([^"]*)" wallet should be:$/, { timeout: 60000 }, async f
const receiverWallet = getWalletByName.call(this, walletName);
return this.client.waitUntil(async () => {
const receiverWalletBalance = await this.client.getText(`.SidebarWalletsMenu_wallets .Wallet_${receiverWallet.id} .SidebarWalletMenuItem_info`);
return receiverWalletBalance === `${expectedData.balance} ADA`;
return receiverWalletBalance === `${expectedData.balance} `;
}, 60000);
});

Expand Down

This file was deleted.

22 changes: 0 additions & 22 deletions source/renderer/app/assets/images/ada-symbol.inline.svg

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export default class AdaRedemptionSuccessOverlay extends Component<Props> {
<SVGInline svg={successIcon} className={styles.icon} />
<div className={styles.text}>
<h1 className={styles.headline}>{intl.formatMessage(messages.headline)}</h1>
<div className={styles.amount}>{amount} ADA</div>
<div className={styles.amount}>{amount} <span>&#8371;</span></div>
<Button
className={styles.confirmButton}
label={intl.formatMessage(messages.confirmButton)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@
.amount {
font-family: var(--font-medium);
font-size: 28px;

span {
font-family: var(--font-light);
}
}

.confirmButton {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { defineMessages, intlShape } from 'react-intl';
import SVGInline from 'react-svg-inline';
import classnames from 'classnames';
import adaSymbolBig from '../../../assets/images/ada-symbol-big-dark.inline.svg';
import adaSymbolSmallest from '../../../assets/images/ada-symbol-smallest-dark.inline.svg';
import BorderedBox from '../../widgets/BorderedBox';
import { DECIMAL_PLACES_IN_ADA } from '../../../config/numbersConfig';
import type { UnconfirmedAmount } from '../../../types/unconfirmedAmountType';
Expand Down Expand Up @@ -77,16 +76,17 @@ export default class WalletSummary extends Component<Props> {
<div className={styles.pendingConfirmation}>
{`${intl.formatMessage(messages.pendingIncomingConfirmationLabel)}`}
: {pendingAmount.incoming.toFormat(DECIMAL_PLACES_IN_ADA)}
<SVGInline svg={adaSymbolSmallest} className={styles.currencySymbolSmallest} />
&nbsp;&#8371;
</div>
)}
{pendingAmount.outgoing.greaterThan(0) && (
<div className={styles.pendingConfirmation}>
{`${intl.formatMessage(messages.pendingOutgoingConfirmationLabel)}`}
: {pendingAmount.outgoing.toFormat(DECIMAL_PLACES_IN_ADA)}
<SVGInline svg={adaSymbolSmallest} className={styles.currencySymbolSmallest} />
&nbsp;&#8371;
</div>
)}

</div>
) : null}

Expand Down
11 changes: 0 additions & 11 deletions source/renderer/app/components/wallet/summary/WalletSummary.scss
Original file line number Diff line number Diff line change
Expand Up @@ -52,17 +52,6 @@

.pendingConfirmation {
@extend %smallText;
& > .currencySymbolSmallest {
display: inline-block;
margin-left: 1px;
& > svg {
height: 10px;
width: 9px;
& > g > g {
stroke: var(--theme-icon-ada-summary-wallet-pending-confirmation-symbol-color);
}
}
}
}

.numberOfTransactions {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import SVGInline from 'react-svg-inline';
import classNames from 'classnames';
import styles from './Transaction.scss';
import TransactionTypeIcon from './TransactionTypeIcon.js';
import adaSymbol from '../../../assets/images/ada-symbol.inline.svg';
import arrow from '../../../assets/images/collapse-arrow.inline.svg';
import {
transactionStates,
Expand Down Expand Up @@ -211,7 +210,6 @@ export default class Transaction extends Component<Props> {

const status = intl.formatMessage(assuranceLevelTranslations[assuranceLevel]);
const currency = intl.formatMessage(globalMessages.currency);
const symbol = adaSymbol;

const transactionStateTag = () => {
if (isRestoreActive) return;
Expand Down Expand Up @@ -253,7 +251,7 @@ export default class Transaction extends Component<Props> {
// hide currency (we are showing symbol instead)
formattedWalletAmount(data.amount, false)
}
<SVGInline svg={symbol} className={styles.currencySymbol} />
<span>&nbsp;&#8371;</span>
</div>
</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,10 @@
letter-spacing: 1px;
margin-left: auto;
user-select: text;

span {
font-family: var(--font-light);
}
}

.pendingLabel, .failedLabel, .low, .medium, .high {
Expand Down
4 changes: 2 additions & 2 deletions source/renderer/app/i18n/global-messages.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ export default defineMessages({
},
unitAda: {
id: 'global.unit.ada',
defaultMessage: '!!!ADA',
defaultMessage: '!!!\u20B3',
description: 'Name for "ADA" unit.'
},
recoveryPhraseDialogTitle: {
Expand Down Expand Up @@ -148,7 +148,7 @@ export default defineMessages({
},
currency: {
id: 'environment.currency.ada',
defaultMessage: '!!!Ada',
defaultMessage: '!!!ADA',
description: 'Name for "Ada" unit.'
},
apiName: {
Expand Down
2 changes: 1 addition & 1 deletion source/renderer/app/i18n/locales/de-DE.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"cardano.node.update.notification.titleWithVersion": "!!!Cardano-Core update v{version} is available",
"cardano.node.update.notification.titleWithoutVersion": "!!!Cardano-Core update is available",
"environment.apiName.cardano": "!!!Cardano",
"environment.currency.ada": "!!!Ada",
"environment.currency.ada": "Ada",
"global.assuranceLevel.normal": "!!!Normal",
"global.assuranceLevel.strict": "!!!Strict",
"global.dialog.button.continue": "!!!Continue",
Expand Down