File tree Expand file tree Collapse file tree 3 files changed +13
-4
lines changed Expand file tree Collapse file tree 3 files changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -3,22 +3,26 @@ import {
3
3
WalletProvider ,
4
4
} from "@solana/wallet-adapter-react" ;
5
5
import { WalletModalProvider } from "@solana/wallet-adapter-react-ui" ;
6
+ import { WalletAdapterNetwork } from "@solana/wallet-adapter-base" ;
6
7
import {
7
8
PhantomWalletAdapter ,
8
9
} from "@solana/wallet-adapter-wallets" ;
9
10
import { useMemo } from "react" ;
10
11
import { AppProvider } from "../context/context" ;
11
12
import "../styles/globals.css" ;
13
+ import { clusterApiUrl } from "@solana/web3.js" ;
12
14
13
15
require ( "@solana/wallet-adapter-react-ui/styles.css" ) ;
14
16
15
17
import { useRouter } from 'next/router' ;
16
18
import Header from "../components/Header" ;
17
19
import style from "../styles/Home.module.css" ;
18
20
function MyApp ( { Component, pageProps } ) {
19
- // const endpoint = clusterApiUrl(WalletAdapterNetwork.Devnet);
21
+
22
+ const endpoint = process . env . NEXT_PUBLIC_TEST_NETWORK === 'true' ? "http://127.0.0.1:8899" : clusterApiUrl ( WalletAdapterNetwork . Devnet ) ;
20
23
const router = useRouter ( ) ;
21
- const endpoint = "http://127.0.0.1:8899" ;
24
+
25
+ // const endpoint = "http://127.0.0.1:8899";
22
26
23
27
const wallets = useMemo (
24
28
( ) => [
Original file line number Diff line number Diff line change 50
50
color : # 333 ;
51
51
}
52
52
.error , .success {
53
- color : red;
54
53
margin-bottom : 0.5em ;
55
54
display : inline-block;
56
55
}
56
+ .error {
57
+ color : red;
58
+ }
59
+ .succes {
60
+ color : green;
61
+ }
57
62
.listChoices {
58
63
display : grid;
59
64
grid-template-columns : repeat (auto-fit, minmax (120px , 1fr ));
Original file line number Diff line number Diff line change 1
1
import { PublicKey } from "@solana/web3.js" ;
2
2
3
3
export const PROGRAM_ID = new PublicKey (
4
- "4AEtDMG3A5rFTFwj6KyA6K41dxxpagemC4CaG5w9oABc" //"8KcDj4FdPm6Dq6KoLFCAgPrAYEMbXtE9Ruc7B62UGeyJ"
4
+ process . env . NEXT_PUBLIC_PROGRAM_ADDRESS
5
5
) ;
You can’t perform that action at this time.
0 commit comments