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

Updated fee logic #4611

Merged

Conversation

ikem-legend
Copy link
Member

What was the problem?

This PR resolves #4529

How was it solved?

By updating the fee calculation logic

How was it tested?

  • Manually

@ikem-legend ikem-legend marked this pull request as ready for review November 28, 2022 11:11
...transactionObject,
params: {
...transactionObject.params,
signatures: new Array(numberOfSignatures).fill(0).map(() => Buffer.alloc(64)),
Copy link
Contributor

Choose a reason for hiding this comment

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

Also, I think this should not be done this way only empty signatures should be replaced with an empty buffer, this is because when members are signing, there could be empty signatures(meaning a member is yet to sign) and there could be actual signatures(meaning a member has signed). so in this case I think it can be done like this @ikem-legend

Suggested change
signatures: new Array(numberOfSignatures).fill(0).map(() => Buffer.alloc(64)),
...(numberOfSignatures && !transactionObject.params. signatures.length && { signatures: Array(numberOfSignatures).fill(Buffer.alloc(64)) }) ,

Copy link
Member Author

Choose a reason for hiding this comment

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

eniolam1000752
eniolam1000752 previously approved these changes Nov 29, 2022
Copy link
Contributor

@soroushm soroushm left a comment

Choose a reason for hiding this comment

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

LGTM

@soroushm soroushm merged commit dc72d0e into feature/4034-change-sdk-api Nov 30, 2022
@soroushm soroushm deleted the 4529-update-native-token-tx-fees branch November 30, 2022 11:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

3 participants