Skip to content

Conversation

@0xFirekeeper
Copy link
Member

@0xFirekeeper 0xFirekeeper commented Nov 7, 2024

PR-Codex overview

This PR modifies the ThirdwebExtensions.cs file to set default values for the data parameter in two methods, ensuring that if data is not provided, an empty byte array is used instead. This change enhances the robustness of the methods by preventing potential null reference issues.

Detailed summary

  • In the method signature for ERC1155_SafeTransferFrom, changed byte[] data to byte[] data = null.
  • Updated the method to use data ?? Array.Empty<byte>() instead of data when calling ThirdwebContract.Write.
  • In the method signature for ERC1155_SafeBatchTransferFrom, changed byte[] data to byte[] data = null.
  • Updated the method to use data ?? Array.Empty<byte>() instead of data when calling ThirdwebContract.Write.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

@0xFirekeeper 0xFirekeeper merged commit 2bc121e into main Nov 7, 2024
1 check passed
@0xFirekeeper 0xFirekeeper deleted the firekeeper/erc1155-transfer-data-optional branch November 7, 2024 15:45
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