Skip to content
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

Ripple protobuf messages #162

Merged
merged 1 commit into from
Jul 10, 2018
Merged

Ripple protobuf messages #162

merged 1 commit into from
Jul 10, 2018

Conversation

tsusanka
Copy link
Contributor

@tsusanka tsusanka commented Jul 9, 2018

Adds Ripple protobuf messages. Other Ripple PRs will follow in trezor-core and trezor-python after this is merged.

@tsusanka tsusanka requested a review from prusnak July 9, 2018 13:51
*/
message RippleSignTx {
repeated uint32 address_n = 1; // BIP-32 path. For compatibility with other wallets, must be m/44'/144'/index'
optional string account = 2; // source account address. This address must be equal to the one derived from the BIP-32 path
Copy link
Member

@prusnak prusnak Jul 9, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we drop the account field? It seems redundant.

Copy link
Contributor Author

@tsusanka tsusanka Jul 9, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't sure about that either. The reason I left it was that it is a confirmation that the user is sending funds from the account they assume. It is used only here.

But I'm not keen on it, maybe it's a bit far-fetched.

@tsusanka tsusanka force-pushed the tsusanka/ripple branch 4 times, most recently from 4a678c8 to 1226085 Compare July 10, 2018 11:51
@tsusanka
Copy link
Contributor Author

@prusnak I think/hope this is the final version, so it's ready for review

* - see https://developers.ripple.com/payment.html
*/
message RipplePayment {
optional uint32 amount = 1; // only XRP is supported at the moment so this an integer
Copy link
Member

@prusnak prusnak Jul 10, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should use uint64 here (XRP has precision equivalent to a 64-bit integer)

*/
message RippleSignTx {
repeated uint32 address_n = 1; // BIP-32 path. For compatibility with other wallets, must be m/44'/144'/index'
optional uint32 fee = 2; // fee (in drops) for the transaction
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe uint64 here as well?

Copy link
Contributor Author

@tsusanka tsusanka Jul 10, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're correct. Same goes for the payment's amount, nice catch. I've fixed both

@prusnak prusnak merged commit 7358ab1 into master Jul 10, 2018
@prusnak
Copy link
Member

prusnak commented Jul 10, 2018

LGTM Merged

@prusnak prusnak deleted the tsusanka/ripple branch July 10, 2018 15:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants