Skip to content

Commit

Permalink
revet: "fix: get wallet endpoint available if swap not enabled (#4859)"
Browse files Browse the repository at this point in the history
This reverts commit 1f0c3f6.
  • Loading branch information
istae committed Dec 24, 2024
1 parent b8e5c2d commit 24d68cb
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions pkg/node/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -492,19 +492,19 @@ func NewBee(
}
}

chequebookFactory, err = InitChequebookFactory(logger, chainBackend, chainID, transactionService, o.SwapFactoryAddress)
if err != nil {
return nil, err
}
if o.SwapEnable {
chequebookFactory, err = InitChequebookFactory(logger, chainBackend, chainID, transactionService, o.SwapFactoryAddress)
if err != nil {
return nil, err
}

erc20Address, err := chequebookFactory.ERC20Address(ctx)
if err != nil {
return nil, fmt.Errorf("factory fail: %w", err)
}
erc20Address, err := chequebookFactory.ERC20Address(ctx)
if err != nil {
return nil, fmt.Errorf("factory fail: %w", err)
}

erc20Service = erc20.New(transactionService, erc20Address)
erc20Service = erc20.New(transactionService, erc20Address)

if o.SwapEnable {
if o.ChequebookEnable && chainEnabled {
chequebookService, err = InitChequebookService(
ctx,
Expand Down

0 comments on commit 24d68cb

Please sign in to comment.