Skip to content

Commit

Permalink
fix: repair SequencerProvider network resolution
Browse files Browse the repository at this point in the history
  • Loading branch information
0xmonkeyy authored and penovicp committed Aug 11, 2023
1 parent 047bd98 commit e42dfc1
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/provider/sequencer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,14 @@ export class SequencerProvider implements ProviderInterface {

protected static getNetworkFromName(name: NetworkName | StarknetChainId) {
switch (name) {
case NetworkName.SN_MAIN || StarknetChainId.SN_MAIN:
case NetworkName.SN_MAIN:
case StarknetChainId.SN_MAIN:
return BaseUrl.SN_MAIN;
case NetworkName.SN_GOERLI || StarknetChainId.SN_GOERLI:
case NetworkName.SN_GOERLI:
case StarknetChainId.SN_GOERLI:
return BaseUrl.SN_GOERLI;
case NetworkName.SN_GOERLI2 || StarknetChainId.SN_GOERLI2:
case NetworkName.SN_GOERLI2:
case StarknetChainId.SN_GOERLI2:
return BaseUrl.SN_GOERLI2;
default:
throw new Error('Could not detect base url from NetworkName');
Expand Down

0 comments on commit e42dfc1

Please sign in to comment.