diff --git a/config/about.js b/config/about.js deleted file mode 100644 index f1efa1f..0000000 --- a/config/about.js +++ /dev/null @@ -1,15 +0,0 @@ -/* - This file should be customized for your app. The string in this file is - displayed when a user makes the 'about' JSON RPC call. -*/ - -module.exports = ` -This is the about string for the ipfs-service-provider repository: -https://github.com/Permissionless-Software-Foundation/ipfs-service-provider - -Brought to you by the Permissionless Software Foundation: -https://PSFoundation.cash - -Documentation: -https://ipfs-service-provider.fullstack.cash/ -` diff --git a/config/env/common.js b/config/env/common.js index 891dc94..e53cf6d 100644 --- a/config/env/common.js +++ b/config/env/common.js @@ -5,6 +5,10 @@ /* eslint no-unneeded-ternary:0 */ +// Get the version from the package.json file. +const pkgInfo = require('../../package.json') +const version = pkgInfo.version + const ipfsCoordName = process.env.COORD_NAME ? process.env.COORD_NAME : 'ipfs-bch-wallet-service' @@ -52,6 +56,7 @@ module.exports = { '@context': 'https://schema.org/', '@type': 'WebAPI', name: ipfsCoordName, + version, description: 'IPFS service providing BCH blockchain access needed by a wallet.', documentation: 'https://ipfs-bch-wallet-service.fullstack.cash/', diff --git a/package.json b/package.json index d343956..4ac51a6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ipfs-bch-wallet-service", - "version": "1.0.0", + "version": "1.9.0", "description": "IPFS and REST service providing blockchain access needed by a wallet. ", "main": "index.js", "scripts": { diff --git a/src/controllers/json-rpc/about/index.js b/src/controllers/json-rpc/about/index.js index 6f3948a..77a7e61 100644 --- a/src/controllers/json-rpc/about/index.js +++ b/src/controllers/json-rpc/about/index.js @@ -6,7 +6,7 @@ const jsonrpc = require('jsonrpc-lite') // Local libraries -const aboutStr = require('../../../../config/about') +const config = require('../../../../config') class AboutRPC { constructor (localConfig) { @@ -36,7 +36,8 @@ class AboutRPC { return { success: true, status: 200, - message: aboutStr, + // message: aboutStr, + message: JSON.stringify(config.announceJsonLd), endpoint: 'about' } }