Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
LukassF committed Sep 27, 2024
1 parent 49d39a2 commit 3f83c80
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
7 changes: 1 addition & 6 deletions sdk/apps/modal-example/src/routes/solana.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const connection = new Connection('https://api.devnet.solana.com')

export interface INetwork {
name: string
genesisHash: string | undefined
genesisHash: string
url: string | undefined
}
const CUSTOM_NETWORK: INetwork[] = [
Expand Down Expand Up @@ -48,11 +48,6 @@ const CUSTOM_NETWORK: INetwork[] = [
genesisHash: 'Ep5wb4kbMk8yHqV4jMXNqDiMWnNtnTh8jX6WY59Y8Qvj',
url: undefined
},
{
name: 'Only url', // Passing only the Url sets Solana as the primary network
genesisHash: undefined,
url: 'https://solana-mainnet.rpc.extrnode.com/85c27167-63a1-4fa3-9971-fc1df7b132dc'
},
{
name: 'Solana Mainnet with url',
genesisHash: '5eykt4UsFv8P8NJdTREpY1vzqKqZKvdpKuc147dw2N9d',
Expand Down
6 changes: 1 addition & 5 deletions sdk/packages/selector-solana/src/adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -892,7 +892,7 @@ export class NightlyConnectAdapter extends BaseMessageSignerWalletAdapter {
}
}

changeNetwork = async ({ genesisHash, url }: { genesisHash?: string; url?: string }) => {
changeNetwork = async ({ genesisHash, url }: { genesisHash: string; url?: string }) => {
try {
// Check if connection is established
if (!this._connectionType) {
Expand All @@ -904,10 +904,6 @@ export class NightlyConnectAdapter extends BaseMessageSignerWalletAdapter {
throw new Error('Not supported on mobile yet')
}

// check if input is correct
if (!genesisHash) {
throw new Error('Invalid input')
}
// @ts-ignore
const nightlySolana = window.nightly?.solana

Expand Down

0 comments on commit 3f83c80

Please sign in to comment.