diff --git a/app/assets/locales/locale-en.json b/app/assets/locales/locale-en.json index ab770b7f8a..abfee0ac84 100644 --- a/app/assets/locales/locale-en.json +++ b/app/assets/locales/locale-en.json @@ -36,6 +36,10 @@ "not_yours": "Not your account", "unknown": "Unknown account" }, + "notify": { + "copy_memo": "Memo copied", + "copy_address": "Address copied" + }, "estimate_value": "Estimated Account value", "existing_accounts": "Existing Accounts", "existing_user": "Existing user", @@ -810,6 +814,12 @@ "vol_short": "Vol", "volume": "Volume", "volume_24": "24hr Volume", + "scam_alert": { + "text1": "WARNING: ", + "text2": "Potentially dangerous trading pair! Assets on this market are ", + "text3": "UNrelated ", + "text4": "to RuDEX – by trading on this market you claim responsibility for potential losses of your funds" + }, "worth_less_settlement_warning": "The current market price of {market_link} is higher than settle price", "your_price": "Your Call Price", "zoom": "Zoom", diff --git a/app/assets/locales/locale-ru.json b/app/assets/locales/locale-ru.json index e3675d3cce..19621972a2 100644 --- a/app/assets/locales/locale-ru.json +++ b/app/assets/locales/locale-ru.json @@ -36,6 +36,10 @@ "not_yours": "Не ваш аккаунт", "unknown": "Неизвестный аккаунт" }, + "notify": { + "copy_memo": "Мемо скопировано", + "copy_address": "Адрес скопирован" + }, "estimate_value": "Ориентировочная стоимость аккаунта", "existing_accounts": "Существующие аккаунты", "existing_user": "Существующий пользователь", @@ -810,6 +814,12 @@ "vol_short": "Объем", "volume": "Объем", "volume_24": "Суточный объем", + "scam_alert": { + "text1": "ВНИМАНИЕ: ", + "text2": "Потенциально опасная торговая пара! Активы, представленные на данном рынке ", + "text3": "НЕ имеют ", + "text4": "отношения к RuDEX. Осуществляя торговлю на этом рынке вы принимаете ответственность за потенциальные риски потери ваших средств." + }, "worth_less_settlement_warning": "Текущая рыночная цена на {market_link} выше, чем расчётная цена", "your_price": "Ваша цена досрочного погашения", "zoom": "Приблизить", diff --git a/app/assets/stylesheets/themes/_theme-template.scss b/app/assets/stylesheets/themes/_theme-template.scss index 5ee7133759..6556ad4a9d 100644 --- a/app/assets/stylesheets/themes/_theme-template.scss +++ b/app/assets/stylesheets/themes/_theme-template.scss @@ -266,8 +266,8 @@ } .settings-input { /* !important to overwrite styles for Inputs on User Settings. By default inputs take styles from - .block-list and it uses on many places. To keep everything OK and do not break something I just do - overwrite for Inputs on settings and keep default styles for inputs on another places. */ +.block-list and it uses on many places. To keep everything OK and do not break something I just do +overwrite for Inputs on settings and keep default styles for inputs on another places. */ color: $settings-select-color !important; height: 36px !important; background-color: $settings-select-bg !important; @@ -2677,13 +2677,16 @@ } } } + .rc-time-picker-panel { z-index: 9999 !important; } + .midnightTheme .gate_fee .amount-selector { width: 100%; display: inline-block; } + .midnightTheme .gate_fee .right-selector { text-align: right; width: 26%; @@ -2691,19 +2694,23 @@ color: #adadad; text-transform: uppercase; } + .midnightTheme .gate_fee .right-selector .right-selector-input { text-align: right; width: 100%; } + .clear-text, .search-wrapper { position: relative; } + .market-filter-input, .clear-text, .search-wrapper { position: relative; } + .clear-text { top: 10px; right: -30px; @@ -2714,6 +2721,7 @@ outline: 0; cursor: pointer; } + .clear-text:after { content: "X"; display: block; @@ -2734,9 +2742,11 @@ font-size: 12px; cursor: pointer; } + .market-filter-input:not(:valid) ~ .clear-text { display: none; } + .header-container { display: flex; align-items: center; @@ -2775,6 +2785,7 @@ line-height: normal; } } + .local-wallet-menu { // top: 50px!important; .table-cell { @@ -2787,6 +2798,7 @@ } } } + .app-menu { flex: 0; } @@ -2807,6 +2819,7 @@ text-align: right; } } + #qr_scanner_modal { > section { width: 100%; @@ -2816,6 +2829,7 @@ justify-content: center; } } + @media screen and (max-width: 640px) { .responsive-list > .help-content > ul { height: 300px; @@ -2833,6 +2847,7 @@ } } } + div.customizable-column--selector { position: absolute; right: 1rem; @@ -2844,11 +2859,24 @@ div.customizable-column--selector { } } } + div.customizable-column--selector--dropdown { ul.ant-select-dropdown-menu-vertical { max-height: 100% !important; } } + .ant-table-tbody > tr.ant-table-row-selected td { background-color: #4f596633 !important; } + +.potencial_scam_markets { + margin: 0 10% 15px 0; + width: 90%; + font-weight: bold; + font-size: 20px; + line-height: 1.25em; + text-align: center; + border: 1px solid red; + padding: 5px; +} diff --git a/app/branding.js b/app/branding.js index 4177d71438..5be9602c48 100644 --- a/app/branding.js +++ b/app/branding.js @@ -215,7 +215,6 @@ export function getFeaturedMarkets(quotes = []) { ["BTS", "RUDEX.WLS"], ["BTS", "RUDEX.SMOKE"], ["BTS", "RUDEX.PZM"] - //["BTS", "DONATE"] ].filter(a => { if (!quotes.length) return true; return quotes.indexOf(a[0]) !== -1; @@ -257,7 +256,7 @@ export function getAssetHideNamespaces() { * @returns {boolean} */ export function allowedGateway(gateway) { - const allowedGateways = ["RUDEX", "GDEX"]; + const allowedGateways = ["RUDEX"]; if (!gateway) { // answers the question: are any allowed? return allowedGateways.length > 0; diff --git a/app/components/Account/AccountDepositWithdraw.jsx b/app/components/Account/AccountDepositWithdraw.jsx index fd21fa773c..697cc22547 100644 --- a/app/components/Account/AccountDepositWithdraw.jsx +++ b/app/components/Account/AccountDepositWithdraw.jsx @@ -15,13 +15,10 @@ import HelpContent from "../Utility/HelpContent"; import AccountStore from "stores/AccountStore"; import SettingsStore from "stores/SettingsStore"; import SettingsActions from "actions/SettingsActions"; -//import {openledgerAPIs} from "api/apiConfig"; import RuDexGateway from "../DepositWithdraw/rudex/RuDexGateway"; import GatewayStore from "stores/GatewayStore"; import AccountImage from "../Account/AccountImage"; -//import BitsparkGateway from "../DepositWithdraw/bitspark/BitsparkGateway"; -import GdexGateway from "../DepositWithdraw/gdex/GdexGateway"; -//import XbtsxGateway from "../DepositWithdraw/xbtsx/XbtsxGateway"; + import PropTypes from "prop-types"; import DepositModal from "../Modal/DepositModal"; import WithdrawModal from "../Modal/WithdrawModalNew"; @@ -176,24 +173,11 @@ class AccountDepositWithdraw extends React.Component { }); } - renderServices( - openLedgerGatewayCoins, - rudexGatewayCoins, - bitsparkGatewayCoins, - xbtsxGatewayCoins - ) { + renderServices(rudexGatewayCoins) { //let services = ["Openledger (OPEN.X)", "BlockTrades (TRADE.X)", "Transwiser", "BitKapital"]; let serList = []; let {account} = this.props; - let { - olService, - btService, - rudexService, - bitsparkService, - xbtsxService, - citadelService, - RudexNotice1Informed - } = this.state; + let {rudexService, RudexNotice1Informed} = this.state; let agreement_ru = "https://rudex.freshdesk.com/support/solutions/articles/35000138247-cоглашение-об-оказании-услуг-шлюза"; @@ -287,56 +271,6 @@ class AccountDepositWithdraw extends React.Component { ) }); - serList.push({ - name: "GDEX", - identifier: "GDEX", - template: ( -
- -
- ) - }); - - /* serList.push({ - name: "BitSpark (SPARKDEX.X)", - identifier: "SPARKDEX", - template: ( -
-
- -
- - {bitsparkService === "gateway" && - bitsparkGatewayCoins.length ? ( - - ) : null} -
- ) - });*/ - return serList; } @@ -344,16 +278,6 @@ class AccountDepositWithdraw extends React.Component { let {account, servicesDown} = this.props; let {activeService} = this.state; - let openLedgerGatewayCoins = this.props.openLedgerBackedCoins - .map(coin => { - return coin; - }) - .sort((a, b) => { - if (a.symbol < b.symbol) return -1; - if (a.symbol > b.symbol) return 1; - return 0; - }); - let rudexGatewayCoins = this.props.rudexBackedCoins .map(coin => { return coin; @@ -364,32 +288,7 @@ class AccountDepositWithdraw extends React.Component { return 0; }); - let bitsparkGatewayCoins = this.props.bitsparkBackedCoins - .map(coin => { - return coin; - }) - .sort((a, b) => { - if (a.symbol < b.symbol) return -1; - if (a.symbol > b.symbol) return 1; - return 0; - }); - - let xbtsxGatewayCoins = this.props.xbtsxBackedCoins - .map(coin => { - return coin; - }) - .sort((a, b) => { - if (a.symbol < b.symbol) return -1; - if (a.symbol > b.symbol) return 1; - return 0; - }); - - let services = this.renderServices( - openLedgerGatewayCoins, - rudexGatewayCoins, - bitsparkGatewayCoins, - xbtsxGatewayCoins - ); + let services = this.renderServices(rudexGatewayCoins); const serviceNames = []; let options = services.map((services_obj, index) => { diff --git a/app/components/DepositWithdraw/rudex/RuDexGatewayDepositRequest.jsx b/app/components/DepositWithdraw/rudex/RuDexGatewayDepositRequest.jsx index 36e6213c33..0a120c65aa 100644 --- a/app/components/DepositWithdraw/rudex/RuDexGatewayDepositRequest.jsx +++ b/app/components/DepositWithdraw/rudex/RuDexGatewayDepositRequest.jsx @@ -17,6 +17,8 @@ import CopyToClipboard from "react-copy-to-clipboard"; import {Modal} from "bitshares-ui-style-guide"; import {availableGateways} from "lib/common/gateways"; +import {Notification} from "bitshares-ui-style-guide"; + class RuDexGatewayDepositRequest extends React.Component { static propTypes = { gateway: PropTypes.string, @@ -76,6 +78,16 @@ class RuDexGatewayDepositRequest extends React.Component { }; } + _notify(su) { + let strN = "copy_address"; + + if (su == "memo") strN = "copy_memo"; + + Notification.success({ + message: counterpart.translate("account.notify." + strN) + }); + } + // componentWillMount() { // let account_name = this.props.account.get("name"); // let receive_address = this.deposit_address_cache.getCachedInputAddress(this.props.gateway, account_name, this.props.deposit_coin_type, this.props.receive_coin_type); @@ -419,14 +431,20 @@ class RuDexGatewayDepositRequest extends React.Component { style={{paddingTop: 10}} > {deposit_address_fragment ? ( - + this._notify("address")} + >
Copy address
) : null} {memoText ? ( - + this._notify("memo")} + >
Copy memo
) : null} diff --git a/app/components/Exchange/ExchangeHeader.jsx b/app/components/Exchange/ExchangeHeader.jsx index d84bbe46fd..9cfbfe324d 100644 --- a/app/components/Exchange/ExchangeHeader.jsx +++ b/app/components/Exchange/ExchangeHeader.jsx @@ -64,6 +64,42 @@ export default class ExchangeHeader extends React.Component { this.props.onToggleMarketPicker(selectedMarketPickerAsset); } + _checkPotencialScamMarket(quote, base) { + let coins = [ + "BTS", + + "BTC", + "CNY", + "USD", + "EUR", + "RUBLE", + "KRW", + "GBP", + "GOLD", + "SILVER", + + "PPY", + "DONATE" + ]; + + //1. RUDEX.X <=> RUDEX.X + if (quote.indexOf("RUDEX.") !== -1 && base.indexOf("RUDEX.") !== -1) + return false; + + //2. coins <=> coins + if (coins.indexOf(quote) !== -1 && coins.indexOf(base) !== -1) + return false; + + //3. RUDEX.X <=> coins + if ( + (quote.indexOf("RUDEX.") !== -1 && coins.indexOf(base) !== -1) || + (base.indexOf("RUDEX.") !== -1 && coins.indexOf(quote) !== -1) + ) + return false; + + return true; + } + render() { const { quoteAsset, @@ -459,6 +495,7 @@ export default class ExchangeHeader extends React.Component { /> ) : null} + + + {this._checkPotencialScamMarket( + quoteSymbol, + baseSymbol + ) === true ? ( +
+ + {counterpart.translate( + "exchange.scam_alert.text1" + )} + + + {counterpart.translate( + "exchange.scam_alert.text2" + )} + + + {counterpart.translate( + "exchange.scam_alert.text3" + )} + + + {counterpart.translate( + "exchange.scam_alert.text4" + )} + +
+ ) : null} diff --git a/app/components/Listing/ListingPage.jsx b/app/components/Listing/ListingPage.jsx index d6c3c5768c..c372a7a7ca 100644 --- a/app/components/Listing/ListingPage.jsx +++ b/app/components/Listing/ListingPage.jsx @@ -396,16 +396,17 @@ class ListingPage extends React.Component { to={"/market/DONATE_RUDEX.BTC"} > + + + + DONATE + + - - - DONATE - -

diff --git a/app/lib/common/RuDexDepositAddressCache.js b/app/lib/common/RuDexDepositAddressCache.js index c802455e88..766936186f 100644 --- a/app/lib/common/RuDexDepositAddressCache.js +++ b/app/lib/common/RuDexDepositAddressCache.js @@ -58,6 +58,8 @@ class RuDexDepositAddressCache { address, memo ) { + if (address === "unknown") return; + let wallet = WalletDb.getWallet(); if (!wallet) return null; wallet.deposit_keys = wallet.deposit_keys || {}; diff --git a/app/lib/common/gateways.js b/app/lib/common/gateways.js index 7257b1147e..1c2b8b4af6 100644 --- a/app/lib/common/gateways.js +++ b/app/lib/common/gateways.js @@ -106,17 +106,6 @@ export const availableGateways = { }, landing: "https://rudex.org/", wallet: "https://market.rudex.org/" - }, - GDEX: { - id: "GDEX", - name: "GDEX", - baseAPI: gdex2APIs, - isEnabled: _isEnabled("GDEX"), - options: { - enabled: false, - selected: false - }, - wallet: "https://www.gdex.io/" } }; diff --git a/package-lock.json b/package-lock.json index 77d2fe3cb5..9e2182529b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "RuDEX3-light", - "version": "3.3.200416", + "version": "3.3.200429", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index a82b932a9e..d4dbe84207 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "RuDEX3-light", - "version": "3.3.200416", + "version": "3.3.200429", "description": "Reference UI to showcase all features of the BitShares blockchain.", "homepage": "https://github.com/bitshares/bitshares-ui", "author": "BitShares UI Worker ",