spend_tx/2,3 have a bad type #26

Open
opened 2026-05-10 21:09:50 +09:00 by zxq9 · 0 comments
Owner

hz:spend/2,3 have a return type of Transaction :: binary() | {error, Reason :: term()} in practice. This isn't noted, but is dumb anyway.

It should be a return type of {ok, Transaction} | {error, Reason} because of course it should be.

This will break the interface slightly, so should probably be updated in the v1.0 release later once we decide what we're really promising.

This sort of troublesome nonsense still lingering in the interface means we (I? lol) should give the entire documented interface a once-over before going to v1.0.

`hz:spend/2,3` have a return type of `Transaction :: binary() | {error, Reason :: term()}` in practice. This isn't noted, but is dumb anyway. It should be a return type of `{ok, Transaction} | {error, Reason}` because of course it should be. This will break the interface slightly, so should probably be updated in the v1.0 release later once we decide what we're *really* promising. This sort of troublesome nonsense still lingering in the interface means we (I? lol) should give the entire documented interface a once-over before going to v1.0.
zxq9 self-assigned this 2026-05-10 21:09:50 +09:00
Sign in to join this conversation.