Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix a bug that prevented react-app from working. #258

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions examples/react-app/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { useState, useEffect } from 'react'
import * as W3c from 'daf-w3c'
import * as TG from 'daf-trust-graph'
import * as W3c from 'daf-w3c'
import React, { useEffect, useState } from 'react'
import { agent } from './setup'
const {
BaseStyles,
Expand All @@ -26,16 +26,15 @@ declare global {
const App: React.FC = () => {
const [isSending, setIsSending] = useState(false)
const [activeDid, setActiveDid] = useState('')
const [receiver, setReceiver] = useState('did:web:uport.me')
const [receiver, setReceiver] = useState('did:web:identity.foundation')
const [claimType, setClaimType] = useState('name')
const [claimValue, setClaimValue] = useState('Alice')
const [identityProviders, setIdentityProviders] = useState([{ type: '', description: '' }])
const [identities, setIdentities] = useState([{ identityProviderType: '', did: '' }])

useEffect(() => {
agent.identityManager.getIdentityProviders().then((providers: any) => {
setIdentityProviders(providers)
})
const providers = agent.identityManager.getIdentityProviders()
setIdentityProviders(providers)
}, [])

const updateIdentityList = () => {
Expand Down Expand Up @@ -68,7 +67,7 @@ const App: React.FC = () => {
},
} as W3c.ActionSignW3cVc)

console.log(credential)
console.log('credential', credential)

// Send credential using TrustGraph
await agent.handleAction({
Expand Down
Loading