Skip to content

Commit

Permalink
Release taco-web@0.2.5 (#509)
Browse files Browse the repository at this point in the history
  • Loading branch information
piotr-roslaniec committed Apr 10, 2024
2 parents efd3c60 + 842da5d commit 1f2fcd8
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 10 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ jobs:
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
fail_ci_if_error: true
# https://community.codecov.com/t/upload-issues-unable-to-locate-build-via-github-actions-api/3954/21
fail_ci_if_error: false

# TODO: Fix or replace bundlemon on CI
# - name: Analyze bundle size
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/mainnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ on:

# TODO: Use variables when GH supports it for forks. See https://github.com/orgs/community/discussions/44322
env:
RPC_PROVIDER_URL: "https://mainnet.infura.io/v3/3747007a284045d483c342fb39889a30"
RPC_PROVIDER_URL: "https://eth.llamarpc.com"
ENCRYPTOR_PRIVATE_KEY: ${{ secrets.MAINNET_ENCRYPTOR_PRIVATE_KEY }}
CONSUMER_PRIVATE_KEY: ${{ secrets.MAINNET_CONSUMER_PRIVATE_KEY }}
RITUAL_ID: "1"
RITUAL_ID: "9"

jobs:
networks:
Expand Down
14 changes: 11 additions & 3 deletions demos/taco-demo/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ import { Encrypt } from './Encrypt';
import { Spinner } from './Spinner';
import { DEFAULT_DOMAIN, DEFAULT_RITUAL_ID } from './config';

const chainIdForDomain = {
[domains.DEVNET]: 80002,
[domains.TESTNET]: 80002,
[domains.MAINNET]: 137,
};

export default function App() {
const { activateBrowserWallet, deactivate, account, switchNetwork } =
useEthers();
Expand All @@ -30,18 +36,20 @@ export default function App() {
const [ritualId, setRitualId] = useState<number>(DEFAULT_RITUAL_ID);
const [domain, setDomain] = useState<string>(DEFAULT_DOMAIN);

const chainId = chainIdForDomain[domain];

useEffect(() => {
initialize();
switchNetwork(80002);
}, []);
switchNetwork(chainId);
}, [chainId]);

const encryptMessage = async (message: string) => {
if (!condition) {
return;
}
setLoading(true);

await switchNetwork(80002);
await switchNetwork(chainId);

const provider = new ethers.providers.Web3Provider(window.ethereum);
const encryptedMessage = await encrypt(
Expand Down
14 changes: 12 additions & 2 deletions demos/taco-nft-demo/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ import { NFTConditionBuilder } from './NFTConditionBuilder';
import { Spinner } from './Spinner';
import { DEFAULT_DOMAIN, DEFAULT_RITUAL_ID } from './config';

const chainIdForDomain = {
[domains.DEVNET]: 80002,
[domains.TESTNET]: 80002,
[domains.MAINNET]: 137,
};

export default function App() {
const { activateBrowserWallet, deactivate, account, switchNetwork } =
useEthers();
Expand All @@ -30,17 +36,21 @@ export default function App() {
const [ritualId, setRitualId] = useState<number>(DEFAULT_RITUAL_ID);
const [domain, setDomain] = useState<string>(DEFAULT_DOMAIN);

const chainId = chainIdForDomain[domain];

useEffect(() => {
initialize();
}, []);
switchNetwork(chainId);
}, [chainId]);


const encryptMessage = async (message: string) => {
if (!condition) {
return;
}
setLoading(true);

await switchNetwork(80002);
await switchNetwork(chainId);

const provider = new ethers.providers.Web3Provider(window.ethereum);
const encryptedMessage = await encrypt(
Expand Down
2 changes: 1 addition & 1 deletion packages/shared/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nucypher/shared",
"version": "0.2.1",
"version": "0.2.2",
"keywords": [
"pre",
"taco",
Expand Down
2 changes: 1 addition & 1 deletion packages/taco/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nucypher/taco",
"version": "0.2.4",
"version": "0.2.5",
"keywords": [
"taco",
"threshold",
Expand Down

0 comments on commit 1f2fcd8

Please sign in to comment.