From 7c8d5f94b245cc5175c4f9d1201132f3cf4a2d60 Mon Sep 17 00:00:00 2001 From: Jonas-Taha El Sesiy Date: Wed, 9 Aug 2017 14:25:29 -0500 Subject: [PATCH] Update Readme, add BCH (#120) --- README.md | 12 +++++++++--- cryptocurrency/cryptocurrency | 5 +++-- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 91f1fe3..ae3ccfe 100644 --- a/README.md +++ b/README.md @@ -90,9 +90,15 @@ Converts Cryptocurrency based on realtime exchange rates -If you want to bypass to guided input you can pass in 3 arguments and it will run from there -ex.```currency [baseCurrency] [exchangeToCurrency] [amountBeingExchanged]``` -so a valid use case would be ```currency BTC USD 12.35``` +Run `cryptocurrency` and you'll be guided through providing three arguments. +1. Base currency, i.e. `BTC` +2. Target currency, i.e. `USD` +3. Amount, i.e. `12.35` + +If you want to bypass the guided input you can pass in 3 arguments and it will run from there, i.e. +```cryptocurrency [baseCurrency] [exchangeToCurrency] [amountBeingExchanged]``` +A valid use case would be: +```cryptocurrency BTC USD 12.35``` Written by: [Jonas-Taha El Sesiy](https://github.com/elsesiy) diff --git a/cryptocurrency/cryptocurrency b/cryptocurrency/cryptocurrency index 914e7db..1bb9fb3 100755 --- a/cryptocurrency/cryptocurrency +++ b/cryptocurrency/cryptocurrency @@ -40,7 +40,7 @@ checkValidCurrency() if [[ $1 != "BTC" && $1 != "ETH" \ && $1 != "XRP" && $1 != "LTC" && $1 != "XEM" \ && $1 != "ETC" && $1 != "DASH" && $1 != "MIOTA" \ - && $1 != "XMR" && $1 != "STRAT" ]]; then + && $1 != "XMR" && $1 != "STRAT" && $1 != "BCH" ]]; then echo "1" else echo "0" @@ -101,6 +101,7 @@ transformBase() "MIOTA") reqId="iota" ;; "XMR") reqId="monero" ;; "STRAT") reqId="stratis" ;; + "BCH") reqId="bitcoin-cash" ;; esac } @@ -248,7 +249,7 @@ Supported Base Currencies: ___________________________ | BTC | ETH | XRP | LTC | | XEM | ETC | DASH | MIOTA | -| XMR | STRAT | +| XMR | STRAT | BCH | ___________________________ Supported Target Currencies: