Skip to content

Commit

Permalink
Push progress
Browse files Browse the repository at this point in the history
  • Loading branch information
jo-es committed Aug 2, 2020
1 parent f64338d commit e0a9622
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
2 changes: 0 additions & 2 deletions public/content.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,9 @@ async function onDidReceiveMessage(event) {
if (event.data.type && (event.data.type === 'QUERY_PUBLISHER')) {
try {
const response = await fetch(event.data.url);
// console.log(response);
if (response.status !== 200) { throw new Error(response); }
try {
const result = await response.json();
// console.log(result);
window.postMessage({ type: 'QUERY_PUBLISHER_RESPONSE', result }, '*');
} catch (error) {
console.log(error);
Expand Down
6 changes: 3 additions & 3 deletions src/Components/Writer.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ const Reader = ({ setPage }) => {
alert('This only works on Tweet pages')
}

const { tweetId, tweetAuthor } = getTweetData()
const { tweetId, tweetAuthor } = getTweetData();

let annotation = new Annotation({ content: commentContent, issuerEthAddress: "0xaBfEEA201208fcD0eE6a7073dFF0141dd7D7B04c", tweetAuthor, tweetId })
await annotation.sign()
console.log(JSON.stringify(annotation))
const res = await sendAnnotationToPublisher(JSON.stringify(annotation.payload))
// console.log(JSON.stringify(annotation.payload))
const res = await sendAnnotationToPublisher(annotation.payload);
console.log("🌐", res)
}

Expand Down
2 changes: 0 additions & 2 deletions src/services/publisher.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// const PUBLISHER_URL = 'https://pan.network/annotation/v1';
// const PUBLISHER_URL = 'https://134.122.90.29:8000';
const PUBLISHER_URL = 'https://annotations.network/annotations';


Expand Down

0 comments on commit e0a9622

Please sign in to comment.