Set exchange currency: USD
This commit is contained in:
parent
fed3e41047
commit
e1cdf1222f
@ -1,7 +1,7 @@
|
||||
const floGlobals = {
|
||||
blockchain: "FLO",
|
||||
marketID: "FMxYC7gYZhouzqtHZukGnPiQ8nvG4CMzXM",
|
||||
currency: "rupee"
|
||||
currency: "USD"
|
||||
};
|
||||
|
||||
('object' === typeof module) ? module.exports = floGlobals : null;
|
||||
@ -236,7 +236,7 @@ function verifyConvert() {
|
||||
verifyTx.token(r.floID, r.in_txid, keys.sink_groups.CONVERT, true).then(({ amount }) => {
|
||||
if (r.amount !== amount)
|
||||
throw ([true, "Transaction amount mismatched in blockchain"]);
|
||||
conversion_rates.BTC_INR().then(rate => {
|
||||
conversion_rates.BTC_USD().then(rate => {
|
||||
blockchain.convertToCoin.init(r.floID, "BTC", amount, rate, r.id)
|
||||
}).catch(error => console.error(error))
|
||||
}).catch(error => {
|
||||
@ -249,7 +249,7 @@ function verifyConvert() {
|
||||
verifyTx.BTC(r.floID, r.in_txid, keys.sink_groups.CONVERT).then(quantity => {
|
||||
if (r.quantity !== quantity)
|
||||
throw ([true, "Transaction quantity mismatched in blockchain"]);
|
||||
conversion_rates.BTC_INR().then(rate => {
|
||||
conversion_rates.BTC_USD().then(rate => {
|
||||
blockchain.convertFromCoin.init(r.floID, quantity, rate, r.id)
|
||||
}).catch(error => console.error(error))
|
||||
}).catch(error => {
|
||||
|
||||
@ -70,7 +70,7 @@ function getPoolAvailability(coin) {
|
||||
coin_net += r.coin_val;
|
||||
cash_net -= r.cash_val;
|
||||
}
|
||||
BTC_INR().then(rate => {
|
||||
BTC_USD().then(rate => {
|
||||
coin_net = coin_net * rate;
|
||||
let cash_availability = cash_net - coin_net * MIN_FUND,
|
||||
coin_availability = (coin_net - cash_net * MIN_FUND) / rate;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user