-
- }
+
diff --git a/packages/fether-react/src/assets/sass/components/_account.scss b/packages/fether-react/src/assets/sass/components/_account.scss
index dd6d9bb0734398e6ec03c61f6d9ed7c09a41e799..a5a8f370e0ea06a4186f26377a9d8d8621a3c082 100644
--- a/packages/fether-react/src/assets/sass/components/_account.scss
+++ b/packages/fether-react/src/assets/sass/components/_account.scss
@@ -39,6 +39,7 @@
.account_name {
color: $black;
font-weight: 500;
+ margin-bottom: 0.1rem;
}
.account_address {
diff --git a/packages/fether-react/src/stores/sendStore.spec.js b/packages/fether-react/src/stores/sendStore.spec.js
index c0d8113cd350bfa1f1daf7d0c07f08cbe2e060cd..3eb0bab6cc64a5179ebb25bbc6c65a66200c7d9b 100644
--- a/packages/fether-react/src/stores/sendStore.spec.js
+++ b/packages/fether-react/src/stores/sendStore.spec.js
@@ -37,13 +37,6 @@ jest.mock('./parityStore', () => ({
}
}));
-jest.mock('./tokensStore', () => ({
- tokens: {
- ETH: { decimals: 18 },
- foo: { decimals: 18 }
- }
-}));
-
const mockTx = {
amount: 0.01, // In Ether or in token
gasPrice: 4, // in Gwei
@@ -117,9 +110,13 @@ describe('method send', () => {
sendStore.setTx(mockTx);
});
- test.skip('should call transfer$ if the token is Erc20 and subscribe to it', () => {
+ test('should call makeContract$ if the token is Erc20 ', () => {
sendStore.send(mockErc20Token);
- expect(sendStore.contract.transfer$).toHaveBeenCalled();
+ expect(lightJs.makeContract$).toHaveBeenCalled();
+ });
+
+ test.skip('should call transfer$ if the token is Erc20 and subscribe to it', () => {
+ // TODO
});
test('should call post$ if the token is ETH and subscribe to it', () => {
diff --git a/packages/fether-ui/package.json b/packages/fether-ui/package.json
index 9d676770c8ce5416e6e0c3892da5877a2213d7f4..54c8a4b87a2ac607bf2e147b6af76df5f1dde371 100644
--- a/packages/fether-ui/package.json
+++ b/packages/fether-ui/package.json
@@ -33,7 +33,6 @@
"dependencies": {
"react-blockies": "^1.3.0",
"react-content-loader": "^3.1.2",
- "react-tooltip": "^3.6.1",
"semantic-ui-css": "^2.3.2",
"semantic-ui-react": "^0.81.3"
},
diff --git a/packages/fether-ui/src/AccountCard/Address/Address.js b/packages/fether-ui/src/AccountCard/Address/Address.js
index 9c1c5edb955f5bfe548d50c2b9739f86fa288e59..7aa7ab89941f58e83c344f5dffd40f3169bc2f54 100644
--- a/packages/fether-ui/src/AccountCard/Address/Address.js
+++ b/packages/fether-ui/src/AccountCard/Address/Address.js
@@ -18,7 +18,7 @@ export const Address = ({ address, short, ...otherProps }) => (
address
)
) : (
-
+
)}
);
diff --git a/packages/fether-ui/src/ClickToCopy/ClickToCopy.js b/packages/fether-ui/src/ClickToCopy/ClickToCopy.js
index ceb3180a31b89ee47360f4f3a9ddcf9b51bf09fc..b6822c342ef2c67117167690bab41b09f3dde3ff 100644
--- a/packages/fether-ui/src/ClickToCopy/ClickToCopy.js
+++ b/packages/fether-ui/src/ClickToCopy/ClickToCopy.js
@@ -4,8 +4,9 @@
// SPDX-License-Identifier: BSD-3-Clause
import React, { PureComponent } from 'react';
+import { Popup } from 'semantic-ui-react';
import PropTypes from 'prop-types';
-import ReactTooltip from 'react-tooltip';
+import 'semantic-ui-css/components/popup.min.css';
export class ClickToCopy extends PureComponent {
static defaultProps = {
@@ -21,10 +22,6 @@ export class ClickToCopy extends PureComponent {
copied: false
};
- componentWillUnmount () {
- window.clearTimeout(this.timeout);
- }
-
handleCopy = () => {
// https://hackernoon.com/copying-text-to-clipboard-with-javascript-df4d4988697f
// Note react-copy-to-clipboard created a bug, https://github.com/nkbt/react-copy-to-clipboard/issues/92
@@ -36,35 +33,27 @@ export class ClickToCopy extends PureComponent {
document.body.removeChild(el);
this.setState({ copied: true });
-
- // Show the copied state only for 1s
- if (this.timeout) {
- window.clearTimeout(this.timeout);
- }
- this.timeout = window.setTimeout(
- () => this.setState({ copied: false }),
- 1000
- );
};
- handleResetCopied = () => {};
+ handleResetCopied = () => this.setState({ copied: false });
render () {
- const { children, label, ...otherProps } = this.props;
+ const { children, label, textToCopy, ...otherProps } = this.props;
const { copied } = this.state;
return (
-