diff --git a/sdk/apps/modal-example/src/routes/solana.tsx b/sdk/apps/modal-example/src/routes/solana.tsx index c212a701..adb33c5d 100644 --- a/sdk/apps/modal-example/src/routes/solana.tsx +++ b/sdk/apps/modal-example/src/routes/solana.tsx @@ -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[] = [ @@ -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', diff --git a/sdk/packages/selector-solana/src/adapter.ts b/sdk/packages/selector-solana/src/adapter.ts index 74cad7cf..023f9056 100644 --- a/sdk/packages/selector-solana/src/adapter.ts +++ b/sdk/packages/selector-solana/src/adapter.ts @@ -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) { @@ -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