Skip to content

Commit

Permalink
Merge pull request #3 from rarimo/fix/core-provider
Browse files Browse the repository at this point in the history
fix methods
  • Loading branch information
napalmpapalam authored Oct 10, 2023
2 parents b6748bc + a448d3b commit d25896f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions internal/services/voter/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
2 changes: 1 addition & 1 deletion internal/services/voter/t_ft.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
Expand Down
2 changes: 1 addition & 1 deletion internal/services/voter/t_native.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
Expand Down

0 comments on commit d25896f

Please sign in to comment.