From fe21fd9e9701a4a41a53aeea4bea87b37a777092 Mon Sep 17 00:00:00 2001 From: Sale Djenic Date: Thu, 6 Jun 2024 17:52:16 +0200 Subject: [PATCH] chore_: bridge moved to router --- services/wallet/api.go | 2 +- services/wallet/{ => router}/bridge/bridge.go | 0 services/wallet/{ => router}/bridge/cbridge.go | 2 +- services/wallet/{ => router}/bridge/cbridge/cbridge.pb.go | 0 services/wallet/{ => router}/bridge/cbridge/gateway.pb.go | 0 services/wallet/{ => router}/bridge/cbridge/query.pb.go | 0 services/wallet/{ => router}/bridge/ens_public_key.go | 0 services/wallet/{ => router}/bridge/ens_register.go | 0 services/wallet/{ => router}/bridge/ens_release.go | 0 services/wallet/{ => router}/bridge/erc1155_transfer.go | 0 services/wallet/{ => router}/bridge/erc721_transfer.go | 0 services/wallet/{ => router}/bridge/hop.go | 0 services/wallet/{ => router}/bridge/mock_bridge/README.md | 0 services/wallet/{ => router}/bridge/mock_bridge/bridge.go | 2 +- .../wallet/{ => router}/bridge/proto_cbridge/cbridge.proto | 0 .../wallet/{ => router}/bridge/proto_cbridge/gateway.proto | 0 services/wallet/{ => router}/bridge/proto_cbridge/generate.go | 0 services/wallet/{ => router}/bridge/proto_cbridge/query.proto | 0 services/wallet/{ => router}/bridge/swap_paraswap.go | 0 services/wallet/{ => router}/bridge/transfer.go | 0 services/wallet/router/filter.go | 2 +- services/wallet/router/filter_test.go | 2 +- services/wallet/router/router.go | 2 +- services/wallet/router/router_send_type.go | 2 +- services/wallet/router/router_v2.go | 2 +- services/wallet/transfer/helpers.go | 2 +- services/wallet/transfer/transaction_manager.go | 2 +- services/wallet/transfer/transaction_manager_internal.go | 2 +- .../wallet/transfer/transaction_manager_multitransaction.go | 2 +- .../transfer/transaction_manager_multitransaction_test.go | 4 ++-- 30 files changed, 14 insertions(+), 14 deletions(-) rename services/wallet/{ => router}/bridge/bridge.go (100%) rename services/wallet/{ => router}/bridge/cbridge.go (99%) rename services/wallet/{ => router}/bridge/cbridge/cbridge.pb.go (100%) rename services/wallet/{ => router}/bridge/cbridge/gateway.pb.go (100%) rename services/wallet/{ => router}/bridge/cbridge/query.pb.go (100%) rename services/wallet/{ => router}/bridge/ens_public_key.go (100%) rename services/wallet/{ => router}/bridge/ens_register.go (100%) rename services/wallet/{ => router}/bridge/ens_release.go (100%) rename services/wallet/{ => router}/bridge/erc1155_transfer.go (100%) rename services/wallet/{ => router}/bridge/erc721_transfer.go (100%) rename services/wallet/{ => router}/bridge/hop.go (100%) rename services/wallet/{ => router}/bridge/mock_bridge/README.md (100%) rename services/wallet/{ => router}/bridge/mock_bridge/bridge.go (98%) rename services/wallet/{ => router}/bridge/proto_cbridge/cbridge.proto (100%) rename services/wallet/{ => router}/bridge/proto_cbridge/gateway.proto (100%) rename services/wallet/{ => router}/bridge/proto_cbridge/generate.go (100%) rename services/wallet/{ => router}/bridge/proto_cbridge/query.proto (100%) rename services/wallet/{ => router}/bridge/swap_paraswap.go (100%) rename services/wallet/{ => router}/bridge/transfer.go (100%) diff --git a/services/wallet/api.go b/services/wallet/api.go index bea2e836a..d445e0d52 100644 --- a/services/wallet/api.go +++ b/services/wallet/api.go @@ -19,13 +19,13 @@ import ( "github.com/status-im/status-go/params" "github.com/status-im/status-go/rpc/network" "github.com/status-im/status-go/services/wallet/activity" - "github.com/status-im/status-go/services/wallet/bridge" "github.com/status-im/status-go/services/wallet/collectibles" wcommon "github.com/status-im/status-go/services/wallet/common" "github.com/status-im/status-go/services/wallet/currency" "github.com/status-im/status-go/services/wallet/history" "github.com/status-im/status-go/services/wallet/onramp" "github.com/status-im/status-go/services/wallet/router" + "github.com/status-im/status-go/services/wallet/router/bridge" "github.com/status-im/status-go/services/wallet/thirdparty" "github.com/status-im/status-go/services/wallet/token" "github.com/status-im/status-go/services/wallet/transfer" diff --git a/services/wallet/bridge/bridge.go b/services/wallet/router/bridge/bridge.go similarity index 100% rename from services/wallet/bridge/bridge.go rename to services/wallet/router/bridge/bridge.go diff --git a/services/wallet/bridge/cbridge.go b/services/wallet/router/bridge/cbridge.go similarity index 99% rename from services/wallet/bridge/cbridge.go rename to services/wallet/router/bridge/cbridge.go index 55f43a5f4..a7cd33c04 100644 --- a/services/wallet/bridge/cbridge.go +++ b/services/wallet/router/bridge/cbridge.go @@ -23,7 +23,7 @@ import ( "github.com/status-im/status-go/rpc" "github.com/status-im/status-go/params" - "github.com/status-im/status-go/services/wallet/bridge/cbridge" + "github.com/status-im/status-go/services/wallet/router/bridge/cbridge" "github.com/status-im/status-go/services/wallet/thirdparty" "github.com/status-im/status-go/services/wallet/token" "github.com/status-im/status-go/transactions" diff --git a/services/wallet/bridge/cbridge/cbridge.pb.go b/services/wallet/router/bridge/cbridge/cbridge.pb.go similarity index 100% rename from services/wallet/bridge/cbridge/cbridge.pb.go rename to services/wallet/router/bridge/cbridge/cbridge.pb.go diff --git a/services/wallet/bridge/cbridge/gateway.pb.go b/services/wallet/router/bridge/cbridge/gateway.pb.go similarity index 100% rename from services/wallet/bridge/cbridge/gateway.pb.go rename to services/wallet/router/bridge/cbridge/gateway.pb.go diff --git a/services/wallet/bridge/cbridge/query.pb.go b/services/wallet/router/bridge/cbridge/query.pb.go similarity index 100% rename from services/wallet/bridge/cbridge/query.pb.go rename to services/wallet/router/bridge/cbridge/query.pb.go diff --git a/services/wallet/bridge/ens_public_key.go b/services/wallet/router/bridge/ens_public_key.go similarity index 100% rename from services/wallet/bridge/ens_public_key.go rename to services/wallet/router/bridge/ens_public_key.go diff --git a/services/wallet/bridge/ens_register.go b/services/wallet/router/bridge/ens_register.go similarity index 100% rename from services/wallet/bridge/ens_register.go rename to services/wallet/router/bridge/ens_register.go diff --git a/services/wallet/bridge/ens_release.go b/services/wallet/router/bridge/ens_release.go similarity index 100% rename from services/wallet/bridge/ens_release.go rename to services/wallet/router/bridge/ens_release.go diff --git a/services/wallet/bridge/erc1155_transfer.go b/services/wallet/router/bridge/erc1155_transfer.go similarity index 100% rename from services/wallet/bridge/erc1155_transfer.go rename to services/wallet/router/bridge/erc1155_transfer.go diff --git a/services/wallet/bridge/erc721_transfer.go b/services/wallet/router/bridge/erc721_transfer.go similarity index 100% rename from services/wallet/bridge/erc721_transfer.go rename to services/wallet/router/bridge/erc721_transfer.go diff --git a/services/wallet/bridge/hop.go b/services/wallet/router/bridge/hop.go similarity index 100% rename from services/wallet/bridge/hop.go rename to services/wallet/router/bridge/hop.go diff --git a/services/wallet/bridge/mock_bridge/README.md b/services/wallet/router/bridge/mock_bridge/README.md similarity index 100% rename from services/wallet/bridge/mock_bridge/README.md rename to services/wallet/router/bridge/mock_bridge/README.md diff --git a/services/wallet/bridge/mock_bridge/bridge.go b/services/wallet/router/bridge/mock_bridge/bridge.go similarity index 98% rename from services/wallet/bridge/mock_bridge/bridge.go rename to services/wallet/router/bridge/mock_bridge/bridge.go index f8bdf8cb8..5cb427e84 100644 --- a/services/wallet/bridge/mock_bridge/bridge.go +++ b/services/wallet/router/bridge/mock_bridge/bridge.go @@ -14,7 +14,7 @@ import ( types "github.com/ethereum/go-ethereum/core/types" account "github.com/status-im/status-go/account" types0 "github.com/status-im/status-go/eth-node/types" - bridge "github.com/status-im/status-go/services/wallet/bridge" + bridge "github.com/status-im/status-go/services/wallet/router/bridge" ) // MockBridge is a mock of Bridge interface. diff --git a/services/wallet/bridge/proto_cbridge/cbridge.proto b/services/wallet/router/bridge/proto_cbridge/cbridge.proto similarity index 100% rename from services/wallet/bridge/proto_cbridge/cbridge.proto rename to services/wallet/router/bridge/proto_cbridge/cbridge.proto diff --git a/services/wallet/bridge/proto_cbridge/gateway.proto b/services/wallet/router/bridge/proto_cbridge/gateway.proto similarity index 100% rename from services/wallet/bridge/proto_cbridge/gateway.proto rename to services/wallet/router/bridge/proto_cbridge/gateway.proto diff --git a/services/wallet/bridge/proto_cbridge/generate.go b/services/wallet/router/bridge/proto_cbridge/generate.go similarity index 100% rename from services/wallet/bridge/proto_cbridge/generate.go rename to services/wallet/router/bridge/proto_cbridge/generate.go diff --git a/services/wallet/bridge/proto_cbridge/query.proto b/services/wallet/router/bridge/proto_cbridge/query.proto similarity index 100% rename from services/wallet/bridge/proto_cbridge/query.proto rename to services/wallet/router/bridge/proto_cbridge/query.proto diff --git a/services/wallet/bridge/swap_paraswap.go b/services/wallet/router/bridge/swap_paraswap.go similarity index 100% rename from services/wallet/bridge/swap_paraswap.go rename to services/wallet/router/bridge/swap_paraswap.go diff --git a/services/wallet/bridge/transfer.go b/services/wallet/router/bridge/transfer.go similarity index 100% rename from services/wallet/bridge/transfer.go rename to services/wallet/router/bridge/transfer.go diff --git a/services/wallet/router/filter.go b/services/wallet/router/filter.go index 35bb5b551..8affb6b7c 100644 --- a/services/wallet/router/filter.go +++ b/services/wallet/router/filter.go @@ -4,7 +4,7 @@ import ( "math/big" "github.com/ethereum/go-ethereum/common/hexutil" - "github.com/status-im/status-go/services/wallet/bridge" + "github.com/status-im/status-go/services/wallet/router/bridge" "go.uber.org/zap" ) diff --git a/services/wallet/router/filter_test.go b/services/wallet/router/filter_test.go index 5e83ba5e5..554d02e79 100644 --- a/services/wallet/router/filter_test.go +++ b/services/wallet/router/filter_test.go @@ -7,7 +7,7 @@ import ( "github.com/ethereum/go-ethereum/common/hexutil" "github.com/status-im/status-go/params" - "github.com/status-im/status-go/services/wallet/bridge" + "github.com/status-im/status-go/services/wallet/router/bridge" "github.com/stretchr/testify/assert" ) diff --git a/services/wallet/router/router.go b/services/wallet/router/router.go index ce6bf996d..a2e2cb31e 100644 --- a/services/wallet/router/router.go +++ b/services/wallet/router/router.go @@ -23,10 +23,10 @@ import ( "github.com/status-im/status-go/services/stickers" "github.com/status-im/status-go/services/wallet/async" "github.com/status-im/status-go/services/wallet/bigint" - "github.com/status-im/status-go/services/wallet/bridge" "github.com/status-im/status-go/services/wallet/collectibles" walletCommon "github.com/status-im/status-go/services/wallet/common" "github.com/status-im/status-go/services/wallet/market" + "github.com/status-im/status-go/services/wallet/router/bridge" "github.com/status-im/status-go/services/wallet/token" walletToken "github.com/status-im/status-go/services/wallet/token" "github.com/status-im/status-go/transactions" diff --git a/services/wallet/router/router_send_type.go b/services/wallet/router/router_send_type.go index 873fccad9..b7602fcd8 100644 --- a/services/wallet/router/router_send_type.go +++ b/services/wallet/router/router_send_type.go @@ -13,10 +13,10 @@ import ( "github.com/status-im/status-go/services/ens" "github.com/status-im/status-go/services/stickers" "github.com/status-im/status-go/services/wallet/bigint" - "github.com/status-im/status-go/services/wallet/bridge" "github.com/status-im/status-go/services/wallet/collectibles" walletCommon "github.com/status-im/status-go/services/wallet/common" "github.com/status-im/status-go/services/wallet/market" + "github.com/status-im/status-go/services/wallet/router/bridge" "github.com/status-im/status-go/services/wallet/token" "github.com/status-im/status-go/transactions" ) diff --git a/services/wallet/router/router_v2.go b/services/wallet/router/router_v2.go index 0c5d2af2c..7de8166bb 100644 --- a/services/wallet/router/router_v2.go +++ b/services/wallet/router/router_v2.go @@ -12,8 +12,8 @@ import ( "github.com/ethereum/go-ethereum/common/hexutil" "github.com/status-im/status-go/params" "github.com/status-im/status-go/services/wallet/async" - "github.com/status-im/status-go/services/wallet/bridge" walletCommon "github.com/status-im/status-go/services/wallet/common" + "github.com/status-im/status-go/services/wallet/router/bridge" walletToken "github.com/status-im/status-go/services/wallet/token" ) diff --git a/services/wallet/transfer/helpers.go b/services/wallet/transfer/helpers.go index 3058feff0..970219bc0 100644 --- a/services/wallet/transfer/helpers.go +++ b/services/wallet/transfer/helpers.go @@ -14,8 +14,8 @@ import ( "github.com/status-im/status-go/account" "github.com/status-im/status-go/eth-node/crypto" "github.com/status-im/status-go/eth-node/types" - "github.com/status-im/status-go/services/wallet/bridge" wallet_common "github.com/status-im/status-go/services/wallet/common" + "github.com/status-im/status-go/services/wallet/router/bridge" ) func rowsToMultiTransactions(rows *sql.Rows) ([]*MultiTransaction, error) { diff --git a/services/wallet/transfer/transaction_manager.go b/services/wallet/transfer/transaction_manager.go index d6679cbb5..bdcc2b1e0 100644 --- a/services/wallet/transfer/transaction_manager.go +++ b/services/wallet/transfer/transaction_manager.go @@ -15,8 +15,8 @@ import ( "github.com/status-im/status-go/eth-node/types" "github.com/status-im/status-go/multiaccounts/accounts" "github.com/status-im/status-go/params" - "github.com/status-im/status-go/services/wallet/bridge" wallet_common "github.com/status-im/status-go/services/wallet/common" + "github.com/status-im/status-go/services/wallet/router/bridge" "github.com/status-im/status-go/transactions" ) diff --git a/services/wallet/transfer/transaction_manager_internal.go b/services/wallet/transfer/transaction_manager_internal.go index 7ce957b50..5f4e56406 100644 --- a/services/wallet/transfer/transaction_manager_internal.go +++ b/services/wallet/transfer/transaction_manager_internal.go @@ -5,7 +5,7 @@ import ( "github.com/ethereum/go-ethereum/common" ethTypes "github.com/ethereum/go-ethereum/core/types" - "github.com/status-im/status-go/services/wallet/bridge" + "github.com/status-im/status-go/services/wallet/router/bridge" ) func (tm *TransactionManager) buildTransactions(bridges map[string]bridge.Bridge) ([]string, error) { diff --git a/services/wallet/transfer/transaction_manager_multitransaction.go b/services/wallet/transfer/transaction_manager_multitransaction.go index 36fb7fc1d..a9f9c2bb5 100644 --- a/services/wallet/transfer/transaction_manager_multitransaction.go +++ b/services/wallet/transfer/transaction_manager_multitransaction.go @@ -12,8 +12,8 @@ import ( "github.com/ethereum/go-ethereum/log" "github.com/status-im/status-go/account" "github.com/status-im/status-go/eth-node/types" - "github.com/status-im/status-go/services/wallet/bridge" wallet_common "github.com/status-im/status-go/services/wallet/common" + "github.com/status-im/status-go/services/wallet/router/bridge" "github.com/status-im/status-go/services/wallet/walletevent" "github.com/status-im/status-go/signal" "github.com/status-im/status-go/transactions" diff --git a/services/wallet/transfer/transaction_manager_multitransaction_test.go b/services/wallet/transfer/transaction_manager_multitransaction_test.go index 4b7e5871c..689159c43 100644 --- a/services/wallet/transfer/transaction_manager_multitransaction_test.go +++ b/services/wallet/transfer/transaction_manager_multitransaction_test.go @@ -16,9 +16,9 @@ import ( "github.com/status-im/status-go/account" "github.com/status-im/status-go/eth-node/types" "github.com/status-im/status-go/rpc" - "github.com/status-im/status-go/services/wallet/bridge" - "github.com/status-im/status-go/services/wallet/bridge/mock_bridge" wallet_common "github.com/status-im/status-go/services/wallet/common" + "github.com/status-im/status-go/services/wallet/router/bridge" + "github.com/status-im/status-go/services/wallet/router/bridge/mock_bridge" "github.com/status-im/status-go/services/wallet/walletevent" "github.com/status-im/status-go/t/helpers" "github.com/status-im/status-go/transactions"