You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
returnerrorsmod.Wrapf(errortypes.ErrInvalidRequest, "invalid from address %s, expect empty string", from)
}
returnnil
which looks like it just ensures that it returns an error if the from address is non-empty, but:
checkValidFrom is misleading because it is the opposite of an expectation of a from address (you'd expect that it would valid that the address was set) but it inverts the purpose hence it could be named "ensureFromIsEmpty"
that code just checks that from is non-nil then returns an error but what happens if one just passed in an empty sdktypes.AccAddress{}? I believe the actual check should be: if !from.Empty()