This commit is contained in:
Chris Troutner
2021-10-21 19:12:10 -07:00
parent 4f4b2c864d
commit 43043672c6
2 changed files with 7 additions and 7 deletions
+2 -2
View File
@@ -145,7 +145,7 @@ class Address {
* // qq50d800hgunr8u4trz3uuppspk3mds0dyug2v69da
*
*/
toEcashAddress (address, prefix = true) {
toEcashAddress (address, prefix = true) {
const decoded = this._decode(address)
const ecashAddress = cashaddr.encode(
@@ -173,7 +173,7 @@ class Address {
* bchjs.Address.ecashtoCashAddress('ecash:qq50d800hgunr8u4trz3uuppspk3mds0dyug2v69da', false)
* // qq50d800hgunr8u4trz3uuppspk3mds0dy9978plt2
*/
ecashtoCashAddress (address, prefix = true) {
ecashtoCashAddress (address, prefix = true) {
const decoded = this._decodeEcashAddress(address)
const cashAddress = cashaddr.encode(
+5 -5
View File
@@ -128,7 +128,7 @@ class Price {
* @apiGroup Price
* @apiDescription Return current price of BCHA in USD.
* This endpoint gets the USD price of XEC from the Coinex API. The price
* denominated in BCHA comes from bch-api, so it has a better chance of
* denominated in BCHA comes from bch-api, so it has a better chance of
* working in Tor.
*
* @apiExample Example usage:
@@ -150,7 +150,7 @@ class Price {
this.axiosOptions
)
// console.log(`response.data: ${JSON.stringify(response.data, null, 2)}`)
const bchaPrice = response.data.usd * 1000000
// Convert XEC denomination to BCHA denomination
@@ -161,7 +161,7 @@ class Price {
}
}
/**
/**
* @api price.getXecUsd() getXecUsd()
* @apiName Price getXecUsd()
* @apiGroup Price
@@ -179,9 +179,9 @@ class Price {
* }
*})()
*
* // 0.00021234
* // 0.00021234
*/
async getXecUsd () {
async getXecUsd () {
try {
const response = await this.axios.get(
`${this.restURL}price/bchausd`,