starting to ingetrate as widget
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 41s
Details
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 41s
Details
This commit is contained in:
parent
158f6196e9
commit
8b76b78153
|
@ -1,9 +1,9 @@
|
|||
{
|
||||
"localhost": {
|
||||
"DAO": "0x4774670f82A590e7eD6072bd7098836B06FFd8ce",
|
||||
"Work1": "0xc72A4CF5499D0de850457C0d4C0a4b8071441C6f",
|
||||
"Onboarding": "0xadB35d0E9d7B33441C7ED26add5D42F873430790",
|
||||
"Proposals": "0xE9aa427d985aE50AdD10a3404bF7a1300fa9f667"
|
||||
"DAO": "0x8d914D38dD301FC4606f5aa9fEcF8A76389020d3",
|
||||
"Work1": "0xfe58B9EB03F75A603de1B286584f5E9532ab8fB5",
|
||||
"Onboarding": "0x1d63FDe5B461106729fE1e5e38A02fc68C518Af5",
|
||||
"Proposals": "0x050C420Cc4995B41217Eba1B54B82Fd5687e9139"
|
||||
},
|
||||
"sepolia": {
|
||||
"DAO": "0x8e5bd58B2ca8910C5F9be8de847d6883B15c60d2",
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1,9 +1,9 @@
|
|||
{
|
||||
"localhost": {
|
||||
"DAO": "0x4774670f82A590e7eD6072bd7098836B06FFd8ce",
|
||||
"Work1": "0xc72A4CF5499D0de850457C0d4C0a4b8071441C6f",
|
||||
"Onboarding": "0xadB35d0E9d7B33441C7ED26add5D42F873430790",
|
||||
"Proposals": "0xE9aa427d985aE50AdD10a3404bF7a1300fa9f667"
|
||||
"DAO": "0x8d914D38dD301FC4606f5aa9fEcF8A76389020d3",
|
||||
"Work1": "0xfe58B9EB03F75A603de1B286584f5E9532ab8fB5",
|
||||
"Onboarding": "0x1d63FDe5B461106729fE1e5e38A02fc68C518Af5",
|
||||
"Proposals": "0x050C420Cc4995B41217Eba1B54B82Fd5687e9139"
|
||||
},
|
||||
"sepolia": {
|
||||
"DAO": "0x8e5bd58B2ca8910C5F9be8de847d6883B15c60d2",
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
{
|
||||
"localhost": {
|
||||
"DAO": "0x4774670f82A590e7eD6072bd7098836B06FFd8ce",
|
||||
"Work1": "0xc72A4CF5499D0de850457C0d4C0a4b8071441C6f",
|
||||
"Onboarding": "0xadB35d0E9d7B33441C7ED26add5D42F873430790",
|
||||
"Proposals": "0xE9aa427d985aE50AdD10a3404bF7a1300fa9f667"
|
||||
"DAO": "0x8d914D38dD301FC4606f5aa9fEcF8A76389020d3",
|
||||
"Work1": "0xfe58B9EB03F75A603de1B286584f5E9532ab8fB5",
|
||||
"Onboarding": "0x1d63FDe5B461106729fE1e5e38A02fc68C518Af5",
|
||||
"Proposals": "0x050C420Cc4995B41217Eba1B54B82Fd5687e9139"
|
||||
},
|
||||
"sepolia": {
|
||||
"DAO": "0x8e5bd58B2ca8910C5F9be8de847d6883B15c60d2",
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -21,6 +21,7 @@
|
|||
"create-hash": "^1.2.0",
|
||||
"helia": "^4.1.0",
|
||||
"ipfs-core": "^0.18.1",
|
||||
"matrix-widget-api": "^1.6.0",
|
||||
"object-hash": "^3.0.0",
|
||||
"prop-types": "^15.8.1",
|
||||
"react": "^18.2.0",
|
||||
|
@ -7943,6 +7944,11 @@
|
|||
"integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==",
|
||||
"devOptional": true
|
||||
},
|
||||
"node_modules/@types/events": {
|
||||
"version": "3.0.3",
|
||||
"resolved": "https://registry.npmjs.org/@types/events/-/events-3.0.3.tgz",
|
||||
"integrity": "sha512-trOc4AAUThEz9hapPtSd7wf5tiQKvTtu5b371UxXdTuqzIh0ArcRspRP0i0Viu+LXstIQ1z96t1nsPxT9ol01g=="
|
||||
},
|
||||
"node_modules/@types/filesystem": {
|
||||
"version": "0.0.35",
|
||||
"resolved": "https://registry.npmjs.org/@types/filesystem/-/filesystem-0.0.35.tgz",
|
||||
|
@ -19301,6 +19307,15 @@
|
|||
"integrity": "sha512-q9JtQJKjpsVxCRVgQ+WapguSbKC3SQ5HEzFGPAJMStgh3QjCawp00UKv3MTTAArTmGmmPUvllHZoNbZ3gs0I+Q==",
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/matrix-widget-api": {
|
||||
"version": "1.6.0",
|
||||
"resolved": "https://registry.npmjs.org/matrix-widget-api/-/matrix-widget-api-1.6.0.tgz",
|
||||
"integrity": "sha512-VXIJyAZ/WnBmT4C7ePqevgMYGneKMCP/0JuCOqntSsaNlCRHJvwvTxmqUU+ufOpzIF5gYNyIrAjbgrEbK3iqJQ==",
|
||||
"dependencies": {
|
||||
"@types/events": "^3.0.0",
|
||||
"events": "^3.2.0"
|
||||
}
|
||||
},
|
||||
"node_modules/md5.js": {
|
||||
"version": "1.3.5",
|
||||
"resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz",
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
"create-hash": "^1.2.0",
|
||||
"helia": "^4.1.0",
|
||||
"ipfs-core": "^0.18.1",
|
||||
"matrix-widget-api": "^1.6.0",
|
||||
"object-hash": "^3.0.0",
|
||||
"prop-types": "^15.8.1",
|
||||
"react": "^18.2.0",
|
||||
|
|
|
@ -3,7 +3,6 @@ import {
|
|||
} from 'react';
|
||||
import { useSDK } from '@metamask/sdk-react';
|
||||
import { Web3 } from 'web3';
|
||||
|
||||
import Button from 'react-bootstrap/Button';
|
||||
import Tab from 'react-bootstrap/Tab';
|
||||
import Tabs from 'react-bootstrap/Tabs';
|
||||
|
@ -11,9 +10,9 @@ import Container from 'react-bootstrap/Container';
|
|||
import Row from 'react-bootstrap/Row';
|
||||
import Col from 'react-bootstrap/Col';
|
||||
import Stack from 'react-bootstrap/Stack';
|
||||
import { WidgetApi } from 'matrix-widget-api';
|
||||
|
||||
import './App.css';
|
||||
|
||||
import useList from './utils/List';
|
||||
import { getContractAddressByChainId } from './utils/contract-config';
|
||||
import Web3Context from './contexts/Web3Context';
|
||||
|
@ -43,14 +42,15 @@ function App() {
|
|||
const [balanceEther, setBalanceEther] = useState();
|
||||
const [reputation, setReputation] = useState();
|
||||
const [totalReputation, setTotalReputation] = useState();
|
||||
const [members, dispatchMember] = useList();
|
||||
const [posts, dispatchPost] = useList();
|
||||
const [validationPools, dispatchValidationPool] = useList();
|
||||
const [members, dispatchMember] = useList();
|
||||
|
||||
const [showAddPost, setShowAddPost] = useState(false);
|
||||
const [showViewPost, setShowViewPost] = useState(false);
|
||||
const [viewPost, setViewPost] = useState({});
|
||||
|
||||
const [widgetId, setWidgetId] = useState();
|
||||
const [matrixUserId, setMatrixUserId] = useState();
|
||||
const widgetApi = useRef();
|
||||
const web3ProviderValue = useMemo(() => ({
|
||||
provider,
|
||||
DAO,
|
||||
|
@ -243,6 +243,18 @@ function App() {
|
|||
/* --------------------------- END MAIN INITIALIZION EFFECT ----------------------- */
|
||||
/* -------------------------------------------------------------------------------- */
|
||||
|
||||
useEffect(() => {
|
||||
const params = new URL(document.location).searchParams;
|
||||
setWidgetId(params.get('widgetId'));
|
||||
setMatrixUserId(params.get('userId'));
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
if (widgetId) {
|
||||
widgetApi.current = new WidgetApi(widgetId);
|
||||
}
|
||||
}, [widgetId]);
|
||||
|
||||
/* -------------------------------------------------------------------------------- */
|
||||
/* --------------------------- BEGIN UI ACTIONS ----------------------------------- */
|
||||
/* -------------------------------------------------------------------------------- */
|
||||
|
@ -325,6 +337,11 @@ function App() {
|
|||
setShowViewPost(true);
|
||||
}, [setViewPost, setShowViewPost]);
|
||||
|
||||
// TODO: Sign and send a message to the forum-api bot / to a room in matrix
|
||||
const registerMatrixIdentity = async () => {
|
||||
console.log('matrix user id', matrixUserId);
|
||||
};
|
||||
|
||||
/* -------------------------------------------------------------------------------- */
|
||||
/* --------------------------- END UI ACTIONS ------------------------------------- */
|
||||
/* -------------------------------------------------------------------------------- */
|
||||
|
@ -376,6 +393,11 @@ function App() {
|
|||
<div>
|
||||
<Button onClick={() => disconnect()}>Disconnect</Button>
|
||||
<Button onClick={() => watchReputationToken()}>Watch REP in MetaMask</Button>
|
||||
{!!widgetId && (
|
||||
<Button onClick={() => registerMatrixIdentity()}>
|
||||
Register Matrix Identity
|
||||
</Button>
|
||||
)}
|
||||
</div>
|
||||
</Stack>
|
||||
</Col>
|
||||
|
|
Loading…
Reference in New Issue