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

Fix filecoin spend saving #618

Merged
merged 3 commits into from
Sep 8, 2023
Merged

Fix filecoin spend saving #618

merged 3 commits into from
Sep 8, 2023

Conversation

samholmes
Copy link
Collaborator

@samholmes samholmes commented Sep 7, 2023

The date field was missing from the signed transactions so it wasn't being saved (I suppose that's a requirement by the CurrencyEngine implementation). Also, isSend had a bug that was copied from ZcashEngine; now it's fixed in both places.

CHANGELOG

  • fixed: Bug prevent Filecoin spend trasactions from being saved in the wallet (by saveTx)

Dependencies

none

Description

none


const edgeTransaction: EdgeTransaction = {
txid: '',
date: 0,
currencyCode,
blockHeight: 0,
nativeAmount: `-${totalTxAmount}`,
isSend: nativeAmount.startsWith('-'),
Copy link
Member

Choose a reason for hiding this comment

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

should just be true

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Why do other engines detect sends based on the sign of the number?

nativeAmount: `-${totalTxAmount}`, // nativeAmount
isSend: nativeAmount.startsWith('-'),
nativeAmount: txNativeAmount, // nativeAmount
isSend: txNativeAmount.startsWith('-'),
Copy link
Member

Choose a reason for hiding this comment

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

Should just be true

@samholmes samholmes force-pushed the sam/filecoin-saved-sends branch from 57af2d3 to 4a02b12 Compare September 8, 2023 19:47
@samholmes samholmes merged commit 9351e32 into master Sep 8, 2023
3 checks passed
@samholmes samholmes deleted the sam/filecoin-saved-sends branch September 8, 2023 22:50
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