From a448d3b1354fed20ea77a2f4f781b8fd487455e3 Mon Sep 17 00:00:00 2001 From: Semen Loktionov Date: Tue, 10 Oct 2023 18:11:33 +0300 Subject: [PATCH] fix methods --- internal/services/voter/provider.go | 6 +++--- internal/services/voter/t_ft.go | 2 +- internal/services/voter/t_native.go | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/internal/services/voter/provider.go b/internal/services/voter/provider.go index 201257e..d982369 100644 --- a/internal/services/voter/provider.go +++ b/internal/services/voter/provider.go @@ -43,10 +43,10 @@ func (p *coreProvider) OnChainItemByOther(ctx context.Context, req *tokentypes.Q return resp.Item.Index, nil } -func (p *coreProvider) OnChainItemIndexByChain(ctx context.Context, req *tokentypes.QueryGetOnChainItemByOtherRequest) (*tokentypes.OnChainItemIndex, error) { - item, err := p.tokenQuerier.OnChainItemByOther(ctx, req) +func (p *coreProvider) OnChainItemIndexByChain(ctx context.Context, req *tokentypes.QueryGetOnChainItemByItemForChainRequest) (*tokentypes.OnChainItemIndex, error) { + item, err := p.tokenQuerier.OnChainItemByItemForChain(ctx, req) if err != nil { - p.log.WithError(err).Error("error fetching on chain item") + p.log.WithError(err).Error("error fetching on chain item by item for chain") return nil, verifiers.ErrWrongOperationContent } diff --git a/internal/services/voter/t_ft.go b/internal/services/voter/t_ft.go index 52c143b..56924d6 100644 --- a/internal/services/voter/t_ft.go +++ b/internal/services/voter/t_ft.go @@ -41,7 +41,7 @@ func (f *FTOperator) GetMessage(ctx context.Context, event *common.BridgeDeposit TokenID: "", } - to, err := f.core.OnChainItemIndexByChain(ctx, &tokentypes.QueryGetOnChainItemByOtherRequest{Chain: f.chain, Address: from.Address, TargetChain: event.ChainTo}) + to, err := f.core.OnChainItemByOther(ctx, &tokentypes.QueryGetOnChainItemByOtherRequest{Chain: f.chain, Address: from.Address, TargetChain: event.ChainTo}) if err != nil { return nil, errors.Wrap(err, "failed to get item") } diff --git a/internal/services/voter/t_native.go b/internal/services/voter/t_native.go index 01ffee5..4962312 100644 --- a/internal/services/voter/t_native.go +++ b/internal/services/voter/t_native.go @@ -40,7 +40,7 @@ func (n *NativeOperator) GetMessage(ctx context.Context, event *common.BridgeDep TokenID: "", } - to, err := n.core.OnChainItemIndexByChain(ctx, &tokentypes.QueryGetOnChainItemByOtherRequest{Chain: n.chain, TargetChain: event.ChainTo}) + to, err := n.core.OnChainItemByOther(ctx, &tokentypes.QueryGetOnChainItemByOtherRequest{Chain: n.chain, TargetChain: event.ChainTo}) if err != nil { return nil, errors.Wrap(err, "failed to get item") }