MyBitFoundation / MyBit-Go.app

🔷 The MyBit Platform™ for investing in alternative assets
https://app.mybit.io
GNU General Public License v3.0
8 stars 31 forks source link

Remove Civic 2 #529

Closed tcrowe closed 4 years ago

tcrowe commented 4 years ago

Previously there were issues and a PR to remove Civic. #515 #519

There are items outstanding in that task.

./server/index.js:11:import * as CivicController from './controllers/civicController';
./server/index.js:89:      const userData = await CivicController.exchangeCode(jwt);
./server/controllers/civicController.js:3:const civicSip = require('civic-sip-api');
./server/controllers/civicController.js:5:const civicClient = civicSip.newClient({
./server/controllers/civicController.js:6:  appId: process.env.REACT_APP_CIVIC_APP_ID,
./server/controllers/civicController.js:7:  prvKey: process.env.CIVIC_PRIVATE_KEY,
./server/controllers/civicController.js:8:  appSecret: process.env.CIVIC_APP_SECRET,
./server/controllers/civicController.js:12:  return await civicClient.exchangeCode(jwt);
./components/UI/CivicContext.js:17:const CivicButtonWrapper = styled.button`
./components/UI/CivicContext.js:52:export const CivicButton = (props) => (
./components/UI/CivicContext.js:53:  <CivicButtonWrapper {...props}>
./components/UI/CivicContext.js:57:    {props.loading ? 'Connecting' : ' Connect' } with Civic
./components/UI/CivicContext.js:58:  </CivicButtonWrapper>
./components/UI/CivicContext.js:61:class CivicProvider extends Component {
./components/UI/CivicContext.js:64:    this.civicSip = null;
./components/UI/CivicContext.js:82:    this.civicSip = new window.civic.sip({
./components/UI/CivicContext.js:83:      appId: publicRuntimeConfig.REACT_APP_CIVIC_APP_ID,
./components/UI/CivicContext.js:85:    this.civicSip.on("auth-code-received", this.handleCodeReceived);
./components/UI/CivicContext.js:86:    this.civicSip.on("user-cancelled", this.handleCanceled);
./components/UI/CivicContext.js:87:    this.civicSip.on("read", this.handleRead);
./components/UI/CivicContext.js:88:    this.civicSip.on("civic-sip-error", this.handleError);
./components/UI/CivicContext.js:92:    if(!this.civicSip) return;
./components/UI/CivicContext.js:93:    this.civicSip.off("auth-code-received", this.handleCodeReceived);
./components/UI/CivicContext.js:94:    this.civicSip.off("user-cancelled", this.handleCanceled);
./components/UI/CivicContext.js:95:    this.civicSip.off("read", this.handleRead);
./components/UI/CivicContext.js:96:    this.civicSip.off("civic-sip-error", this.handleError);
./components/UI/CivicContext.js:100:    this.civicSip.signup({
./components/UI/CivicContext.js:102:      scopeRequest: this.civicSip.ScopeRequests.PROOF_OF_IDENTITY,
./components/UI/CivicContext.js:104:    this.civicSip.on('auth-code-received', event => {
./components/UI/CivicContext.js:153:export const withCivicContext = (Component) => {
./components/UI/CivicContext.js:163:          {state => <Component {...this.props} civic={state} />}
./components/UI/CivicContext.js:170:export default CivicProvider;
./package.json:23:    "civic-sip-api": "1.1.0",
./README.md:46:- REACT_APP_CIVIC_APP_ID | CIVIC_PRIVATE_KEY | CIVIC_APP_SECRET
./README.md:47:Not required but civic won't work in a development environment, only once your PR is deployed to our server. Fortunately civic's API is good so you can use the current implementation anywhere you need it and trust it will work. Meanwhile Civic is disabled in dev.
./README.md:68:- [Civic](https://github.com/MyBitFoundation/MyBit-Go.app/tree/develop/components/UI/CivicContext.js)
./static/civic_v2.svg:2:  <g id="civic_icon-24" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
./now.json:5:    "CIVIC_PRIVATE_KEY": "@civic-private-key",
./now.json:6:    "CIVIC_APP_SECRET": "@civic-app-secret",
./now.json:7:    "REACT_APP_CIVIC_APP_ID": "@react-app-civic-app-id",

Possible solutions are:

  1. Ask iamonuwa to complete the task #515 #519
  2. Roll it into tcrowe's #518 "Deploy to IPFS" task
  3. Other?
tcrowe commented 4 years ago

How to reproduce the search in the project:

grep --exclude-dir=.next --exclude=yarn.lock --exclude=package-lock.json --exclude=.env "civic" .

tcrowe commented 4 years ago

find . -name '*civic*' -not -path './node_modules/*'

./server/controllers/civicController.js
./static/civic_v2.svg
./static/list-asset/civic.svg
cryptnotiq commented 4 years ago

it looks like this was completed already by @developerfred - thank you very much.

developerfred commented 4 years ago

Thanks @cryptnotiq and @tcrowe !