Commit 0de24818 authored by Son of Odin's avatar Son of Odin 💬

Merge branch 'ygg-return-outhash-patch' into 'master'

[bugfix] dont check coins when handling yggdrasil return outhash

See merge request !681
parents b3987f46 c374287e
Pipeline #128493477 passed with stages
in 63 minutes and 6 seconds
......@@ -93,9 +93,13 @@ func (h YggdrasilHandler) handleV1(ctx sdk.Context, msg MsgYggdrasil, version se
fromAddress, _ := tx.VaultPubKey.GetAddress(tx.Chain)
if tx.InHash.Equals(common.BlankTxID) &&
tx.OutHash.IsEmpty() &&
msg.Tx.Coins.Contains(tx.Coin) &&
tx.ToAddress.Equals(msg.Tx.ToAddress) &&
fromAddress.Equals(msg.Tx.FromAddress) {
// only need to check the coin if yggdrasil+
if msg.AddFunds && !msg.Tx.Coins.Contains(tx.Coin) {
txOut.TxArray[i].OutHash = msg.Tx.ID
if err := h.keeper.SetTxOut(ctx, txOut); nil != err {
ctx.Logger().Error("fail to save tx out", "error", err)
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment