From fc5d434017d423be0e24f1e7f24a99997d28e36e Mon Sep 17 00:00:00 2001 From: Amaury Martiny Date: Wed, 20 Jun 2018 15:48:47 +0200 Subject: [PATCH 1/4] Smaller font size (fix #60) --- .../src/assets/sass/components/_account.scss | 26 ++----------------- 1 file changed, 2 insertions(+), 24 deletions(-) diff --git a/packages/light-react/src/assets/sass/components/_account.scss b/packages/light-react/src/assets/sass/components/_account.scss index 855590f1..e4258ad9 100644 --- a/packages/light-react/src/assets/sass/components/_account.scss +++ b/packages/light-react/src/assets/sass/components/_account.scss @@ -13,7 +13,7 @@ canvas { display: block; - height: (ms(0) * 1.3) + 1rem !important; + height: (ms(0) * 1.3) + 1rem !important; width: auto !important; } } @@ -32,29 +32,7 @@ .account_address { font-family: $mono; color: $grey; - font-size: ms(-2); + font-size: ms(-2) * 0.9; // 0.9 is ugly here line-height: ms(-2) * 1.3; } - - &.-placeholder { - .account_avatar_placeholder, .account_name_placeholder, .account_address_placeholder { - background: rgba($faint,0.5); - } - - .account_avatar_placeholder { - width: (ms(0) * 1.3) + 1rem; - height: (ms(0) * 1.3) + 1rem; - } - - .account_name_placeholder { - width: 100%; - height: ms(0) * 1.2; - margin-bottom: 0.325rem; - } - - .account_address_placeholder { - width: 100%; - height: ms(-2) * 1.1; - } - } } -- GitLab From 7ac99cb7809cc6a1bb2b73b31cce95503f358593 Mon Sep 17 00:00:00 2001 From: Amaury Martiny Date: Wed, 20 Jun 2018 16:59:11 +0200 Subject: [PATCH 2/4] Fix send bug with BigNumber (fix #64) --- packages/light-react/package.json | 1 + packages/light-react/src/stores/sendStore.js | 5 ++++- yarn.lock | 4 ++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/packages/light-react/package.json b/packages/light-react/package.json index 54b6b94f..11d54f77 100644 --- a/packages/light-react/package.json +++ b/packages/light-react/package.json @@ -38,6 +38,7 @@ "@parity/api": "^2.1.22", "@parity/light.js": "https://github.com/parity-js/light.js#9646ce15d9dd9c4cf11776ddd613d5bd86016f94", "@parity/shared": "^3.0.2", + "bignumber.js": "^7.2.1", "is-electron": "^2.1.0", "light-hoc": "^0.1.0", "light-ui": "^0.1.0", diff --git a/packages/light-react/src/stores/sendStore.js b/packages/light-react/src/stores/sendStore.js index 9ec560f6..5a1ac63c 100644 --- a/packages/light-react/src/stores/sendStore.js +++ b/packages/light-react/src/stores/sendStore.js @@ -5,6 +5,7 @@ import abi from '@parity/shared/lib/contracts/abi/eip20'; import { action, computed, observable } from 'mobx'; +import { BigNumber } from 'bignumber.js'; import { blockNumber$, makeContract$, post$ } from '@parity/light.js'; import { isAddress } from '@parity/api/lib/util/address'; import noop from 'lodash/noop'; @@ -176,7 +177,9 @@ class SendStore { return { args: [ this.tx.to, - (this.tx.amount * 10 ** this.token.decimals).toString() + new BigNumber(this.tx.amount).multipliedBy( + new BigNumber(10).pow(this.token.decimals) + ) ], options: { gasPrice: toWei(this.tx.gasPrice, 'shannon') // shannon == gwei diff --git a/yarn.lock b/yarn.lock index f87b8cc3..b6dda5a6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2472,6 +2472,10 @@ bignumber.js@4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-4.1.0.tgz#db6f14067c140bd46624815a7916c92d9b6c24b1" +bignumber.js@^7.2.1: + version "7.2.1" + resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-7.2.1.tgz#80c048759d826800807c4bfd521e50edbba57a5f" + binary-extensions@^1.0.0: version "1.11.0" resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.11.0.tgz#46aa1751fb6a2f93ee5e689bb1087d4b14c6c205" -- GitLab From 7fcba2bfb9b4936712afc0c9428612f685b13c30 Mon Sep 17 00:00:00 2001 From: Amaury Martiny Date: Wed, 20 Jun 2018 17:15:06 +0200 Subject: [PATCH 3/4] Add etherscan link earlier --- packages/light-react/src/Send/Sent/Sent.js | 36 +++++++++++++------ .../light-react/src/stores/healthStore.js | 2 +- 2 files changed, 26 insertions(+), 12 deletions(-) diff --git a/packages/light-react/src/Send/Sent/Sent.js b/packages/light-react/src/Send/Sent/Sent.js index c09bfae7..ef5c046d 100644 --- a/packages/light-react/src/Send/Sent/Sent.js +++ b/packages/light-react/src/Send/Sent/Sent.js @@ -23,8 +23,7 @@ const MIN_CONFIRMATIONS = 6; class Sent extends Component { render () { const { - chainName, - sendStore: { confirmations, txStatus } + sendStore: { confirmations } } = this.props; return ( @@ -37,22 +36,15 @@ class Sent extends Component {

{this.renderTitle()}

{this.renderDescription()}

+

{this.renderLink()}

{confirmations >= MIN_CONFIRMATIONS && ( -