-
Notifications
You must be signed in to change notification settings - Fork 51
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
Add getAddresses
engine method
#626
Conversation
src/types/types.ts
Outdated
export interface EdgeFreshAddress { | ||
allAddresses?: EdgeAddress[] |
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.
So we need to do the reverse translation:
In the EdgeCurrencyWallet.getFreshAddress
method, we should call EdgeCurrencyEngine.getAddresses
if it exists, and then down-convert into this older EdgeFreshAddress
format. That way, engines can stop implementing getReceiveAddress
, but we can still provide the same core API to the GUI.
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.
Also, let's just deprecated the whole EdgeFreshAddress
, and remove the new allAddresses?: EdgeAddress[]
from it. Going forward, if you want addresses, just call the new getAddresses
. That way we can just deprecate / remove the old getRecieveAddress
, since there's no reason to use it anymore. We are only keeping it around for backwards compatibility.
- Remove
allAddresses
fromEdgeFreshAddress
- Deprecate
EdgeFreshAddress
- Deprecated
getRecieveAddress
on the wallet
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 looks nice. We use the /** @deprecated */
syntax to get VSCode to show the symbol with a strikeout, but that's a simple change.
src/types/types.ts
Outdated
@@ -699,10 +699,8 @@ export interface EdgeAddress { | |||
nativeBalance?: string | |||
} | |||
|
|||
/** Deprecated */ |
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.
/** @deprecated Use getAddresses instead */
8a3375d
to
151a106
Compare
CHANGELOG
Does this branch warrant an entry to the CHANGELOG?
Dependencies
noneDescription
none