Skip to content

Commit

Permalink
core/chains: use IsEnabled
Browse files Browse the repository at this point in the history
  • Loading branch information
jmank88 committed Nov 1, 2022
1 parent 8602782 commit 15d87a7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion core/chains/solana/chain_set.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ func (o *ChainSetOpts) NewChain(dbchain DBChain) (solana.Chain, error) {
}

func (o *ChainSetOpts) NewTOMLChain(cfg *SolanaConfig) (solana.Chain, error) {
if !*cfg.Enabled {
if !cfg.IsEnabled() {
return nil, errors.Errorf("cannot create new chain with ID %s, the chain is disabled", *cfg.ChainID)
}
c, err := newChain(*cfg.ChainID, cfg, o.KeyStore, o.ORM, o.Logger)
Expand Down
2 changes: 1 addition & 1 deletion core/chains/starknet/chain_set.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ func (o *ChainSetOpts) NewChain(dbchain types.DBChain) (starkchain.Chain, error)
}

func (o *ChainSetOpts) NewTOMLChain(cfg *StarknetConfig) (starkchain.Chain, error) {
if !*cfg.Enabled {
if !cfg.IsEnabled() {
return nil, errors.Errorf("cannot create new chain with ID %s, the chain is disabled", *cfg.ChainID)
}
c, err := newChain(*cfg.ChainID, cfg, o.KeyStore, o.ORM, o.Logger)
Expand Down
2 changes: 1 addition & 1 deletion core/chains/terra/chain_set.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ func (o *ChainSetOpts) NewChain(dbchain types.DBChain) (terra.Chain, error) {
}

func (o *ChainSetOpts) NewTOMLChain(cfg *TerraConfig) (terra.Chain, error) {
if !*cfg.Enabled {
if !cfg.IsEnabled() {
return nil, errors.Errorf("cannot create new chain with ID %s, the chain is disabled", *cfg.ChainID)
}
c, err := newChain(*cfg.ChainID, cfg, o.DB, o.KeyStore, o.Config, o.EventBroadcaster, o.ORM, o.Logger)
Expand Down

0 comments on commit 15d87a7

Please sign in to comment.