Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix build #55

Merged
merged 2 commits into from
Dec 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions .github/workflows/test-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Test Build

on:
push:
branches: ["main"]
pull_request:
branches: ["main"]

jobs:
build:
name: Test build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Set up Node.js 20.x
uses: actions/setup-node@v3
with:
node-version: 20.x

- name: Run install
uses: borales/actions-yarn@v4
with:
cmd: install # will run `yarn install` command

- name: Build the app
uses: borales/actions-yarn@v4
with:
cmd: build # will run `yarn build` command
38 changes: 2 additions & 36 deletions components/wallet/jupiter/jupiter.tsx
Original file line number Diff line number Diff line change
@@ -1,51 +1,17 @@
import {
Adapter,
BaseSignerWalletAdapter,
UnifiedWalletButton,
UnifiedWalletProvider,
WalletAdapterNetwork,
} from "@jup-ag/wallet-adapter";
import {
SolflareWalletAdapter,
TrustWalletAdapter,
WalletConnectWalletAdapter,
NightlyWalletAdapter,
} from "@solana/wallet-adapter-wallets";
import { SolflareWalletAdapter } from "@solana/wallet-adapter-solflare";
import { NightlyWalletAdapter } from "@solana/wallet-adapter-nightly";
import { useMemo } from "react";
import {
metadata,
WalletAdapterWithMutableSupportedTransactionVersions,
} from "./something";

export const JupiterWalletConnect = () => {
const wallets: Adapter[] = useMemo(() => {
const walletConnectWalletAdapter: WalletAdapterWithMutableSupportedTransactionVersions<BaseSignerWalletAdapter> | null =
(() => {
const adapter: WalletAdapterWithMutableSupportedTransactionVersions<BaseSignerWalletAdapter> =
new WalletConnectWalletAdapter({
network: WalletAdapterNetwork.Mainnet,
options: {
relayUrl: "wss://relay.walletconnect.com",
projectId: metadata.walletConnectProjectId,
metadata: {
name: metadata.name,
description: metadata.description,
url: metadata.url,
icons: metadata.iconUrls,
},
},
});

// While sometimes supported, it mostly isn't. Should this be dynamic in the wallet-adapter instead?
adapter.supportedTransactionVersions = new Set(["legacy"]);
return adapter;
})();

return [
new NightlyWalletAdapter(),
new SolflareWalletAdapter(),
new TrustWalletAdapter(),
walletConnectWalletAdapter,
].filter((item) => item && item.name && item.icon) as Adapter[];
}, []);

Expand Down
17 changes: 0 additions & 17 deletions components/wallet/jupiter/something.ts

This file was deleted.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@
"@react-spring/web": "^9.7.5",
"@solana/spl-token": "^0.4.9",
"@solana/wallet-adapter-base": "^0.9.23",
"@solana/wallet-adapter-nightly": "^0.1.16",
"@solana/wallet-adapter-react": "^0.15.35",
"@solana/wallet-adapter-react-ui": "^0.9.35",
"@solana/wallet-adapter-wallets": "^0.19.32",
"@solana/wallet-adapter-solflare": "^0.6.28",
"@solana/web3.js": "^1.95.8",
"@telegram-apps/react-router-integration": "^1.0.0",
"@telegram-apps/sdk-react": "^1.1.3",
Expand Down
Loading
Loading