This repository was archived by the owner on Aug 30, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +12
-6
lines changed
Expand file tree Collapse file tree 3 files changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -5,4 +5,6 @@ yalc.lock
55temp /
66.swc /
77* .log
8- .DS_Store
8+ .DS_Store
9+ # jns shenanigans
10+ old_src /
Original file line number Diff line number Diff line change @@ -250,8 +250,10 @@ export const ThirdwebProvider = <
250250 return _supporrtedChains . reduce ( ( prev , curr ) => {
251251 prev [ curr . id ] =
252252 curr . id in chainRpc
253- ? chainRpc [ curr . id as keyof ChainRpc < TSupportedChain > ] ||
254- curr . rpcUrls [ 0 ]
253+ ? ( getProviderForNetwork (
254+ chainRpc [ curr . id as keyof ChainRpc < TSupportedChain > ] ||
255+ curr . rpcUrls [ 0 ] ,
256+ ) as string )
255257 : curr . rpcUrls [ 0 ] ;
256258 return prev ;
257259 } , { } as Record < number , string > ) ;
Original file line number Diff line number Diff line change @@ -16,6 +16,8 @@ export interface MagicConnectorArguments
1616
1717const __IS_SERVER__ = typeof window === "undefined" ;
1818
19+ const LOCAL_STORAGE_KEY = "--magic-link:configuration" ;
20+
1921export class MagicConnector extends Connector {
2022 readonly id = "magic" ;
2123 readonly name = "Magic" ;
@@ -30,7 +32,7 @@ export class MagicConnector extends Connector {
3032 return undefined ;
3133 }
3234
33- const config = window . localStorage . getItem ( "-magic-link:configuration" ) ;
35+ const config = window . localStorage . getItem ( LOCAL_STORAGE_KEY ) ;
3436 if ( config ) {
3537 this . configuration = JSON . parse ( config ) ;
3638 }
@@ -175,12 +177,12 @@ export class MagicConnector extends Connector {
175177 if ( configuration ) {
176178 this . configuration = configuration ;
177179 window . localStorage . setItem (
178- "-magic-link:configuration" ,
180+ LOCAL_STORAGE_KEY ,
179181 JSON . stringify ( configuration ) ,
180182 ) ;
181183 } else {
182184 this . configuration = undefined ;
183- window . localStorage . removeItem ( "-magic-link:configuration" ) ;
185+ window . localStorage . removeItem ( LOCAL_STORAGE_KEY ) ;
184186 }
185187 }
186188}
You can’t perform that action at this time.
0 commit comments