Skip to content

Commit

Permalink
+ add settle button for DEXBOT tokens
Browse files Browse the repository at this point in the history
+ add Dalmata, BCCX to Listing vote
+ fix bug for modal listing vote
+ fix translates
  • Loading branch information
serdrdoor committed Sep 14, 2022
1 parent 009ae29 commit aff60a7
Show file tree
Hide file tree
Showing 14 changed files with 94 additions and 17 deletions.
Binary file added app/assets/coins-logo/bccx.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion app/assets/coins-logo/coins.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ 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!./idna.png");
require("file-loader?name=coins-logo/[name].png!./zec.png");
require("file-loader?name=coins-logo/[name].png!./hive.png");
require("file-loader?name=coins-logo/[name].png!./rev.png");
Expand All @@ -25,5 +25,7 @@ require("file-loader?name=coins-logo/[name].png!./ojx.png");
require("file-loader?name=coins-logo/[name].png!./donr.png");
require("file-loader?name=coins-logo/[name].png!./bat.png");
require("file-loader?name=coins-logo/[name].png!./bam.png");
require("file-loader?name=coins-logo/[name].png!./dc.png");
require("file-loader?name=coins-logo/[name].png!./bccx.png");

require("file-loader?name=coins-logo/[name].png!./pzm.png");
Binary file added app/assets/coins-logo/dc.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
10 changes: 8 additions & 2 deletions app/assets/locales/locale-en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1135,7 +1135,7 @@
}
},
"fees": {
"title": "Fee Schedule"
"title": "Fees"
},
"footer": {
"listing": "Token Listing",
Expand Down Expand Up @@ -3069,7 +3069,7 @@
"tu2": "101-300 (4000 DONATE)",
"tu3": "301-500 (5000 DONATE)",
"tu4": "500-1000 (7000 DONATE)",
"tu5": "1001 и ниже (10000 DONATE)",
"tu5": "1001 and below (10000 DONATE)",
"t3": "For BEP20 / ERC20 / TRC20 tokens the amount is also determined by the list above, however, for those below the top 300, the target amount will be 5000 DONATE."
},
"rules": {
Expand All @@ -3084,5 +3084,11 @@
},
"end": "Good luck with your project and welcome to "
}
},
"dexbot": {
"settle": "Settling will allow you to exchange your DEXBOT for USDT. Settling happens on the nearest SUNDAY after settle request.",
"modal": {
"header": "Settle "
}
}
}
2 changes: 1 addition & 1 deletion app/assets/locales/locale-fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -1108,7 +1108,7 @@
}
},
"fees": {
"title": "Fee Schedule"
"title": "Fees"
},
"footer": {
"advanced_settings": "Advanced settings",
Expand Down
2 changes: 1 addition & 1 deletion app/assets/locales/locale-ko.json
Original file line number Diff line number Diff line change
Expand Up @@ -1107,7 +1107,7 @@
}
},
"fees": {
"title": "Fee Schedule"
"title": "Fees"
},
"footer": {
"advanced_settings": "Advanced settings",
Expand Down
8 changes: 7 additions & 1 deletion app/assets/locales/locale-ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -1154,7 +1154,7 @@
}
},
"fees": {
"title": "Прейскурант комиссий"
"title": "Комиссии блокчейна"
},
"footer": {
"listing": "Листинг",
Expand Down Expand Up @@ -3103,5 +3103,11 @@
},
"end": "Удачи вашим проектам и добро пожаловать на "
}
},
"dexbot": {
"settle": "Погашение позволит вам обменять ваши DEXBOT на USDT с задержкой до ближайшего ВС.",
"modal": {
"header": "Погасить "
}
}
}
18 changes: 17 additions & 1 deletion app/branding.js
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,7 @@ export function getListingCoins() {
//soon: true, (for TON example)
{
name: "Idena",
ticker: "DNA",
ticker: "IDNA",
page: "https://www.idena.io",
account: "rudex-idena",
goal: 10000,
Expand Down Expand Up @@ -612,6 +612,22 @@ export function getListingCoins() {
account: "rudex-bam",
goal: 5000,
votes: 0
},
{
name: "Dalmata Coin",
ticker: "DC",
page: "https://dalmatacoin.com",
account: "rudex-dalmata",
goal: 5000,
votes: 0
},
{
name: "BlockChainCoinX",
ticker: "BCCX",
page: "https://blockchaincoin.dev",
account: "rudex-bccx",
goal: 10000,
votes: 0
}

//Disabled
Expand Down
49 changes: 49 additions & 0 deletions app/components/Account/AccountPortfolioList.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import Icon from "../Icon/Icon";
import PulseIcon from "../Icon/PulseIcon";
import utils from "common/utils";
import SendModal from "../Modal/SendModal";
import SendModalDEXBOT from "../Listing/DonateSendModal";
import SettingsActions from "actions/SettingsActions";
import SettleModal from "../Modal/SettleModal";
import DepositModal from "../Modal/DepositModal";
Expand Down Expand Up @@ -356,6 +357,12 @@ class AccountPortfolioList extends React.Component {
});
}

triggerSendDEXBOT(asset) {
this.setState({send_asset: asset}, () => {
if (this.send_modal_dexbot) this.send_modal_dexbot.show();
});
}

_onSettleAsset(id, e) {
e.preventDefault();
this.setState({
Expand Down Expand Up @@ -1073,6 +1080,23 @@ class AccountPortfolioList extends React.Component {
);
}

if (asset.get("symbol") == "DEXBOT") {
settleLink = (
<a
onClick={this.triggerSendDEXBOT.bind(
this,
asset.get("id")
)}
>
<Icon
name="settle"
title="icons.settle"
className="icon-14px"
/>
</a>
);
}

let preferredAsset = ChainStore.getAsset(preferredUnit);

let marketId = asset.get("symbol") + "_" + preferredUnit;
Expand Down Expand Up @@ -1173,9 +1197,17 @@ class AccountPortfolioList extends React.Component {
>
<div className="inline-block">{settleLink}</div>
</Tooltip>
) : asset.get("symbol") == "DEXBOT" ? (
<Tooltip
placement="bottom"
title={counterpart.translate("dexbot.settle")}
>
<div className="inline-block">{settleLink}</div>
</Tooltip>
) : (
emptyCell
),
//emptyCell
burn: !isBitAsset ? (
<a
style={{marginRight: 0}}
Expand Down Expand Up @@ -1419,6 +1451,22 @@ class AccountPortfolioList extends React.Component {
);
}

_renderSendModalDEXBOT() {
return (
<SendModalDEXBOT
id="send_modal_dexbot"
refCallback={e => {
if (e) this.send_modal_dexbot = e;
}}
from_name={this.props.account.get("name")}
to_name={"dexbot"}
asset_id={this.state.send_asset || "1.3.0"}
ticker={"DEXBOT"}
header={"dexbot.modal.header"}
/>
);
}

_renderBorrowModal() {
if (
!this.state.borrow ||
Expand Down Expand Up @@ -1497,6 +1545,7 @@ class AccountPortfolioList extends React.Component {
toggleSortOrder={this.toggleSortOrder}
>
{this._renderSendModal()}
{this._renderSendModalDEXBOT()}
{(this.state.isSettleModalVisible ||
this.state.isSettleModalVisibleBefore) &&
this._renderSettleModal()}
Expand Down
10 changes: 4 additions & 6 deletions app/components/Listing/CoinCardListing.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ class CoinCardListing extends React.Component {
to_name={coin.account ? coin.account : from_name}
asset_id={"1.3.2"}
ticker={coin.ticker}
header={"listing.modal.header2"}
/>
<div className="listingAsset">
<div className="listingAssetCard">
Expand Down Expand Up @@ -117,10 +118,8 @@ class CoinCardListing extends React.Component {
/>
</Button>
) : (
<Button
title={counterpart.translate(
"listing.modal.header2"
)}
<a
className={".ant-btn buttonDonate"}
onClick={this.triggerSend.bind(
this,
"1.3.2",
Expand All @@ -135,8 +134,7 @@ class CoinCardListing extends React.Component {
title="listing.modal.header2"
className="icon-14x"
/>
{/*<Translate content="listing.donate"/>*/}
</Button>
</a>
)}
</div>
)}
Expand Down
2 changes: 1 addition & 1 deletion app/components/Listing/DonateSendModal.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ class DonateSendModal extends SendModal {
? "listing.modal_header"
: "listing.modal.need_buy_donate"
}*/
content={"listing.modal.header2"}
content={this.props.header}
wallet_name={getWalletName()}
/>
{this.props.ticker}
Expand Down
4 changes: 2 additions & 2 deletions app/components/Listing/ListingPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ class ListingPage extends React.Component {
<Translate content="listing.texts.text4.t2" />
{DonateLink()}
<Translate content="listing.texts.text4.t3" />
<span
{/* <span
style={{
border: "1px solid #00a9e0",
padding: "4px 3px 3px 4px",
Expand All @@ -355,7 +355,7 @@ class ListingPage extends React.Component {
}}
>
{this.data.donateTokenName}
</span>
</span>*/}
<Button className={"buttonDonate"}>
<Icon
style={{
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "RuDEX3-light",
"version": "3.3.220728",
"version": "3.3.220914",
"description": "Advanced wallet interface for the Graphene financial blockchain.",
"homepage": "https://github.com/blckchnd/rudex-ui",
"author": "RuDEX Team <[email protected]>",
Expand Down

0 comments on commit aff60a7

Please sign in to comment.