Skip to content

Commit

Permalink
Merge branch 'master' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
EnderCrypto authored Jun 3, 2020
2 parents 7a1be5c + e8aa305 commit bb255e9
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ IMPROVEMENTS
* [\#704](https://github.com/binance-chain/node/pull/704) [DEX] BEP67 Price-based Order Expiration
* [\#714](https://github.com/binance-chain/node/pull/714) [DEX] Add pendingMatch flag to orderbook query response

## 0.6.3-hf.1

BUG FIXES
* [\#693](https://github.com/binance-chain/node/pull/693) [Deps] hot fix for hard fork in stdTx getSigner

## 0.6.3

BUG FIXES
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG_PENDING.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
# Changelog
## Develop


7 changes: 6 additions & 1 deletion plugins/tokens/swap/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ func NewHandler(kp Keeper) sdk.Handler {
}

func handleHashTimerLockedTransfer(ctx sdk.Context, kp Keeper, msg HTLTMsg) sdk.Result {
blockTime := ctx.BlockHeader().Time.Unix()
header := ctx.BlockHeader()
blockTime := header.Time.Unix()
if msg.Timestamp < blockTime-ThirtyMinutes || msg.Timestamp > blockTime+FifteenMinutes {
return ErrInvalidTimestamp(fmt.Sprintf("Timestamp (%d) can neither be 15 minutes ahead of the current time (%d), nor 30 minutes later", msg.Timestamp, ctx.BlockHeader().Time.Unix())).Result()
}
Expand All @@ -51,6 +52,10 @@ func handleHashTimerLockedTransfer(ctx sdk.Context, kp Keeper, msg HTLTMsg) sdk.
Status: Open,
Index: kp.getIndex(ctx),
}
// hotfix for chain "Binance-Chain-Tigris"
if header.Height == 90913098 && header.ChainID == "Binance-Chain-Tigris" {
swap.Index = 0
}
swapID := CalculateSwapID(swap.RandomNumberHash, swap.From, msg.SenderOtherChain)
err = kp.CreateSwap(ctx, swapID, swap)
if err != nil {
Expand Down

0 comments on commit bb255e9

Please sign in to comment.