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!: allow empty memos (NULL op returns) #80

Merged
merged 2 commits into from
Aug 15, 2024
Merged

fix!: allow empty memos (NULL op returns) #80

merged 2 commits into from
Aug 15, 2024

Conversation

coolaj86
Copy link
Member

@coolaj86 coolaj86 commented Aug 15, 2024

BREAKING CHANGE

  • empty strings are now considered valid memos
  • null is now the placeholder value for objects that complete the output interface
   let outputs = [
-   { satoshis: 10000, memo: '', message: '', address: 'xxxx' },
+   { satoshis: 10000, memo: null, message: null, address: 'xxxx' },
   ];

Previously an output that looked like this would be considered a payment to 'xxx'

let outputs = [
    { satoshis: 10000, memo: '', message: '', address: 'xxxx' },
];

Between this and #74 (which allows burn memos), it will now throw an error:

throw new Error(`memo outputs must not have 'address' or 'pubKeyHash'`);

Also, it seems that there may have been a regression of #56, because this does the same that that says in the title.

Tested, working

https://trpc.digitalcash.dev/#?method=getrawtransaction&params=["79e822ae946a2babb141291c052da999d3987f0529cbb3cece02cc2377997a59",1]&submit

@coolaj86 coolaj86 changed the title feat: allow NUL memos fix!: allow NUL memos Aug 15, 2024
@coolaj86 coolaj86 changed the title fix!: allow NUL memos fix!: allow empty memos (NULL op returns) Aug 15, 2024
@coolaj86 coolaj86 merged commit 1f7188c into main Aug 15, 2024
5 checks passed
@coolaj86 coolaj86 deleted the feat-null-memo branch August 15, 2024 06:48
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.

1 participant