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

Add getAddresses engine method #626

Merged
merged 1 commit into from
Dec 2, 2024
Merged

Add getAddresses engine method #626

merged 1 commit into from
Dec 2, 2024

Conversation

peachbits
Copy link
Contributor

@peachbits peachbits commented Nov 16, 2024

CHANGELOG

Does this branch warrant an entry to the CHANGELOG?

  • Yes
  • No

Dependencies

none

Description

none

export interface EdgeFreshAddress {
allAddresses?: EdgeAddress[]
Copy link
Contributor

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.

Copy link
Contributor

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 from EdgeFreshAddress
  • Deprecate EdgeFreshAddress
  • Deprecated getRecieveAddress on the wallet

Copy link
Contributor

@swansontec swansontec left a 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.

@@ -699,10 +699,8 @@ export interface EdgeAddress {
nativeBalance?: string
}

/** Deprecated */
Copy link
Contributor

@swansontec swansontec Nov 21, 2024

Choose a reason for hiding this comment

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

/** @deprecated Use getAddresses instead */

@peachbits peachbits force-pushed the matthew/all-addresses branch from 8a3375d to 151a106 Compare December 2, 2024 19:37
@peachbits peachbits merged commit 1898115 into master Dec 2, 2024
2 checks passed
@peachbits peachbits deleted the matthew/all-addresses branch December 2, 2024 19:59
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.

2 participants