I hereby claim:
- I am kamescg on github.
- I am kamescg (https://keybase.io/kamescg) on keybase.
- I have a public key whose fingerprint is 424C AF10 69FD 6A7E 0719 37A1 F137 D798 0D1A 3A34
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| /* ------------------------- External Dependencies -------------------------- */ | |
| import idx from './idx' | |
| import React from 'react'; | |
| import {compose, lifecycle, withState} from 'recompose' | |
| import { connect } from 'react-redux' | |
| /* ------------------------- Internal Dependencies -------------------------- */ | |
| import Component from './component' | |
| import { fromUport } from 'assimilation/store/selectors' | |
| import { fromDatabase } from 'store/departments/selectors' | |
| import { |
| // Login | |
| loginRequest: ()=>dispatch(databaseWriteRequest({ | |
| payload: { | |
| input: { | |
| requested: props.requested, | |
| notifications: props.notifications, | |
| }, | |
| meta: { | |
| type: 'login', | |
| status: 'initialized', |
| /** | |
| * @desc Generates a uPort login request using the createRequest method | |
| * @param {object} eventData The data saved in the Firebase realtime database. | |
| * @param {string} eventKey The key referencing the new realtime database entry. | |
| */ | |
| const loginGenerate = (eventData, eventKey) => { | |
| return uportCredentials.createRequest({ | |
| requested: eventData.input.requested, | |
| notifications: eventData.input.notifications, | |
| callbackUrl: `https://us-central1-${projectId}.cloudfunctions.net/identityCallback?uid=${eventKey}` |
| <script | |
| type="text/javascript" | |
| data-smart-contract-address="0x311a70681f008d51f01e75032ee766718c9d74ba" // Pass in a smart contract address | |
| data-provider="uport" // Select Web3 provider. Currently support uPort, but MetaMask will be added. | |
| src="http://uportme.surge.sh/embed.js" | |
| > | |
| </script> |
| ** | |
| * VerifyTwitter | |
| * @param {object} req | |
| * @param {object} res | |
| */ | |
| const verifyTwitter = (req, res) => { | |
| var params = {user_id: req.user.firebase.identities['twitter.com'][0]} | |
| TwitterClient.get('users/lookup', params, function (error, user, response) { | |
| if (!error) { | |
| const twitterProfile = user[0] |
| ** | |
| * Identity | |
| * @desc Authenticates a uPort decentralized identity | |
| * @param {object} request The HTTP request object | |
| * @param {object} response The HTTP response object | |
| */ | |
| exports.identity = functions.https.onRequest((request, response) => { | |
| cors(request, response, () => { | |
| uportCredentials.receive(request.body.JWT) | |
| .then(profile => { |
| /* ------------------------- External Dependencies -------------------------- */ | |
| import { connect } from 'react-redux'; | |
| import { compose, lifecycle, withState } from 'recompose' | |
| import { reduxForm } from 'redux-form' | |
| /* ------------------------- Internal Dependencies -------------------------- */ | |
| import { createValidator, required } from 'logic/forms/validation' | |
| import { fromEthers } from 'assimilation/store/selectors' | |
| import ethers from 'assimilation/store/ethers/actions' | |
| import Form from './form' |
| /* ------------------------- External Dependencies -------------------------- */ | |
| import React from 'react' | |
| import { Field } from 'redux-form' | |
| /* ------------------------- Internal Dependencies -------------------------- */ | |
| // files | |
| // atoms | |
| import StyleFieldDefault from 'static/style/StyleFieldDefault' | |
| import Box from 'atoms/Box' | |
| import Flex from 'atoms/Flex' |
| import { initialState } from './selectors' | |
| import actions from './actions' | |
| export default (state = initialState, {type, payload, metadata, batch, entity} ) => { | |
| if(!!(metadata && metadata.delta) && entity === 'ethers') { | |
| return { | |
| ...state, | |
| [metadata.delta]: { | |
| ...state[metadata.delta], | |
| status: { |