diff --git a/build.crx b/build.crx
index 98e154b..49434d0 100644
Binary files a/build.crx and b/build.crx differ
diff --git a/landing/index.html b/landing/index.html
index 0285837..e9765f3 100644
--- a/landing/index.html
+++ b/landing/index.html
@@ -61,7 +61,7 @@
get started
download
-
Cobweb is MIT-licensed and fully open source - the source is available on GitHub should you wish to build from source. The checksum of the current version is 96bb5c5985cd729b3804434b486956b514d48869341b762cedab7fedf0cb8886
.
+
Cobweb is MIT-licensed and fully open source - the source is available on GitHub should you wish to build from source. The checksum of the current version is 09fafee7dac469e2fd4ba75057d69c4ca166089a410015342d39d15a282323c6
.
view source
diff --git a/landing/removed/index.html b/landing/removed/index.html
index 5bc53c7..a09c3d6 100644
--- a/landing/removed/index.html
+++ b/landing/removed/index.html
@@ -27,7 +27,7 @@ Sorry to see you go.
Reinstall
diff --git a/package.json b/package.json
index 6787670..4db9469 100755
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "Cobweb",
- "version": "0.0.3",
+ "version": "0.0.4",
"description": "A Web3-based Web Monetization tool enabling one-click content monetization for creative teens.",
"license": "MIT",
"repository": {
diff --git a/src/manifest.json b/src/manifest.json
index 7ec3518..390097c 100755
--- a/src/manifest.json
+++ b/src/manifest.json
@@ -2,7 +2,7 @@
"manifest_version": 3,
"name": "Cobweb",
"description": "A Web3-based Web Monetization tool enabling one-click content monetization for creative teens.",
- "version": "0.0.3",
+ "version": "0.0.4",
"background": { "service_worker": "background.bundle.js" },
"action": {
"default_popup": "popup.html",
diff --git a/src/pages/Background/index.ts b/src/pages/Background/index.ts
index f1fc5fc..2715e14 100644
--- a/src/pages/Background/index.ts
+++ b/src/pages/Background/index.ts
@@ -52,6 +52,9 @@ chrome.runtime.onInstalled.addListener((details) => {
let metamaskProvider: MetaMaskInpageProvider | null = null;
metamaskProvider = createMetaMaskProvider();
+const mmProvider = new ethers.providers.Web3Provider(metamaskProvider as any);
+await mmProvider.send("eth_requestAccounts", []);
+
storage.local.set({ mmNotFound: false });
metamaskProvider?.on("error", (error) => {
@@ -83,8 +86,6 @@ metamaskProvider.on("accountsChanged", (accounts) => {
}
});
-const mmProvider = new ethers.providers.Web3Provider(metamaskProvider as any);
-
storage.local.set({ toasts: [] });
let { address: addressTry } = (await storage.local.get("address")) as {
diff --git a/src/pages/Popup/Popup.tsx b/src/pages/Popup/Popup.tsx
index de80ebe..8a1deb4 100644
--- a/src/pages/Popup/Popup.tsx
+++ b/src/pages/Popup/Popup.tsx
@@ -1,4 +1,4 @@
-import { ethers, BigNumber } from "ethers";
+import { ethers, BigNumber, constants } from "ethers";
import React, { useEffect, useState } from "react";
import { Link, Navigate, useSearchParams } from "react-router-dom";
import {
@@ -39,6 +39,10 @@ const Popup = () => {
"extend-chrome/storage__local--mmNotFound",
null
);
+ const [balanceRes, , ,]: [any, any, any, any] = useChromeStorageLocal(
+ "extend-chrome/storage__local--balance",
+ null
+ );
useEffect(() => {
if (address) {
@@ -130,6 +134,22 @@ const Popup = () => {
};
}, [currentStream]);
+ useEffect(() => {
+ const noETHx = document.getElementById("no-ethx");
+ let popover: bootstrap.Popover | null = null;
+ if (
+ searchParams.get("onboarding") &&
+ balanceRes &&
+ BigNumber.from(balanceRes).eq(constants.Zero)
+ ) {
+ popover = new bootstrap.Popover(noETHx);
+ popover.show();
+ }
+ return () => {
+ popover?.dispose();
+ };
+ }, [balanceRes]);
+
const editStream = async ({
oldKey,
newKey,
@@ -235,7 +255,7 @@ const Popup = () => {
id="streamed-until"
data-bs-toggle="popover"
data-bs-trigger="hover focus"
- data-bs-placement="bottom"
+ data-bs-placement="top"
title={
ethers.utils.formatEther(streamedUntilNow(currentStream)) +
" " +
@@ -295,7 +315,17 @@ const Popup = () => {
'
+ }
+ data-bs-placement="bottom"
+ data-bs-container="body"
+ >
Manage balances
@@ -320,7 +350,17 @@ const Popup = () => {
'
+ }
+ data-bs-container="body"
+ data-bs-placement="bottom"
+ >
Manage balances
diff --git a/src/pages/Popup/components/DropdownModal.tsx b/src/pages/Popup/components/DropdownModal.tsx
index 1195ad3..de2e0ec 100644
--- a/src/pages/Popup/components/DropdownModal.tsx
+++ b/src/pages/Popup/components/DropdownModal.tsx
@@ -20,6 +20,7 @@ const DropdownModal = ({
aria-labelledby="cobwebModalLabel"
aria-hidden="true"
data-bs-backdrop={force ? "static" : undefined}
+ style={{ zIndex: 9999999 }}
>
{
const client = new ApolloClient({
- uri: "https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-goerli",
+ uri: isDev()
+ ? "https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-goerli"
+ : "https://subgraph.satsuma-prod.com/superfluid/eth-mainnet/version/v0.0.1/api",
cache: new InMemoryCache(),
});
const QUERY = gql`