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 React multisig error #259

Merged
merged 1 commit into from
Dec 11, 2020
Merged

Fix React multisig error #259

merged 1 commit into from
Dec 11, 2020

Conversation

jasonpaulos
Copy link
Contributor

The mergeMultisigTransactions function currently does not work when used in a React app because it calls Buffer.compare with Uint8Array arguments. The latest version of the buffer package supports this, but unfortunately react-scripts v4.0.1 uses an older version of webpack to build apps, which overrides the buffer package with an older version that does not support comparing Uint8Arrays.

This PR converts the Uint8Array arguments to Buffers before calling Buffer.compare to fix this issue.

When react-scripts updates to webpack v5 (tracked by this issue), it should stop overriding the buffer module and this change can be reverted.

Fixes #252.

@jasonpaulos jasonpaulos merged commit a5309ee into develop Dec 11, 2020
@jasonpaulos jasonpaulos deleted the jason/react-buffer-fix branch December 11, 2020 21:24
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.

[React] appendSignMultisigTransaction error: Arguments must be Buffers
2 participants