Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
zxlwdgithub committed Nov 7, 2019
1 parent f75b343 commit bab5840
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion transaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,8 @@ func GetTransferTx(input *adaptor.GetTransferTxInput, rpcParams *RPCParams, netI
return nil, err
}
data := tx.Data()
if isErc20 && !bytes.HasPrefix(data, []byte("a9059cbb")) {
transferMethodId := Hex2Bytes("a9059cbb")
if isErc20 && !bytes.HasPrefix(data, transferMethodId) {
return nil, errors.New("not a transfer method invoke")
}

Expand Down

0 comments on commit bab5840

Please sign in to comment.