Skip to content

Commit

Permalink
Remove trailing null bytes from URI comparison (samuelvanderwaal#136)
Browse files Browse the repository at this point in the history
  • Loading branch information
stegaBOB authored May 30, 2022
1 parent 925e0e3 commit 38a3bf1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/update_metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ pub fn update_uri(
let metadata = decode(client, mint_account)?;

let mut data = metadata.data;
if data.uri != new_uri {
if data.uri.trim_matches(char::from(0)) != new_uri.trim_matches(char::from(0)) {
data.uri = new_uri.to_string();

let data_v2 = DataV2 {
Expand Down

0 comments on commit 38a3bf1

Please sign in to comment.