Critical Ethereum THORChain swap bugfix

If you swap from Ethereum, please upgrade immediately.

The bug caused the funds to be returned to the wallet, minus a small fee.  No
significant loss of funds would have occurred.  Swaps to ETH were unaffected.
This commit is contained in:
The MMGen Project 2025-04-24 06:03:58 +00:00
commit 2adf35502d
Signed by: mmgen
GPG key ID: 3F8B1861E32B7DA2
3 changed files with 3 additions and 3 deletions

View file

@ -1 +1 @@
15.1.dev28
15.1.dev29

View file

@ -47,7 +47,7 @@ class Unsigned(Completed, TxBase.Unsigned):
'gasprice': o['gasPrice'].toWei(),
'value': o['amt'].toWei() if o['amt'] else 0,
'nonce': o['nonce'],
'data': bytes.fromhex(o['data'])}
'data': self.swap_memo.encode() if self.is_swap else bytes.fromhex(o['data'])}
from ..pyethereum.transactions import Transaction
etx = Transaction(**o_conv).sign(wif, o['chainId'])

View file

@ -245,7 +245,7 @@ class CmdTestEthSwapEth(CmdTestEthSwapMethods, CmdTestSwapMethods, CmdTestEthdev
bals = lambda self, k: {
'swap1': [('98831F3A:E:1', '123.456')],
'swap2': [('98831F3A:E:1', '114.690979')],
'swap2': [('98831F3A:E:1', '114.690978056')],
}[k]
cmd_group_in = CmdTestEthdev.cmd_group_in + (