Skip to content

Commit

Permalink
🚧 try to fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
Quentin Burg committed Sep 11, 2023
1 parent d855fd1 commit 3b94cce
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions batcher-ui/src/contexts/wallet.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { TezosToolkit } from '@taquito/taquito';
import React, { createContext, useEffect, useReducer } from 'react';
import { BeaconWallet } from '@taquito/beacon-wallet';
import { AccountInfo, NetworkType } from '@airgap/beacon-sdk';
import { AccountInfo } from '@airgap/beacon-sdk';
import { useTezosToolkit } from './tezos-toolkit';
import { getByKey, setByKey } from 'src/utils/local-storage';
import { NetworkType } from '@airgap/beacon-types';

type WalletState = {
wallet: BeaconWallet | undefined;
Expand Down Expand Up @@ -33,6 +34,7 @@ const connectWallet = async (tezos: TezosToolkit | undefined) => {
if (!tezos) return Promise.reject('ERROR');
const wallet = new BeaconWallet({
name: 'batcher',
// @ts-ignore
preferredNetwork:
process.env.NEXT_PUBLIC_NETWORK_TARGET === 'GHOSTNET'
? NetworkType.GHOSTNET
Expand All @@ -43,7 +45,11 @@ const connectWallet = async (tezos: TezosToolkit | undefined) => {

await wallet.requestPermissions({
network: {
type: NetworkType.GHOSTNET,
// @ts-ignore
type:
process.env.NEXT_PUBLIC_NETWORK_TARGET === 'GHOSTNET'
? NetworkType.GHOSTNET
: NetworkType.MAINNET,
rpcUrl: process.env.NEXT_PUBLIC_TEZOS_NODE_URI,
},
});
Expand Down Expand Up @@ -118,6 +124,7 @@ export const WalletProvider = ({ children }: { children: React.ReactNode }) => {
if (userAddress) {
const wallet = new BeaconWallet({
name: 'batcher',
// @ts-ignore
preferredNetwork:
process.env.NEXT_PUBLIC_NETWORK_TARGET === 'GHOSTNET'
? NetworkType.GHOSTNET
Expand Down

0 comments on commit 3b94cce

Please sign in to comment.