Upgrade WalletConnect version to 2.16.1 (#27)

Part of [Service provider auctions for web deployments](https://www.notion.so/Service-provider-auctions-for-web-deployments-104a6b22d47280dbad51d28aa3a91d75)
- Upgrade WallectConnect to version `2.16.1`
  - Part of cerc-io/snowballtools-base#24
- Change GitHub access to `public_repo` and `user`
  - Part of cerc-io/snowballtools-base#22

Co-authored-by: Shreerang Kale <shreerangkale@gmail.com>
Reviewed-on: cerc-io/snowballtools-base#27
Co-authored-by: Nabarun <nabarun@deepstacksoft.com>
Co-committed-by: Nabarun <nabarun@deepstacksoft.com>
This commit is contained in:
2024-11-04 08:59:20 +00:00
committed by nabarun
co-authored by Shreerang Kale
parent ea9a56eb65
commit b9573474a8
10 changed files with 198 additions and 109 deletions
-5
View File
@@ -3,10 +3,5 @@
"id": "2379cf1f-a232-4ad2-ae14-4d881131cc26",
"name": "Deploy Tools",
"slug": "deploy-tools"
},
{
"id": "7eb9b3eb-eb74-4b53-b59a-69884c82a7fb",
"name": "Laconic",
"slug": "laconic-2"
}
]
-3
View File
@@ -8,12 +8,9 @@ VITE_WALLET_CONNECT_ID=
VITE_LIT_RELAY_API_KEY=
VITE_ALCHEMY_API_KEY=
VITE_BUGSNAG_API_KEY=
VITE_PASSKEY_WALLET_RPID=
VITE_TURNKEY_API_BASE_URL=
VITE_TURNKEY_ORGANIZATION_ID=
VITE_LACONICD_CHAIN_ID=
+1 -1
View File
@@ -41,7 +41,7 @@
"@turnkey/http": "^2.10.0",
"@turnkey/sdk-react": "^0.1.0",
"@turnkey/webauthn-stamper": "^0.5.0",
"@walletconnect/ethereum-provider": "^2.12.2",
"@walletconnect/ethereum-provider": "^2.16.1",
"@web3modal/siwe": "4.0.5",
"@web3modal/wagmi": "4.0.5",
"assert": "^2.1.0",
@@ -533,7 +533,7 @@ const Configure = () => {
Connect to your wallet
</Heading>
<ConnectWallet onAccountChange={onAccountChange} />
{accounts && accounts?.length > 0 && (
{accounts.length > 0 && (
<div>
<Button
{...buttonSize}
@@ -16,7 +16,7 @@ import { Heading } from '../../shared/Heading';
import { MockConnectGitCard } from './MockConnectGitCard';
import { VITE_GITHUB_CLIENT_ID } from 'utils/constants';
const SCOPES = 'repo user';
const SCOPES = 'public_repo user';
const GITHUB_OAUTH_URL = `https://github.com/login/oauth/authorize?client_id=${VITE_GITHUB_CLIENT_ID}&scope=${encodeURIComponent(SCOPES)}`;
interface ConnectAccountInterface {
@@ -16,7 +16,7 @@ const ConnectWallet = ({
return (
<div className="p-4 bg-slate-100 rounded-lg mb-6">
{!accounts ? (
{accounts.length === 0 ? (
<div>
<Button type={'button'} onClick={handleConnect}>
Connect Wallet
@@ -24,7 +24,7 @@ interface ClientInterface {
onConnect: () => Promise<void>;
onDisconnect: () => Promise<void>;
onSessionDelete: () => void;
accounts: { address: string }[] | undefined;
accounts: { address: string }[];
}
const ClientContext = createContext({} as ClientInterface);
@@ -41,7 +41,7 @@ export const WalletConnectClientProvider = ({
const [signClient, setSignClient] = useState<SignClient>();
const [session, setSession] = useState<SessionTypes.Struct>();
const [loadingSession, setLoadingSession] = useState(true);
const [accounts, setAccounts] = useState<{ address: string }[]>();
const [accounts, setAccounts] = useState<{ address: string }[]>([]);
const isSignClientInitializing = useRef<boolean>(false);
@@ -103,7 +103,7 @@ export const WalletConnectClientProvider = ({
}, [signClient, session]);
const onSessionDelete = () => {
setAccounts(undefined);
setAccounts([]);
setSession(undefined);
};
@@ -135,7 +135,7 @@ const CreateRepo = () => {
framework: 'React',
repoName: '',
isPrivate: false,
account: gitAccounts[0],
account: '',
},
});