Skip to content

Commit

Permalink
Add BUSD stable coin and code refactor (#296)
Browse files Browse the repository at this point in the history
* Add BUSD stable coin and code refactor

* Add pair LTO/BUSD

* Codefix

* Templates static folder code refactor

* Templates static folder code refactor

* Update CHANGELOG.md
  • Loading branch information
pantunes authored Nov 18, 2021
1 parent 37a3cc9 commit 6519d59
Show file tree
Hide file tree
Showing 28 changed files with 170 additions and 110 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ All changes will be registered here per release.
## [0.8.6] - Current date
Added `Algorand / ALGO` Project/Token.
Added `Dfinity / ICP` Project/Token.
Added `BUSD` stable coin.
Code refactoring and fixes.

## [0.8.6] - 2021-07-03
Fix `COINBASE` Exchange Rate limits that would result in an HTTP 429 Too Many Requests.
Expand Down
2 changes: 1 addition & 1 deletion xtcryptosignals/client/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class Config(object):

SECRET_KEY = None

SERVER_API_BASE_URL = "http://127.0.0.1:5000/"
SERVER_API_BASE_URL = "http://127.0.0.1:5050/"

SESSION_COOKIE_HTTPONLY = True
SESSION_COOKIE_SAMESITE = "Lax"
Expand Down
Binary file added xtcryptosignals/client/static/imgs/logos/BUSD.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
32 changes: 18 additions & 14 deletions xtcryptosignals/client/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
<meta charset="UTF-8">
<title>XTCryptoSignals - {% block title %}{% endblock %}</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/png" href="/static/imgs/favicon-16x16.png" sizes="16x16">
<link rel="icon" type="image/png" href="/static/imgs/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="{{url_for('static', filename='imgs/favicon-16x16.png')}}" sizes="16x16">
<link rel="icon" type="image/png" href="{{url_for('static', filename='imgs/favicon-32x32.png')}}" sizes="32x32">
<!--open graph protocol -->
<meta name="title" property="og:title" content="XTCryptoSignals"/>
<meta property="og:type" content="Crypto Platform Data Tools">
<meta name="image" property="og:image" content="//xtcryptosignals.com/static/imgs/logo_transparent.png"/>
<meta name="image" property="og:image" content="//xtcryptosignals.com/{{url_for('static', filename='imgs/logo_transparent.png')}}"/>
<meta name="description" property="og:description" content="Cryptocurrencies price data collection, price tickers, signals notifications, charts and automatic trading."/>
<meta property="og:url" content="//xtcryptosignals.com"/>
<meta name="author" content="Paulo Antunes">
Expand All @@ -19,11 +19,11 @@
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" type="text/css">
<link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css" type="text/css">
<link rel="stylesheet" href="//unpkg.com/[email protected]/nprogress.css" type="text/css">
<link rel="stylesheet" href="/static/css/skeleton/normalize.css" type="text/css">
<link rel="stylesheet" href="/static/css/skeleton/skeleton.css" type="text/css">
<link rel="stylesheet" href="/static/css/skeleton/custom.css" type="text/css">
<link rel="stylesheet" href="/static/css/custom.css" type="text/css">
<link rel="stylesheet" href="/static/css/darkmode.css" type="text/css">
<link rel="stylesheet" href="{{url_for('static', filename='css/skeleton/normalize.css')}}" type="text/css">
<link rel="stylesheet" href="{{url_for('static', filename='css/skeleton/skeleton.css')}}" type="text/css">
<link rel="stylesheet" href="{{url_for('static', filename='css/skeleton/custom.css')}}" type="text/css">
<link rel="stylesheet" href="{{url_for('static', filename='css/custom.css')}}" type="text/css">
<link rel="stylesheet" href="{{url_for('static', filename='css/darkmode.css')}}" type="text/css">
<!-- js -->
<script src="//cdnjs.cloudflare.com/ajax/libs/socket.io/3.0.4/socket.io.min.js" type="text/javascript"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js" type="text/javascript"></script>
Expand All @@ -36,12 +36,12 @@
<script src="//cdnjs.cloudflare.com/ajax/libs/moment-timezone/0.5.28/moment-timezone-with-data-10-year-range.min.js" type="text/javascript"></script>
<script src="//unpkg.com/[email protected]/nprogress.js" type="text/javascript"></script>
<!-- local -->
<script src="/static/js/modals.js" type="text/javascript"></script>
<script src="/static/js/actions.js" type="text/javascript"></script>
<script src="/static/js/formatters.js" type="text/javascript"></script>
<script src="/static/js/notify/styles/bootstrap.js" type="text/javascript"></script>
<script src="/static/js/jquery.key.js" type="text/javascript"></script>
<script src="/static/js/actions.key.js" type="text/javascript"></script>
<script src="{{url_for('static', filename='js/modals.js')}}" type="text/javascript"></script>
<script src="{{url_for('static', filename='js/actions.js')}}" type="text/javascript"></script>
<script src="{{url_for('static', filename='js/formatters.js')}}" type="text/javascript"></script>
<script src="{{url_for('static', filename='js/notify/styles/bootstrap.js')}}" type="text/javascript"></script>
<script src="{{url_for('static', filename='js/jquery.key.js')}}" type="text/javascript"></script>
<script src="{{url_for('static', filename='js/actions.key.js')}}" type="text/javascript"></script>

<!-- custom -->
<script type="text/javascript">
Expand All @@ -54,6 +54,10 @@
}
</script>

<script type="text/javascript">
const static_folder = "{{url_for('static', filename='imgs/logos/')}}"
</script>

<script type="text/javascript">
const csrf_token = "{{ csrf_token() }}";
$.ajaxSetup({
Expand Down
2 changes: 1 addition & 1 deletion xtcryptosignals/client/templates/error.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
{% block body %}
<div class="container">
<section class="header">
<img class="value-img" src="/static/imgs/not-found.png" />
<img class="value-img" src="{{url_for('static', filename='imgs/not-found.png')}}" />
<h5 class="title">Page is invalid - {{error}}</h5>
{% if frequency is defined %}
<h5 class="title"><small>Press <a href="{{url_for('ticker.ticker', frequency=frequency)}}#login">here</a> to login in the platform.</small></h5>
Expand Down
6 changes: 3 additions & 3 deletions xtcryptosignals/client/templates/exchange.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
$table.append(
"<tr>" +
"<td style='vertical-align: middle;'>" +
"<div class='coin-or-token one-coin'><img src='/static/imgs/logos/" + this.coin_token + ".png' alt='" + this.coin_token + "' title='" + this.coin_token + "'/></div></td>" +
"<div class='coin-or-token one-coin'><img src='" + static_folder + this.coin_token + ".png' alt='" + this.coin_token + "' title='" + this.coin_token + "'/></div></td>" +
"<td class='align-right'><span id='" + price_id + "'>" + price + "</span></td>" +
"<td class='align-right" + css + "'>" + _get_formatter(this.free, false).format(this.free) + "</td>" +
"<td class='align-right'>" + _get_formatter(this.locked, false).format(this.locked) + "</td>" +
Expand Down Expand Up @@ -104,8 +104,8 @@
$table.append(
"<tr " + css + ">" +
"<td style='padding-left: 8px; vertical-align: middle;'>" +
"<div class='coin-or-token one-coin'><img src='/static/imgs/logos/" + this.coin_token + ".png' alt='" + this.coin_token + "' title='" + this.coin_token + "'/></div>" +
"<div class='coin-or-token two-coin'><img src='/static/imgs/logos/" + this.pair + ".png' alt='" + this.pair + "' title='" + this.pair + "'/></div></td>" +
"<div class='coin-or-token one-coin'><img src='" + static_folder + this.coin_token + ".png' alt='" + this.coin_token + "' title='" + this.coin_token + "'/></div>" +
"<div class='coin-or-token two-coin'><img src='" + static_folder + this.pair + ".png' alt='" + this.pair + "' title='" + this.pair + "'/></div></td>" +
"<td class='align-right'>" + _get_formatter(this.price, false).format(this.price) + "</td>" +
"<td class='align-right'>" + _get_formatter(this.amount, false).format(this.amount) + "</td>" +
"<td class='align-right'>" + _get_formatter(this.filled, false).format(this.filled) + "%</td>" +
Expand Down
34 changes: 17 additions & 17 deletions xtcryptosignals/client/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@
<meta charset="UTF-8">
<title>XTCryptoSignals - Home</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/png" href="/static/imgs/favicon-16x16.png" sizes="16x16">
<link rel="icon" type="image/png" href="/static/imgs/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="{{url_for('static', filename='imgs/favicon-16x16.png')}}" sizes="16x16">
<link rel="icon" type="image/png" href="{{url_for('static', filename='imgs/favicon-32x32.png')}}" sizes="32x32">
<!--open graph protocol -->
<meta name="title" property="og:title" content="XTCryptoSignals"/>
<meta property="og:type" content="Crypto Platform Data Tools">
<meta name="image" property="og:image" content="//xtcryptosignals.com/static/imgs/logo_transparent.png"/>
<meta name="image" property="og:image" content="//xtcryptosignals.com/{{url_for('static', filename='imgs/logo_transparent.png')}}"/>
<meta name="description" property="og:description" content="Cryptocurrencies price data collection, price tickers, signals notifications, charts and automatic trading."/>
<meta property="og:url" content="//xtcryptosignals.com"/>
<meta name="author" content="Paulo Antunes">
<!-- css -->
<link rel='stylesheet' href='//fonts.googleapis.com/css?family=Raleway:400,300,600' type='text/css'>
<link rel="stylesheet" href="/static/css/skeleton/normalize.css" type="text/css">
<link rel="stylesheet" href="/static/css/skeleton/skeleton.css" type="text/css">
<link rel="stylesheet" href="/static/css/landing/custom.css" type="text/css">
<link rel="stylesheet" href="{{url_for('static', filename='css/skeleton/normalize.css')}}" type="text/css">
<link rel="stylesheet" href="{{url_for('static', filename='css/skeleton/skeleton.css')}}" type="text/css">
<link rel="stylesheet" href="{{url_for('static', filename='css/landing/custom.css')}}" type="text/css">
</head>

<body>
Expand All @@ -26,14 +26,14 @@
<div class="container">
<div class="row">
<div class="one-half column">
<h4 class="hero-heading"><img src="/static/imgs/logo_transparent_50x50.png" style="vertical-align: bottom; padding-right: 0.5rem;">XTCryptoSignals <small>v{{version}}</small></h4>
<h4 class="hero-heading"><img src="{{url_for('static', filename='imgs/logo_transparent_50x50.png')}}" style="vertical-align: bottom; padding-right: 0.5rem;">XTCryptoSignals <small>v{{version}}</small></h4>
<p>Open source project with cryptocurrencies price data collection, price tickers, telegram and web push notifications, many charts and automatic trading.</p>
<a class="button button-primary" href="{{url_for('ticker.ticker_coins_or_tokens', frequency=frequencies[0])}}">Check XTCryptoSignals</a>
<a class="button button-secondary" href="//t.me/xtcryptosignals">Join XTCryptoSignals Alerts in Telegram</a>
</div>
<div class="phones">
<img class="phone" src="/static/imgs/landing/mac1.png">
<img class="phone" src="/static/imgs/landing/mac2.png">
<img class="phone" src="{{url_for('static', filename='imgs/landing/mac1.png')}}">
<img class="phone" src="{{url_for('static', filename='imgs/landing/mac2.png')}}">
</div>
</div>
</div>
Expand Down Expand Up @@ -62,34 +62,34 @@ <h3 class="section-heading">Screenshots</h3>
<p class="section-description">&nbsp;</p>
<div class="row">
<div class="one-half column category">
<img class="u-max-full-width" src="/static/imgs/landing/1.png">
<img class="u-max-full-width" src="{{url_for('static', filename='imgs/landing/1.png')}}">
</div>
<div class="one-half column category">
<img class="u-max-full-width" src="/static/imgs/landing/2.png">
<img class="u-max-full-width" src="{{url_for('static', filename='imgs/landing/2.png')}}">
</div>
</div>
<div class="row">
<div class="one-half column category">
<img class="u-max-full-width" src="/static/imgs/landing/3.png">
<img class="u-max-full-width" src="{{url_for('static', filename='imgs/landing/3.png')}}">
</div>
<div class="one-half column category">
<img class="u-max-full-width" src="/static/imgs/landing/4.png">
<img class="u-max-full-width" src="{{url_for('static', filename='imgs/landing/4.png')}}">
</div>
</div>
<div class="row">
<div class="one-half column category">
<img class="u-max-full-width" src="/static/imgs/landing/5.png">
<img class="u-max-full-width" src="{{url_for('static', filename='imgs/landing/5.png')}}">
</div>
<div class="one-half column category">
<img class="u-max-full-width" src="/static/imgs/landing/6.png">
<img class="u-max-full-width" src="{{url_for('static', filename='imgs/landing/6.png')}}">
</div>
</div>
<div class="row">
<div class="one-half column category">
<img class="u-max-full-width" src="/static/imgs/landing/7.png">
<img class="u-max-full-width" src="{{url_for('static', filename='imgs/landing/7.png')}}">
</div>
<div class="one-half column category">
<img class="u-max-full-width" src="/static/imgs/landing/8.png">
<img class="u-max-full-width" src="{{url_for('static', filename='imgs/landing/8.png')}}">
</div>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion xtcryptosignals/client/templates/menu.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="navbar-spacer"></div>
<nav class="navbar">
<div style="float: left; padding: 8px"><a href="/"><img alt="XTCryptoSignals logo" title="XTCryptoSignals v{{version}}" src="/static/imgs/logo_transparent_50x50.png"></a></div>
<div style="float: left; padding: 8px"><a href="/"><img alt="XTCryptoSignals logo" title="XTCryptoSignals v{{version}}" src="{{url_for('static', filename='imgs/logo_transparent_50x50.png')}}"></a></div>
<div class="container">
<ul class="navbar-list">
<li class="navbar-item">
Expand Down
6 changes: 3 additions & 3 deletions xtcryptosignals/client/templates/notification.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@

{% block include_scripts_top %}

<script src="/static/js/site.js" type="text/javascript"></script>
<script src="{{url_for('static', filename='js/site.js')}}" type="text/javascript"></script>

<script type="text/javascript">
if ('serviceWorker' in navigator && 'PushManager' in window) {
navigator.serviceWorker.register("{{ url_for('static', filename='js/service-worker.js')}}").then(
navigator.serviceWorker.register("{{url_for('static', filename='js/service-worker.js')}}").then(
function (serviceWorkerRegistration) {
serviceWorkerRegistration.pushManager.subscribe({
userVisibleOnly: true,
Expand Down Expand Up @@ -60,7 +60,7 @@
$table.append(
"<tr id='" + this._id + "' style='cursor: pointer;'>" +
"<td style='vertical-align: middle;'>" +
"<div class=\"coin-or-token one-coin\"><img src='/static/imgs/logos/" + this.coin_token + ".png' alt='" + this.coin_token + "' title='" + this.coin_token + "'/></div></td>" +
"<div class=\"coin-or-token one-coin\"><img src='" + static_folder + this.coin_token + ".png' alt='" + this.coin_token + "' title='" + this.coin_token + "'/></div></td>" +
"<td>" + this.metric + "</td>" +
"<td>" + this.interval + "</td>" +
"<td class='align-right'>" + this.percentage + "%</td>" +
Expand Down
2 changes: 1 addition & 1 deletion xtcryptosignals/client/templates/portfolio.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
const p = _get_formatter(value.average_paid, false)
$table.append(
"<tr>" +
"<td style='vertical-align: middle;'><a href=\"/ticker/source/" + key + "/{{frequency}}\"><div class=\"coin-or-token one-coin\"><img src='/static/imgs/logos/" + key + ".png' alt='" + key + "' title='" + key + "'/></a></div></td>" +
"<td style='vertical-align: middle;'><a href=\"/ticker/source/" + key + "/{{frequency}}\"><div class=\"coin-or-token one-coin\"><img src='" + static_folder + key + ".png' alt='" + key + "' title='" + key + "'/></a></div></td>" +
"<td><a href='/ticker/" + pair.replace('-', '') + "/{{frequency}}'>" + pair + "</a> | <small><a href=/ticker/10s#" + exchange + ">" + exchange + "</a></small></td>" +
"<td class='align-right pf-current-price'><span id=\"" + prefix_id + _prefix_usdt + "{{frequency}}\">" + value.current_price + "</span></td>" +
"<td class='align-right pf-units'>" + get_units(value.units) + "</td>" +
Expand Down
4 changes: 2 additions & 2 deletions xtcryptosignals/client/templates/ticker/pair-frequency.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
<tr>
<td style="vertical-align: middle;">
<a href="{{url_for('ticker.token_frequency', coin_or_token=c, frequency=frequency)}}">
<div class="coin-or-token one-coin"><img src="/static/imgs/logos/{{c}}.png" alt="{{c}}" title="{{c}}"/></div>
<div class="coin-or-token two-coin"><img src="/static/imgs/logos/{{r}}.png" alt="{{r}}" title="{{r}}"/></div>
<div class="coin-or-token one-coin"><img src="{{url_for('static', filename='imgs/logos/' + c + '.png')}}" alt="{{c}}" title="{{c}}"/></div>
<div class="coin-or-token two-coin"><img src="{{url_for('static', filename='imgs/logos/' + r + '.png')}}" alt="{{r}}" title="{{r}}"/></div>
</a>
</td>
<td style="width: 100px;">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
{{ '<span class="label-token-type">stable</span>'|safe if is_stable else '' }}
{{ '<span class="label-token-type">defi</span>'|safe if is_defi else '' }}
<a href="{{url_for('ticker.token_frequency', coin_or_token=c, frequency=frequency)}}">
<div class="coin-or-token one-coin"><img src="/static/imgs/logos/{{c}}.png" alt="{{c}}" title="{{c}}"/></div>
<div class="coin-or-token one-coin"><img src="{{url_for('static', filename='imgs/logos/' + c + '.png')}}" alt="{{c}}" title="{{c}}"/></div>
</a>
</td>
<td style="width: 100px;">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ <h5>My Favourites</h5>
<tr>
<td style="vertical-align: middle;">
<a href="{{url_for('ticker.token_frequency', coin_or_token=c, frequency=frequency)}}">
<div class="coin-or-token one-coin"><img src="/static/imgs/logos/{{c}}.png" alt="{{c}}" title="{{c}}"/></div>
<div class="coin-or-token one-coin"><img src="{{url_for('static', filename='imgs/logos/' + c + '.png')}}" alt="{{c}}" title="{{c}}"/></div>
</a>
</td>
<td style="width: 100px;">
Expand Down
8 changes: 4 additions & 4 deletions xtcryptosignals/client/templates/ticker/ticker.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

{% block include_scripts_top %}
<script src="//code.highcharts.com/highcharts.js" type="text/javascript"></script>
<script src="/static/js/sparkline.js" type="text/javascript"></script>
<script src="/static/js/site.js" type="text/javascript"></script>
<script src="{{url_for('static', filename='js/sparkline.js')}}" type="text/javascript"></script>
<script src="{{url_for('static', filename='js/site.js')}}" type="text/javascript"></script>

<script type="text/javascript">
let timeleft = 1;
Expand Down Expand Up @@ -211,8 +211,8 @@
<tr>
<td style="vertical-align: middle;">
<a href="{{url_for('ticker.token_frequency', coin_or_token=c, frequency=frequency)}}">
<div class="coin-or-token one-coin"><img src="/static/imgs/logos/{{c}}.png" alt="{{c}}" title="{{c}}"/></div>
<div class="coin-or-token two-coin"><img src="/static/imgs/logos/{{r}}.png" alt="{{r}}" title="{{r}}"/></div>
<div class="coin-or-token one-coin"><img src="{{url_for('static', filename='imgs/logos/' + c + '.png')}}" alt="{{c}}" title="{{c}}"/></div>
<div class="coin-or-token two-coin"><img src="{{url_for('static', filename='imgs/logos/' + r + '.png')}}" alt="{{r}}" title="{{r}}"/></div>
</a>
</td>
<td style="width: 100px;">
Expand Down
Loading

0 comments on commit 6519d59

Please sign in to comment.