Skip to content

Commit

Permalink
Merge pull request #622 from MinterTeam/dev
Browse files Browse the repository at this point in the history
v2.2.1
  • Loading branch information
danil-lashin authored May 18, 2021
2 parents 8de5365 + 0c2e8cc commit 1a4942b
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 5 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Changelog

## [v2.2.1](https://github.com/MinterTeam/minter-go-node/tree/v2.2.1)

[Full Changelog](https://github.com/MinterTeam/minter-go-node/compare/v2.2.0...v2.2.1)

### Fixed

- Swap pool tx tags *coin_to_sell* and *coin_to_buy*
- Hash of the transaction in send API response

## [v2.2.0](https://github.com/MinterTeam/minter-go-node/tree/v2.2.0)

[Full Changelog](https://github.com/MinterTeam/minter-go-node/compare/v2.1.0...v2.2.0)
Expand Down
3 changes: 2 additions & 1 deletion api/v2/service/send_transaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package service
import (
"context"
"encoding/hex"
"fmt"
"github.com/MinterTeam/minter-go-node/coreV2/code"
pb "github.com/MinterTeam/node-grpc-gateway/api_pb"
abci "github.com/tendermint/tendermint/abci/types"
Expand Down Expand Up @@ -36,7 +37,7 @@ func (s *Service) SendTransaction(ctx context.Context, req *pb.SendTransactionRe
return &pb.SendTransactionResponse{
Code: uint64(result.Code),
Log: result.Log,
Hash: "Mt" + strings.ToLower(result.Hash.String()),
Hash: "Mt" + strings.ToLower(fmt.Sprintf("%x", result.Hash)),
}, nil
}

Expand Down
3 changes: 1 addition & 2 deletions coreV2/transaction/buy_swap_pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,6 @@ func (data BuySwapPoolData) Run(tx *Transaction, context state.Interface, reward
rewardPool.Add(rewardPool, commissionInBaseCoin)

coinToBuy := data.Coins[0]
resultCoin := data.Coins[len(data.Coins)-1]
valueToBuy := data.ValueToBuy

var poolIDs tagPoolsChange
Expand Down Expand Up @@ -223,7 +222,7 @@ func (data BuySwapPoolData) Run(tx *Transaction, context state.Interface, reward
{Key: []byte("tx.commission_conversion"), Value: []byte(isGasCommissionFromPoolSwap.String()), Index: true},
{Key: []byte("tx.commission_amount"), Value: []byte(commission.String())},
{Key: []byte("tx.coin_to_buy"), Value: []byte(data.Coins[0].String()), Index: true},
{Key: []byte("tx.coin_to_sell"), Value: []byte(resultCoin.String()), Index: true},
{Key: []byte("tx.coin_to_sell"), Value: []byte(data.Coins[len(data.Coins)-1].String()), Index: true},
{Key: []byte("tx.return"), Value: []byte(amountIn.String())},
{Key: []byte("tx.pools"), Value: []byte(poolIDs.string())},
}
Expand Down
2 changes: 1 addition & 1 deletion coreV2/transaction/sell_swap_pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ func (data SellSwapPoolData) Run(tx *Transaction, context state.Interface, rewar
{Key: []byte("tx.commission_in_base_coin"), Value: []byte(commissionInBaseCoin.String())},
{Key: []byte("tx.commission_conversion"), Value: []byte(isGasCommissionFromPoolSwap.String()), Index: true},
{Key: []byte("tx.commission_amount"), Value: []byte(commission.String())},
{Key: []byte("tx.coin_to_buy"), Value: []byte(data.Coins[lastIteration].String()), Index: true},
{Key: []byte("tx.coin_to_buy"), Value: []byte(data.Coins[len(data.Coins)-1].String()), Index: true},
{Key: []byte("tx.coin_to_sell"), Value: []byte(data.Coins[0].String()), Index: true},
{Key: []byte("tx.return"), Value: []byte(amountOut.String())},
{Key: []byte("tx.pools"), Value: []byte(poolIDs.string())},
Expand Down
2 changes: 1 addition & 1 deletion version/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const (

var (
// Version must be a string because scripts like dist.sh read this file.
Version = "2.2.0"
Version = "2.2.1"

// GitCommit is the current HEAD set using ldflags.
GitCommit string
Expand Down

0 comments on commit 1a4942b

Please sign in to comment.