Skip to content

Commit

Permalink
use Euro's recommendation
Browse files Browse the repository at this point in the history
  • Loading branch information
sdaveas committed Sep 30, 2024
1 parent 4d71f2b commit 2ba35f1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sui/utils/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ const findOwnedObjectIdByType = async (client, ownerAddress, objectType) => {
},
});

if (ownedObjects.data.length === 0 || ownedObjects.data.length > 1) {
if (ownedObjects.data.length !== 1) {
throw new Error(`Expecting exactly one object of type ${objectType} owned by ${ownerAddress}`);
}

Expand Down

0 comments on commit 2ba35f1

Please sign in to comment.