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 networkFees to EdgeTransaction type #628

Merged
merged 4 commits into from
Dec 2, 2024
Merged

Conversation

samholmes
Copy link
Contributor

@samholmes samholmes commented Nov 21, 2024

CHANGELOG

Does this branch warrant an entry to the CHANGELOG?

  • Yes
  • No

Dependencies

none

Description

none

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 is pretty good overall, but there are a few cleanups we should take care of.

.mocharc.json Outdated Show resolved Hide resolved
src/core/currency/wallet/currency-wallet-api.ts Outdated Show resolved Hide resolved
src/types/types.ts Outdated Show resolved Hide resolved
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.

One optional change, but this looks good now.

Comment on lines +39 to +42
if (quote.networkFee != null && quote.networkFee.tokenId == null) {
quote.networkFee.tokenId = quote.request.fromTokenId
}
Copy link
Contributor

Choose a reason for hiding this comment

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

I would have put this code directly into fetchSwapQuotes, rather than creating a separate method, since that's less cognitive load. Optional (but recommended) change, since this way works too.

This improves IDE integration.
The parentNetworkFee is not defined if the transaction is of the native
currency. This was an issue when reading txs from disk
(getTransations/streaming).
@samholmes samholmes enabled auto-merge December 2, 2024 19:31
@samholmes samholmes merged commit 729a9b2 into master Dec 2, 2024
2 checks passed
@samholmes samholmes deleted the sam/networkFees branch December 2, 2024 19:34
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