diff --git a/app/api/apiConfig.js b/app/api/apiConfig.js index 123569e842..06a073bf57 100644 --- a/app/api/apiConfig.js +++ b/app/api/apiConfig.js @@ -22,7 +22,7 @@ export const openledgerAPIs = { }; export const rudexAPIs = { - BASE: "https://gateway.rudex.org/api/v3_0", + BASE: "https://gateway.rudex.org/api/rudex", COINS_LIST: "/coins", NEW_DEPOSIT_ADDRESS: "/simple-api/initiate-trade" }; diff --git a/app/assets/asset-symbols/rudex.pzm.png b/app/assets/asset-symbols/rudex.pzm.png new file mode 100644 index 0000000000..1275b9ccb7 Binary files /dev/null and b/app/assets/asset-symbols/rudex.pzm.png differ diff --git a/app/assets/asset-symbols/symbols.js b/app/assets/asset-symbols/symbols.js index 95604f82ab..c16c153a55 100644 --- a/app/assets/asset-symbols/symbols.js +++ b/app/assets/asset-symbols/symbols.js @@ -19,6 +19,7 @@ require("file-loader?name=asset-symbols/[name].png!./rudex.eth.png"); require("file-loader?name=asset-symbols/[name].png!./rudex.golos.png"); require("file-loader?name=asset-symbols/[name].png!./rudex.steem.png"); require("file-loader?name=asset-symbols/[name].png!./rudex.smoke.png"); +require("file-loader?name=asset-symbols/[name].png!./rudex.pzm.png"); require("file-loader?name=asset-symbols/[name].png!./rudex.dgb.png"); require("file-loader?name=asset-symbols/[name].png!./rudex.gbg.png"); diff --git a/app/assets/coins-logo/coins.js b/app/assets/coins-logo/coins.js index bd7d2cca8d..2ab68679e4 100644 --- a/app/assets/coins-logo/coins.js +++ b/app/assets/coins-logo/coins.js @@ -9,5 +9,6 @@ require("file-loader?name=coins-logo/[name].png!./neo.png"); require("file-loader?name=coins-logo/[name].png!./ltc.png"); require("file-loader?name=coins-logo/[name].png!./doge.png"); require("file-loader?name=coins-logo/[name].png!./dash.png"); +require("file-loader?name=coins-logo/[name].png!./dna.png"); require("file-loader?name=coins-logo/[name].png!./pzm.png"); diff --git a/app/assets/coins-logo/dna.png b/app/assets/coins-logo/dna.png new file mode 100644 index 0000000000..59f72cd1a2 Binary files /dev/null and b/app/assets/coins-logo/dna.png differ diff --git a/app/assets/locales/locale-en.json b/app/assets/locales/locale-en.json index 47d6c68aaf..ab770b7f8a 100644 --- a/app/assets/locales/locale-en.json +++ b/app/assets/locales/locale-en.json @@ -1707,6 +1707,7 @@ "no_assets": "No withdrawable assets available", "no_estimate": "No estimate available for this object", "no_gateways": "Sorry, but there are no gateways available to handle this withdrawal", + "public_key": "Public key", "quantity": "Quantity", "submit": "Withdraw", "withdraw": "Withdraw" @@ -2988,6 +2989,7 @@ "submit_request": "Submit request", "add_coin": "Add Coin", "donate_progress": "Crowdfunding progress", + "listed": "Listed", "get_donate_tokens": "Get ", "token": " token", "loading": "Please wait, loading...", diff --git a/app/assets/locales/locale-ru.json b/app/assets/locales/locale-ru.json index 10decd4e85..e3675d3cce 100644 --- a/app/assets/locales/locale-ru.json +++ b/app/assets/locales/locale-ru.json @@ -1686,6 +1686,7 @@ "no_assets": "Нет доступных активов для вывода", "no_estimate": "Для этого объекта нет доступных оценок", "no_gateways": "Извините, для обработки этой операции вывода нет доступных шлюзов", + "public_key": "Public key", "quantity": "Количество", "submit": "Вывести", "withdraw": "Вывод" @@ -2967,6 +2968,7 @@ "submit_request": "Подать заявку", "add_coin": "Добавить монету", "donate_progress": "Прогресс краудфандинга", + "listed": "Размещенные активы", "get_donate_tokens": "Получить ", "token": " токен", "loading": "Подождите, идёт загрузка", diff --git a/app/branding.js b/app/branding.js index c732306fa4..4177d71438 100644 --- a/app/branding.js +++ b/app/branding.js @@ -148,7 +148,8 @@ export function getMyMarketsQuotes() { "RUDEX.GOLOS", "RUDEX.STEEM", "RUDEX.WLS", - "RUDEX.SMOKE" + "RUDEX.SMOKE", + "RUDEX.PZM" //"RUDEX.GRC", //"RUDEX.GBG", @@ -181,6 +182,7 @@ export function getFeaturedMarkets(quotes = []) { ["RUBLE", "RUDEX.ETH"], ["RUBLE", "RUDEX.EOS"], ["RUBLE", "RUDEX.USDT"], + ["RUBLE", "RUDEX.PZM"], ["RUDEX.USDT", "RUDEX.BTC"], ["RUDEX.USDT", "RUDEX.ETH"], @@ -191,6 +193,7 @@ export function getFeaturedMarkets(quotes = []) { ["RUDEX.USDT", "RUDEX.SMOKE"], ["RUDEX.USDT", "RUDEX.WLS"], ["RUDEX.USDT", "RUBLE"], + ["RUDEX.USDT", "RUDEX.PZM"], ["RUDEX.BTC", "RUDEX.ETH"], ["RUDEX.BTC", "RUDEX.EOS"], @@ -201,6 +204,7 @@ export function getFeaturedMarkets(quotes = []) { ["RUDEX.BTC", "PPY"], ["RUDEX.BTC", "DONATE"], ["RUDEX.BTC", "USDT"], + ["RUDEX.BTC", "RUDEX.PZM"], ["BTS", "RUDEX.GOLOS"], ["BTS", "RUDEX.STEEM"], @@ -209,7 +213,8 @@ export function getFeaturedMarkets(quotes = []) { ["BTS", "RUDEX.ETH"], ["BTS", "RUDEX.USDT"], ["BTS", "RUDEX.WLS"], - ["BTS", "RUDEX.SMOKE"] + ["BTS", "RUDEX.SMOKE"], + ["BTS", "RUDEX.PZM"] //["BTS", "DONATE"] ].filter(a => { if (!quotes.length) return true; @@ -362,6 +367,18 @@ export function getListingCoins() { goal: 10000, votes: 0 }, + { + name: "Idena", + ticker: "DNA", + account: "rudex-idena", + goal: 10000, + votes: 0 + } + ]; +} + +export function getListedCoins() { + return [ { name: "PRIZM", ticker: "PZM", diff --git a/app/components/DepositWithdraw/rudex/RuDexGateway.jsx b/app/components/DepositWithdraw/rudex/RuDexGateway.jsx index 2f1a9ba125..34acd45355 100644 --- a/app/components/DepositWithdraw/rudex/RuDexGateway.jsx +++ b/app/components/DepositWithdraw/rudex/RuDexGateway.jsx @@ -241,6 +241,9 @@ class RuDexGateway extends React.Component { receive_asset={coin.symbol} receive_coin_type={coin.symbol.toLowerCase()} supports_output_memos={coin.supportsMemos} + supportsPublicKey={ + coin.supportsPublicKey || false + } memoType={coin.memoType} min_amount={coin.minAmount} gateFee={coin.gateFee} diff --git a/app/components/DepositWithdraw/rudex/RuDexGatewayDepositRequest.jsx b/app/components/DepositWithdraw/rudex/RuDexGatewayDepositRequest.jsx index 7855b53a2f..36e6213c33 100644 --- a/app/components/DepositWithdraw/rudex/RuDexGatewayDepositRequest.jsx +++ b/app/components/DepositWithdraw/rudex/RuDexGatewayDepositRequest.jsx @@ -33,6 +33,7 @@ class RuDexGatewayDepositRequest extends React.Component { deprecated_message: PropTypes.string, action: PropTypes.string, supports_output_memos: PropTypes.bool.isRequired, + supportsPublicKey: PropTypes.bool.isRequired, memoType: PropTypes.string, min_amount: PropTypes.number, gateFee: PropTypes.number, @@ -572,6 +573,9 @@ class RuDexGatewayDepositRequest extends React.Component { output_supports_memos={ this.props.supports_output_memos } + output_supportsPublicKey={ + this.props.supportsPublicKey + } memo_prefix={withdraw_memo_prefix} modal_id={withdraw_modal_id} min_amount={this.props.min_amount} diff --git a/app/components/DepositWithdraw/rudex/RuDexWithdrawModal.jsx b/app/components/DepositWithdraw/rudex/RuDexWithdrawModal.jsx index 5e116a052b..f0245c690f 100644 --- a/app/components/DepositWithdraw/rudex/RuDexWithdrawModal.jsx +++ b/app/components/DepositWithdraw/rudex/RuDexWithdrawModal.jsx @@ -28,6 +28,7 @@ class RuDexWithdrawModal extends React.Component { url: PropTypes.string, output_wallet_type: PropTypes.string, output_supports_memos: PropTypes.bool.isRequired, + output_supportsPublicKey: PropTypes.bool.isRequired, amount_to_withdraw: PropTypes.string, balance: ChainTypes.ChainObject, min_amount: PropTypes.number, @@ -50,6 +51,10 @@ class RuDexWithdrawModal extends React.Component { withdraw_address_selected: WithdrawAddresses.getLast( props.output_wallet_type ), + withdraw_publicKey: "", + withdraw_publicKey_not_empty: this.props.output_supportsPublicKey + ? false + : true, memo: "", withdraw_address_first: true, empty_withdraw_value: false, @@ -245,16 +250,37 @@ class RuDexWithdrawModal extends React.Component { this._validateAddress(new_withdraw_address); } + onWithdrawPublicKeyChanged(e) { + let new_withdraw_publicKey = e.target.value.trim(); + this.setState({ + withdraw_publicKey: new_withdraw_publicKey, + withdraw_publicKey_not_empty: + new_withdraw_publicKey != "" ? true : false + }); + } + _validateAddress(new_withdraw_address, props = this.props) { validateAddress({ url: props.url, walletType: props.output_wallet_type, newAddress: new_withdraw_address - }).then(isValid => { + }).then(json => { + if (typeof json === "undefined") { + json = {isValid: false}; + } if (this.state.withdraw_address === new_withdraw_address) { this.setState({ withdraw_address_check_in_progress: false, - withdraw_address_is_valid: isValid + withdraw_address_is_valid: json.isValid, + withdraw_publicKey: json.hasOwnProperty("publicKey") + ? json.publicKey + : "", + withdraw_publicKey_not_empty: this.props + .output_supportsPublicKey + ? json.hasOwnProperty("publicKey") + ? true + : false + : true }); } }); @@ -283,12 +309,12 @@ class RuDexWithdrawModal extends React.Component { withdraw_amount < this.props.min_amount / utils.get_asset_precision(this.props.asset_precision); - console.log( + /* console.log( "X", withdraw_amount, this.props.min_amount / - utils.get_asset_precision(this.props.asset_precision) - ); + utils.get_asset_precision(this.props.asset_precision) + );*/ this.setState({minAmountError: lessThanMinimum}); return lessThanMinimum; } @@ -353,6 +379,9 @@ class RuDexWithdrawModal extends React.Component { this.props.output_coin_type + ":" + this.state.withdraw_address + + (this.props.output_supportsPublicKey + ? ":" + this.state.withdraw_publicKey + : "") + (this.state.memo ? ":" + new Buffer(this.state.memo, "utf-8") : ""), @@ -415,6 +444,9 @@ class RuDexWithdrawModal extends React.Component { this.props.output_coin_type + ":" + this.state.withdraw_address + + (this.props.output_supportsPublicKey + ? ":" + this.state.withdraw_publicKey + : "") + (this.state.memo ? ":" + new Buffer(this.state.memo, "utf-8") : ""), @@ -483,6 +515,7 @@ class RuDexWithdrawModal extends React.Component { _getAvailableAssets(state = this.state) { const {from_account, feeStatus} = state; + function hasFeePoolBalance(id) { if (feeStatus[id] === undefined) return true; return feeStatus[id] && feeStatus[id].hasPoolBalance; @@ -552,7 +585,7 @@ class RuDexWithdrawModal extends React.Component { } render() { - let {withdraw_address_selected, memo} = this.state; + let {withdraw_address_selected, withdraw_publicKey, memo} = this.state; let storedAddress = WithdrawAddresses.get( this.props.output_wallet_type ); @@ -842,6 +875,34 @@ class RuDexWithdrawModal extends React.Component { {invalid_address_message} + {/* for PublicKey input (ex.PRIZM) */} + {this.props.output_supportsPublicKey ? ( +
+ +
+
+ +
+
+
+ ) : null} + {/* Memo input */} {withdraw_memo} @@ -851,7 +912,8 @@ class RuDexWithdrawModal extends React.Component { disabled={ this.state.error || this.state.balanceError || - this.state.minAmountError + this.state.minAmountError || + !this.state.withdraw_publicKey_not_empty } type="primary" onClick={this.onSubmit.bind(this)} diff --git a/app/components/Listing/CoinCardListing.jsx b/app/components/Listing/CoinCardListing.jsx index ec48e047c3..ee32f9f97e 100644 --- a/app/components/Listing/CoinCardListing.jsx +++ b/app/components/Listing/CoinCardListing.jsx @@ -15,13 +15,6 @@ class CoinCardListing extends React.Component { super(props); this.props.coin.votes = 0; - - this.state = { - key: this.props.key, - rank: this.props.rank, - - coin: this.props.coin - }; } triggerSend(asset) { @@ -90,42 +83,46 @@ class CoinCardListing extends React.Component { {coin.goal} -
-
- - :  + {coin.listed ? ( + "" + ) : ( +
+
+ + :  +
+ {coin.votes} + {coin.soon === true ? ( + + { + + } +   Donate + + ) : ( + + { + + } +   Donate + + )}
- {coin.votes} - {coin.soon === true ? ( - - { - - } -   Donate - - ) : ( - - { - - } -   Donate - - )} -
+ )}
@@ -138,14 +135,18 @@ class CoinCardListing extends React.Component {
-
- { - - } -
+ {coin.listed ? ( + "" + ) : ( +
+ { + + } +
+ )}
diff --git a/app/components/Listing/ListingPage.css b/app/components/Listing/ListingPage.css index e0590b70ab..53cfec389e 100644 --- a/app/components/Listing/ListingPage.css +++ b/app/components/Listing/ListingPage.css @@ -212,10 +212,10 @@ body .listing_button .ant-btn[disabled]:hover { border-radius: 3px; } -@media only screen and (max-width: 768px) { +@media only screen and (max-width: 468px) { .listingTable__cell.listingTableVotes a { position: absolute; - right: 100px; + right: 20px; } } diff --git a/app/components/Listing/ListingPage.jsx b/app/components/Listing/ListingPage.jsx index af9ac4ed1e..d6c3c5768c 100644 --- a/app/components/Listing/ListingPage.jsx +++ b/app/components/Listing/ListingPage.jsx @@ -5,7 +5,7 @@ import {Apis} from "bitsharesjs-ws"; import {FetchChain} from "bitsharesjs"; import CoinCardListing from "./CoinCardListing"; -import {getListingCoins} from "../../branding"; +import {getListingCoins, getListedCoins} from "../../branding"; import {Tabs, Tab} from "../Utility/Tabs"; import AssetImage from "../Utility/AssetImage"; import Translate from "react-translate-component"; @@ -18,7 +18,8 @@ class ListingPage extends React.Component { super(); this.state = { ListingNotice1Informed: false, - coins: [] + coins: [], + updating: true }; } @@ -42,6 +43,15 @@ class ListingPage extends React.Component { }); } + componentDidMount() { + setInterval(() => this._getBalances(), 1000); + } + + shouldComponentUpdate(nextProps, nextState) { + if (nextState.updating == false) return true; + return false; + } + render() { let current_locale = SettingsStore.getState().settings.get("locale"); @@ -92,8 +102,8 @@ class ListingPage extends React.Component { >
- {this.state.coins.length === - 0 ? ( + {this.state.updating === + true ? (
@@ -108,16 +118,40 @@ class ListingPage extends React.Component {
+ {/* LISTED*/} + +