File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -144,27 +144,6 @@ export const genesises = {
144144 } ,
145145} ;
146146
147- /**
148- * Helper function to get genesis block from genesis ID
149- */
150- export const getGenesisFromId = (
151- genesisId : string ,
152- ) : Connex . Thor . Block | null => {
153- const networkType = genesises . which ( genesisId ) ;
154- if ( ! networkType ) return null ;
155-
156- switch ( networkType ) {
157- case 'main' :
158- return genesises . main ;
159- case 'test' :
160- return genesises . test ;
161- case 'solo' :
162- return genesises . solo ;
163- default :
164- return null ;
165- }
166- } ;
167-
168147export const DEFAULT_GAS_COEFFICIENT = 0 ;
169148
170149export const BASE_GAS_PRICE =
Original file line number Diff line number Diff line change 11import { getConfig } from '@/config' ;
2- import { NETWORK_TYPE , getGenesisFromId } from '@/config/network' ;
2+ import { NETWORK_TYPE } from '@/config/network' ;
33import { CURRENCY , PrivyLoginMethod } from '@/types' ;
44import { isValidUrl } from '@/utils' ;
55import {
@@ -384,8 +384,11 @@ export const VeChainKitProvider = (
384384 }
385385 genesis = {
386386 network . genesisId
387- ? getGenesisFromId ( network . genesisId ) ??
388- getConfig ( network . type ) . network . genesis
387+ ? {
388+ ...getConfig ( network . type ) . network
389+ . genesis ,
390+ id : network . genesisId ,
391+ }
389392 : getConfig ( network . type ) . network . genesis
390393 }
391394 i18n = { i18nConfig }
You can’t perform that action at this time.
0 commit comments