-
Notifications
You must be signed in to change notification settings - Fork 517
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
fix flow type errors #811
fix flow type errors #811
Conversation
@@ -27,6 +27,7 @@ function toRippledAmount(amount: Amount): RippledAmount { | |||
if (amount.currency === 'XRP') { | |||
return xrpToDrops(amount.value) | |||
} | |||
// $FlowFixMe: amount.issuer is not a Amount type property. Safe to remove? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch. issuer
is actually the term that we use in rippled. We should add issuer
to the Amount
type, and keep using it here. (No hurry, but in a future release, we may deprecate counterparty
.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(There are other areas in the code that will need to be updated to accommodate this)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@intelliot Say more about the other areas that need to be changed? They'll need to accommodate by setting issuer
? Read from issuer
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@FredKSchott Right. For example, here are places where I think we'll need to set issuer or read from issuer. We can do this in a later PR though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is very nice! Just a couple minor changes needed.
src/transaction/settings.js
Outdated
import type {Settings} from './settings-types.js' | ||
|
||
type Settings = { | ||
passwordSpent?: boolean; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe we prefer to use commas instead of semicolons here.
9d529d5
to
28bfbf0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aside from cleaning up counterparty/issuer, which we can do later, this looks great.
@@ -27,6 +27,7 @@ function toRippledAmount(amount: Amount): RippledAmount { | |||
if (amount.currency === 'XRP') { | |||
return xrpToDrops(amount.value) | |||
} | |||
// $FlowFixMe: amount.issuer is not a Amount type property. Safe to remove? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@FredKSchott Right. For example, here are places where I think we'll need to set issuer or read from issuer. We can do this in a later PR though.
We can clean up counterparty/issuer in a later PR :) Merging. |
👍 👍 👍 |
This gets flow passing again on the codebase (a result of running #810)