From 7cf1fccf05113c8becca49612b9505c52eb83ca5 Mon Sep 17 00:00:00 2001 From: Jonathan Rainville Date: Fri, 5 Jul 2019 10:57:34 -0400 Subject: [PATCH] feat: add txHash to license buys --- shared.chains.json | 32 +++++++++++++++++++ src/js/components/Offer/index.jsx | 1 - src/js/pages/ArbitrationLicense/index.jsx | 5 ++- .../pages/Escrow/components/EscrowDetail.jsx | 2 +- src/js/pages/License/index.jsx | 4 ++- src/js/pages/MyProfile/components/Offers.jsx | 4 +-- 6 files changed, 42 insertions(+), 6 deletions(-) diff --git a/shared.chains.json b/shared.chains.json index 210a22e1..0cfad6da 100644 --- a/shared.chains.json +++ b/shared.chains.json @@ -220,6 +220,38 @@ "0xfb29a9c44a7d2c0868b296a219ea7c45304230177bb447d50d404328ec90b5c7": { "name": "EscrowRelay", "address": "0x341D879610D39cD62eA18Ad60c9a80b1671a65C5" + }, + "0xeb56941153e5f25031e197f1c7455c17b547e57ae0eb2c8c1b5b4777864afc35": { + "name": "MiniMeTokenFactory", + "address": "0x2FA626D1e6E3C25199b1910D8FC0001816A23d05" + }, + "0x056a389c932c6c6d1dc57302146e38c42447aabb9bbbe0575dbbdad32e0849c2": { + "name": "SNT", + "address": "0xFB3a9083857E762521324C6b7510652810C9f564" + }, + "0xf597e44bd036b2603e4df1c15b719d294480b546450fc73de8216ef2c41dff31": { + "name": "StakingPool", + "address": "0x242923658F2971373F2939B2F1d26E12772fB4B3" + }, + "0x56b1a16432d9ebce4c086b65c46c73ccdeb19c6fbf909d1064af876fb607d6f3": { + "name": "SellerLicense", + "address": "0x6142F41C8625cad51FCac65aFcC28c73073CE9F6" + }, + "0x67908feb7a94ead9d6608ebfad8aeaa03dafb873e300f965da08c3a173b74064": { + "name": "ArbitrationLicense", + "address": "0x0498Ce7C8E701F8dCEbAcCa6423551C4c6deE3E7" + }, + "0x4ffeb2e75c73428557aff3a68798d4b38115423f708972d4af88b93bccdd8f47": { + "name": "MetadataStore", + "address": "0x532B354Ac40DbA05a71831ddeEFDD46eA8A507BB" + }, + "0xc3b90fd3ff2e104403c93038af9f74b28baeb4826b19cd538110687c52137fb4": { + "name": "Escrow", + "address": "0x219202F4cC20780E5f2087535bb37B190A4F672D" + }, + "0x9fd0142e15be7a1d542efa0b2c3a1234d5c8dc825d2de43a5b5047a56301bfd7": { + "name": "EscrowRelay", + "address": "0x0A00c773E74916833Bd591953Ff7e3cECD845033" } } } diff --git a/src/js/components/Offer/index.jsx b/src/js/components/Offer/index.jsx index beeeebfa..bffc8371 100644 --- a/src/js/components/Offer/index.jsx +++ b/src/js/components/Offer/index.jsx @@ -8,7 +8,6 @@ import {truncateTwo} from '../../utils/numbers'; import {calculateEscrowPrice} from '../../utils/transaction'; import classnames from 'classnames'; import {addressCompare} from '../../utils/address'; -import NoArbitratorWarning from '../NoArbitratorWarning'; const Offer = ({offer, offers, withDetail, prices, userAddress}) => { let user; diff --git a/src/js/pages/ArbitrationLicense/index.jsx b/src/js/pages/ArbitrationLicense/index.jsx index 1316cacc..21b30c32 100644 --- a/src/js/pages/ArbitrationLicense/index.jsx +++ b/src/js/pages/ArbitrationLicense/index.jsx @@ -12,6 +12,7 @@ import BuyButton from '../License/components/BuyButton'; import Balance from '../License/components/Balance'; import Loading from '../../components/Loading'; import ErrorInformation from '../../components/ErrorInformation'; +import license from "../../features/license"; const LICENSE_TOKEN_SYMBOL = 'SNT'; @@ -53,7 +54,7 @@ class ArbitrationLicense extends Component { } if (this.props.isLoading) { - return ; + return ; } return ( @@ -77,6 +78,7 @@ ArbitrationLicense.propTypes = { isLicenseOwner: PropTypes.bool, isLoading: PropTypes.bool, error: PropTypes.string, + txHash: PropTypes.string, sntToken: PropTypes.object, licensePrice: PropTypes.number, loadLicensePrice: PropTypes.func, @@ -90,6 +92,7 @@ const mapStateToProps = state => { address: network.selectors.getAddress(state) || '', isLicenseOwner: arbitration.selectors.isLicenseOwner(state), isLoading: arbitration.selectors.isLoading(state), + txHash: arbitration.selectors.txHash(state), error: arbitration.selectors.error(state), sntToken: network.selectors.getTokenBySymbol(state, LICENSE_TOKEN_SYMBOL), licensePrice: arbitration.selectors.getLicensePrice(state) diff --git a/src/js/pages/Escrow/components/EscrowDetail.jsx b/src/js/pages/Escrow/components/EscrowDetail.jsx index 324837d4..4a68ec90 100644 --- a/src/js/pages/Escrow/components/EscrowDetail.jsx +++ b/src/js/pages/Escrow/components/EscrowDetail.jsx @@ -1,6 +1,6 @@ import React, {Fragment} from 'react'; import {Row, Col} from 'reactstrap'; -import {faQuestionCircle, faExclamationTriangle} from "@fortawesome/free-solid-svg-icons"; +import {faQuestionCircle} from "@fortawesome/free-solid-svg-icons"; import PropTypes from 'prop-types'; import RoundedIcon from "../../../ui/RoundedIcon"; import moment from "moment"; diff --git a/src/js/pages/License/index.jsx b/src/js/pages/License/index.jsx index f5309ff9..cba200a3 100644 --- a/src/js/pages/License/index.jsx +++ b/src/js/pages/License/index.jsx @@ -67,7 +67,7 @@ class License extends Component { } if (this.props.isLoading) { - return ; + return ; } return ( @@ -89,6 +89,7 @@ License.propTypes = { buyLicense: PropTypes.func, isLicenseOwner: PropTypes.bool, isLoading: PropTypes.bool, + txHash: PropTypes.string, error: PropTypes.string, sntToken: PropTypes.object, licensePrice: PropTypes.oneOfType([ @@ -104,6 +105,7 @@ const mapStateToProps = state => { return { isLicenseOwner: license.selectors.isLicenseOwner(state), isLoading: license.selectors.isLoading(state), + txHash: license.selectors.txHash(state), error: license.selectors.error(state), sntToken: network.selectors.getTokenBySymbol(state, LICENSE_TOKEN_SYMBOL), licensePrice: license.selectors.getLicensePrice(state) diff --git a/src/js/pages/MyProfile/components/Offers.jsx b/src/js/pages/MyProfile/components/Offers.jsx index 53cc4dfd..77c50fe1 100644 --- a/src/js/pages/MyProfile/components/Offers.jsx +++ b/src/js/pages/MyProfile/components/Offers.jsx @@ -4,7 +4,7 @@ import { Row, Card, CardHeader, CardBody, Button} from 'reactstrap'; import { Link } from "react-router-dom"; import { withNamespaces } from 'react-i18next'; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; -import { faArrowRight, faEllipsisV, faExclamationTriangle } from "@fortawesome/free-solid-svg-icons"; +import { faArrowRight, faEllipsisV } from "@fortawesome/free-solid-svg-icons"; import ConfirmDialog from "../../../components/ConfirmDialog"; import {CURRENCY_DATA} from "../../../constants/currencies"; import {zeroAddress} from '../../../utils/address'; @@ -77,7 +77,7 @@ class Offers extends Component { {offer.arbitrator === zeroAddress &&
} - {offer.arbitrator !== zeroAddress &&
{offer.arbitratorData.username} ({offer.arbitrator})
} + {offer.arbitrator !== zeroAddress &&
{offer.arbitratorData.username} ({offer.arbitrator})
}