-
Notifications
You must be signed in to change notification settings - Fork 572
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change Note memos from string to 32 byte buffer (#4743)
* changes NativeNote napi to take memo as buffer (#4740) * changes NativeNote napi to take memo as buffer the NativeNote napi constructor takes the memo to be a utf-8 string that is then converted to bytes when constructing a Memo this prevents clients from easily constructing a memo from arbitrary bytes changes constructor to take the memo as a JsBuffer clients treating memos as strings should convert to buffers before constructing Notes * makes memo byte processing uniform with assetid changes From trait implementation to use byte array of length 32 * Start changing memo from string to Buffer * Remove unused memo_length * Push up wallet test changes * Push up blockchain test fix * fixes assorted test uses of string memos * Fixed syntax error * fixes napi handling of copying bytes from short memos * fixes wallet.test.slow.ts * Change buffer length to max check * Add test for sendTransaction * adds tests for createTransaction use hex string in memoHex to specify memo enforce maximum memo length * fixes memos in demo.test.slow * changes test memo for consistency * adds createTransaction test with no memo * makes memoHex optional in createTransaction yup schema * allows only one of memo or memoHex updates createTransaction and sendTransaction, adds test for each * Change createMinersFee task to take buffer memo * Change buffer to 0 length * Change ternary to if statements * Change ternary in sendTransaction to ifs * Fix broken tests --------- Co-authored-by: Hugh Cunningham <[email protected]> Co-authored-by: Hugh Cunningham <[email protected]>
- Loading branch information
1 parent
30ec913
commit 895a536
Showing
33 changed files
with
465 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.