Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem: not possible to cancel SendToEthereum transactions (fixes #389) #532

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
update changelog
  • Loading branch information
thomas-nguy committed Jun 8, 2022
commit 525befb79800dfa9c98a033288f52af910f1c6e2
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
- [cronos#418](https://github.com/crypto-org-chain/cronos/pull/418) Support logs in evm-hooks and return id for SendToEthereum events
- [cronos#489](https://github.com/crypto-org-chain/cronos/pull/489) Enable jemalloc memory allocator, and update rocksdb src to `v6.29.5`.
- [cronos#511](https://github.com/crypto-org-chain/cronos/pull/511) Replace ibc-hook with ibc middleware, use ibc-go upstream version.
- [cronos#532](https://github.com/crypto-org-chain/cronos/pull/532) Add CancelSendToEthereum support from evm call.
- [cronos#532](https://github.com/crypto-org-chain/cronos/pull/532) Add SendtoChain and CancelSendToChain support from evm call.
yihuang marked this conversation as resolved.
Show resolved Hide resolved

*May 3, 2022*

Expand Down
6 changes: 3 additions & 3 deletions x/cronos/keeper/evm_log_handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -256,10 +256,10 @@ func (h SendToChainHandler) Handle(
ethRecipient := unpacked[1].(common.Address)
amount := sdk.NewIntFromBigInt(unpacked[2].(*big.Int))
bridgeFee := sdk.NewIntFromBigInt(unpacked[3].(*big.Int))
chainId := sdk.NewIntFromBigInt(unpacked[4].(*big.Int))
chainID := sdk.NewIntFromBigInt(unpacked[4].(*big.Int))

if !chainId.Equal(sdk.NewInt(1)) && !chainId.Equal(sdk.NewInt(3)) &&
!chainId.Equal(sdk.NewInt(4)) && !chainId.Equal(sdk.NewInt(5)) {
if !chainID.Equal(sdk.NewInt(1)) && !chainID.Equal(sdk.NewInt(3)) &&
!chainID.Equal(sdk.NewInt(4)) && !chainID.Equal(sdk.NewInt(5)) {
return fmt.Errorf("only ethereum network is not supported")
}

Expand Down