Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: clean and normalize module imports #1591

Merged
merged 1 commit into from
Mar 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions waku/v2/node/jsonrpc/admin/handlers.nim
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ import
json_rpc/rpcserver,
libp2p/[peerinfo, switch]
import
../../../../waku/v2/protocol/waku_store,
../../../../waku/v2/protocol/waku_filter,
../../../../waku/v2/protocol/waku_relay,
../../../../waku/v2/node/peer_manager,
../../../../waku/v2/node/waku_node,
../../../protocol/waku_store,
../../../protocol/waku_filter,
../../../protocol/waku_relay,
../../peer_manager,
../../waku_node,
./types


Expand Down
2 changes: 1 addition & 1 deletion waku/v2/node/jsonrpc/debug/client.nim
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import
std/[os, strutils],
json_rpc/rpcclient
import
../../../../waku/v2/node/waku_node
../../waku_node

template sourceDir: string = currentSourcePath.rsplit(DirSep, 1)[0]

Expand Down
2 changes: 1 addition & 1 deletion waku/v2/node/jsonrpc/debug/handlers.nim
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import
chronicles,
json_rpc/rpcserver
import
../../../../waku/v2/node/waku_node
../../waku_node

logScope:
topics = "waku node jsonrpc debug_api"
Expand Down
4 changes: 2 additions & 2 deletions waku/v2/node/jsonrpc/filter/client.nim
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import
std/[os, strutils],
json_rpc/rpcclient
import
../../../../waku/v2/protocol/waku_message,
../../../../waku/v2/protocol/waku_filter/rpc
../../../protocol/waku_message,
../../../protocol/waku_filter/rpc

template sourceDir: string = currentSourcePath.rsplit(DirSep, 1)[0]

Expand Down
14 changes: 7 additions & 7 deletions waku/v2/node/jsonrpc/filter/handlers.nim
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ import
chronicles,
json_rpc/rpcserver
import
../../../../waku/v2/protocol/waku_message,
../../../../waku/v2/protocol/waku_filter,
../../../../waku/v2/protocol/waku_filter/rpc,
../../../../waku/v2/protocol/waku_filter/client,
../../../../waku/v2/node/message_cache,
../../../../waku/v2/node/peer_manager,
../../../../waku/v2/node/waku_node
../../../protocol/waku_message,
../../../protocol/waku_filter,
../../../protocol/waku_filter/rpc,
../../../protocol/waku_filter/client,
../../message_cache,
../../peer_manager,
../../waku_node


logScope:
Expand Down
6 changes: 3 additions & 3 deletions waku/v2/node/jsonrpc/message.nim
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import
json,
json_rpc/rpcserver
import
../../../waku/common/base64,
../../../waku/v2/protocol/waku_message,
../../../waku/v2/utils/time
../../../common/base64,
../../protocol/waku_message,
../../utils/time


type
Expand Down
4 changes: 2 additions & 2 deletions waku/v2/node/jsonrpc/relay/client.nim
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import
std/[os, strutils],
json_rpc/rpcclient
import
../../../../waku/v2/protocol/waku_message,
../../../../waku/v2/utils/compat,
../../../protocol/waku_message,
../../../utils/compat,
./types

export types
Expand Down
14 changes: 7 additions & 7 deletions waku/v2/node/jsonrpc/relay/handlers.nim
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ import
eth/keys,
nimcrypto/sysrand
import
../../../../waku/common/base64,
../../../../waku/v2/protocol/waku_message,
../../../../waku/v2/protocol/waku_relay,
../../../../waku/v2/node/waku_node,
../../../../waku/v2/node/message_cache,
../../../../waku/v2/utils/compat,
../../../../waku/v2/utils/time,
../../../../common/base64,
../../../protocol/waku_message,
../../../protocol/waku_relay,
../../../utils/compat,
../../../utils/time,
../../waku_node,
../../message_cache,
./types


Expand Down
4 changes: 2 additions & 2 deletions waku/v2/node/jsonrpc/store/client.nim
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import
std/[os, strutils],
json_rpc/rpcclient
import
../../../../waku/v2/protocol/waku_store/rpc,
../../../../waku/v2/utils/time,
../../../protocol/waku_store/rpc,
../../../utils/time,
./types

export types
Expand Down
10 changes: 5 additions & 5 deletions waku/v2/node/jsonrpc/store/handlers.nim
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ import
chronicles,
json_rpc/rpcserver
import
../../../../../waku/v2/protocol/waku_store,
../../../../../waku/v2/protocol/waku_store/rpc,
../../../../../waku/v2/utils/time,
../../../../waku/v2/node/waku_node,
../../../../waku/v2/node/peer_manager,
../../../protocol/waku_store,
../../../protocol/waku_store/rpc,
../../../utils/time,
../../waku_node,
../../peer_manager,
./types


Expand Down
2 changes: 1 addition & 1 deletion waku/v2/node/jsonrpc/store/types.nim
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ else:
import
std/options
import
../../../../waku/v2/protocol/waku_store/rpc,
../../../protocol/waku_store/rpc,
../message

export message
Expand Down
2 changes: 1 addition & 1 deletion waku/v2/node/peer_manager/peer_manager.nim
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import
metrics,
libp2p/multistream
import
../../protocol/waku_relay,
../../utils/peers,
../../waku/v2/protocol/waku_relay,
./peer_store/peer_storage,
./waku_peer_store

Expand Down
2 changes: 1 addition & 1 deletion waku/v2/node/rest/debug/handlers.nim
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import
json_serialization,
presto/route
import
../../../../waku/v2/node/waku_node,
../../waku_node,
../responses,
../serdes,
./types
Expand Down
2 changes: 1 addition & 1 deletion waku/v2/node/rest/debug/types.nim
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import
json_serialization,
json_serialization/std/options
import
../../../../waku/v2/node/waku_node,
../../waku_node,
../serdes

#### Types
Expand Down
2 changes: 1 addition & 1 deletion waku/v2/node/rest/relay/client.nim
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import
json_serialization/std/options,
presto/[route, client, common]
import
../../../../waku/v2/protocol/waku_message,
../../../protocol/waku_message,
../serdes,
../responses,
./types
Expand Down
2 changes: 1 addition & 1 deletion waku/v2/node/rest/relay/handlers.nim
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import
presto/route,
presto/common
import
../../../../waku/v2/node/waku_node,
../../waku_node,
../serdes,
../responses,
./types,
Expand Down
6 changes: 3 additions & 3 deletions waku/v2/node/rest/relay/topic_cache.nim
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import
chronos,
chronicles
import
../../../../waku/v2/protocol/waku_relay,
../../../../waku/v2/protocol/waku_message,
../../../../waku/v2/node/message_cache
../../../protocol/waku_relay,
../../../protocol/waku_message,
../../message_cache

export message_cache

Expand Down
14 changes: 9 additions & 5 deletions waku/v2/protocol/waku_swap/waku_swap.nim
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,20 @@ else:

import
std/[tables, options, json],
stew/results,
chronos,
chronicles,
metrics,
bearssl/rand,
chronos, chronicles, metrics, stew/results,
libp2p/crypto/crypto,
libp2p/protocols/protocol,
libp2p/protobuf/minprotobuf,
libp2p/stream/connection,
../../node/peer_manager,
./waku_swap_types,
libp2p/stream/connection
import
../../../common/protobuf,
../../waku/v2/protocol/waku_swap/waku_swap_contracts
../../node/peer_manager,
./waku_swap_contracts,
./waku_swap_types

export waku_swap_types

Expand Down