-
Notifications
You must be signed in to change notification settings - Fork 111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
make transfer.from
and transfer.ledger
optional in LPI sendTransfer.
#289
Comments
The example in the rfcs leaves out While writing tutorial code, I found it's really silly that you have to include I would also vote in favor of making
If we decide to deprecate more fields, we should first update all known plugins, and merge the change to the rfcs repo after it's changed in the code everywhere. |
I believe these should be issues on payment channel framework; if they're not optional then that's a bug |
I think you mean that these fields should be optional in the implementation of ilp-plugin-pachafra, even if they are not optional in the spec. I'm not against that, but this issue (on the rfcs repo) goes one step further and says we should also make this change in all other known plugins, and then write about this in the spec. |
All other plugins already should make those fields optional. But you're right, if they weren't marked optional in the LPI they should be. |
We should add unit tests for it to all known plugins before proposing this change. |
This proposal made it into the lpi2 experiment - I guess we'll just leave them required for now, and make them optional as soon as someone makes another breaking change to the lpi. It does make sense that a plugin will not read the from and ledger fields from a sendTransfer call, although the plugin SHOULD fill in these fields when emitting an event. |
When calling
plugin.sendTransfer(transfer)
, we could help the implementer a bit bytransfer.from
, when omitted, toplugin.getAccount()
transfer.ledger
, when omitted, toplugin.getInfo().prefix
Also: defaulting
noteToSelf
andcustom
, when ommitted, to{}
(we discussed before that this was already how the spec text was intended).The text was updated successfully, but these errors were encountered: