Compare commits

...

10 Commits

Author SHA1 Message Date
sairaj mote
807d8eaf7a Added navbar tooltips 2023-10-30 19:48:15 +05:30
sairaj mote
4d510d2d35 Fixed portfolio on-chain flo id issue 2023-10-30 19:45:49 +05:30
sairaj mote
bcee3a0da1 Merge branch 'master' of https://github.com/ranchimall/bitflo 2023-10-30 19:37:26 +05:30
sairaj mote
39d1ea8ce5 Fixed copy component issues 2023-10-30 19:37:00 +05:30
Vivek Teega
79f450a05f Changed the market ID to correct one for FLO BTC market 2023-10-30 18:29:39 +05:30
sairaj mote
94735e6049 bug fix 2023-09-24 03:06:21 +05:30
Vivek Teega
bbe7ae06e6 Added new Master node ID 2023-09-23 08:57:33 +00:00
sairaj mote
6b229dac96 Changed flosight link to blockbook 2023-07-18 19:50:35 +05:30
sairaj mote
7018602f48 minor changes 2023-07-18 18:43:09 +05:30
sairaj mote
0230b8dee3 Added help page 2023-07-17 15:14:26 +05:30
5 changed files with 63 additions and 15 deletions

View File

@ -8,7 +8,7 @@
<title>RanchiMall BitFlo</title>
<meta name="description" content="Trade FLO and FLO based RanchiMall tokens.">
<meta name="theme-color" content="#516beb" />
<script src="scripts/components.js" defer></script>
<script src="scripts/components.min.js" defer></script>
<link rel="stylesheet" href="css/main.min.css">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
@ -475,7 +475,7 @@
<div class="grid gap-1">
<div class="grid gap-0-3">
<h4>FLO</h4>
<sm-copy class="my-flo-address"> </sm-copy>
<sm-copy class="my-flo-address"></sm-copy>
</div>
<div class="h1" id="personal_flo_balance"></div>
</div>
@ -516,6 +516,9 @@
<b id="portfolio_asset__name"></b>
</div>
<div id="portfolio_asset__balance" class="flex flex-direction-column gap-1"></div>
<p>
* Deposits and withdrawals can be only made from/to signed in FLO/BTC address.
</p>
<fieldset id="portfolio_asset__actions" class="flex gap-0-3">
<button class="button flex-1" value="deposit">
Deposit
@ -553,9 +556,47 @@
<p>No exchange transactions</p>
</div>
</div>
<div id="help" class="mobile-page hidden grid gap-2">
<h1>Hey there! How can we help you today?</h1>
<div class="grid gap-0-5">
<h5>F.A.Qs</h5>
<div class="grid gap-0-5">
<details>
<summary class="interact">
<h4>
What type of exchange is this?
</h4>
<svg class="icon" xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24"
width="24px" fill="#000000">
<path d="M0 0h24v24H0V0z" fill="none" />
<path d="M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z" />
</svg>
</summary>
<p>This is an Open Order Book exchange, which means prices are decided by traders on the
platform.</p>
</details>
<details>
<summary class="interact">
<h4>
Who decides the price of assets?
</h4>
<svg class="icon" xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24"
width="24px" fill="#000000">
<path d="M0 0h24v24H0V0z" fill="none" />
<path d="M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z" />
</svg>
</summary>
<p>
Traders on the platform decide the price of assets. The price of an asset is the price
at which the last trade was executed.
</p>
</details>
</div>
</div>
</div>
</section>
<nav id="main_navbar" class="flex align-center">
<a href="#/exchange" class="main_navbar__item main_navbar__item--active interact">
<a href="#/exchange" class="main_navbar__item main_navbar__item--active interact" title="Exchange">
<svg class="icon" xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px"
fill="#000000">
<path d="M0 0h24v24H0z" fill="none" />
@ -563,7 +604,7 @@
</svg>
<div class="item__title">Exchange</div>
</a>
<a href="#/my_orders" class="main_navbar__item user-content hidden interact">
<a href="#/my_orders" class="main_navbar__item user-content hidden interact" title="My orders">
<svg class="icon" xmlns="http://www.w3.org/2000/svg" enable-background="new 0 0 24 24" height="24px"
viewBox="0 0 24 24" width="24px" fill="#000000">
<path d="M0,0h24v24H0V0z" fill="none" />
@ -578,7 +619,7 @@
</svg>
<div class="item__title">My orders</div>
</a>
<a href="#/market" class="main_navbar__item interact">
<a href="#/market" class="main_navbar__item interact" title="Market">
<svg class="icon" xmlns="http://www.w3.org/2000/svg" enable-background="new 0 0 24 24" height="24px"
viewBox="0 0 24 24" width="24px" fill="#000000">
<g>
@ -594,7 +635,7 @@
</svg>
<div class="item__title">Market</div>
</a>
<a href="#/portfolio" class="main_navbar__item user-content hidden interact">
<a href="#/portfolio" class="main_navbar__item user-content hidden interact" title="Portfolio">
<svg class="icon" xmlns="http://www.w3.org/2000/svg" enable-background="new 0 0 24 24" height="24px"
viewBox="0 0 24 24" width="24px" fill="#000000">
<rect fill="none" height="24" width="24" />
@ -603,11 +644,17 @@
</svg>
<div class="item__title">Portfolio</div>
</a>
<a href="#/help" class="main_navbar__item interact" title="Help">
<svg class="icon" xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px"
fill="#000000">
<path d="M0 0h24v24H0V0z" fill="none" />
<path
d="M11 18h2v-2h-2v2zm1-16C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm0-14c-2.21 0-4 1.79-4 4h2c0-1.1.9-2 2-2s2 .9 2 2c0 2-3 1.75-3 5h2c0-2.25 3-2.5 3-5 0-2.21-1.79-4-4-4z" />
</svg>
<div class="item__title">Help</div>
</a>
</nav>
</article>
<!--
* add warning to show if an order is not considered
-->
<sm-popup id="confirm_trade_popup">
<header slot="header" class="popup__header">
@ -1939,7 +1986,7 @@
entry.querySelector('.history-entry__token-action').textContent = `${type} ${asset}`
entry.querySelector('.history-entry__amount').textContent = amount
entry.querySelector('.history-entry__time').textContent = getFormattedTime(locktime)
entry.querySelector('.history-entry__txid').href = `https://flosight.duckdns.org/tx/${txid}`
entry.querySelector('.history-entry__txid').href = `https://blockbook.ranchimall.net/tx/${txid}`
return entry;
}
}
@ -2036,7 +2083,7 @@
function getLastTradePrice() {
return new Promise((resolve, reject) => {
floTradeAPI.getTradeList().then(tradeList => {
floGlobals.lastTradePrice = tradeList[0].unitValue || 0;
floGlobals.lastTradePrice = tradeList[0]?.unitValue || 0;
document.querySelectorAll('.flo-exchange-rate').forEach(element => {
element.textContent = `${floGlobals.lastTradePrice} ${floGlobals.currency}`
})
@ -2619,7 +2666,7 @@
`)
isShowingFloID = false
}
}, 1000 * 60);
}, 10000 * 60);
getRef("sink_id").value = acc.sinkID;
if (acc.subAdmin)
console.info("logged in as subAdmin");

File diff suppressed because one or more lines are too long

1
docs/scripts/components.min.js vendored Normal file

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,6 @@
const floGlobals = {
blockchain: "FLO",
marketID: "FKAEdnPfjXLHSYwrXQu377ugN4tXU7VGdf",
marketID: "FCVNCEVVExEY2f6C5xtJcX42tSqPMgj2eB",
currency: "BTC"
};

View File

@ -4,7 +4,7 @@
const tradeAPI = EXPORTS;
const DEFAULT = {
marketID: floGlobals.marketID || "FKAEdnPfjXLHSYwrXQu377ugN4tXU7VGdf",
marketID: floGlobals.marketID || "FCVNCEVVExEY2f6C5xtJcX42tSqPMgj2eB",
marketApp: "flo_btc",
currency: "BTC" //should come from blockchain config later
}