这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@sneakzttv
Copy link
Contributor

@sneakzttv sneakzttv commented Jul 1, 2024

MarketplacePrefab.mp4

To Test:

Drop the prefab from marketplace samples into a scene with an event manager, click around, have fun, woot woot.

I want to swap the calls to use the marketplace client calls but it will require some refactoring. I'd prefer to test basic functionality first and then optimize and cleanup in the next PR to keep it granular.

@sneakzttv sneakzttv added the ready-to-merge Ready to Merge PR - this'll trigger required checks label Jul 1, 2024
@sneakzttv sneakzttv added ready-to-merge Ready to Merge PR - this'll trigger required checks and removed ready-to-merge Ready to Merge PR - this'll trigger required checks labels Jul 1, 2024
@sneakzttv sneakzttv linked an issue Jul 2, 2024 that may be closed by this pull request
@sneakzttv sneakzttv removed a link to an issue Jul 2, 2024
Copy link
Contributor

@juans-chainsafe juans-chainsafe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added a Event System into a new scene and the MarketplaceLogin.prefab to test.

But I get different errors.

  • After login:
NullReferenceException: Object reference not set to an instance of an object
Scripts.EVM.Remote.CSServer.GetDataWithToken[T] (System.String _path, System.String _bearerToken, System.Int32 offset, System.Int32 pageSize) (at /Users/juanmanuelspoleti/Desktop/workspace/web3.unity/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Remote/CSServer.cs:49)
Scripts.EVM.Marketplace.Marketplace.GetProjectMarketplaces (System.String bearerToken) (at /Users/juanmanuelspoleti/Desktop/workspace/web3.unity/Packages/io.chainsafe.web3-unity.marketplace/Runtime/Scripts/Marketplace/Marketplace.cs:31)
ChainSafe.Gaming.Marketplace.BrowseMarketplaceManager.GetProjectMarketplaces () (at Assets/Samples/web3.unity SDK Marketplace/2.6.1/Marketplace Samples/Scripts/BrowseMarketplaceManager.cs:63)
System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.<ThrowAsync>b__7_0 (System.Object state) (at <e307bbb467104258887a104f6151f183>:0)
UnityEngine.UnitySynchronizationContext+WorkRequest.Invoke () (at /Users/bokken/build/output/unity/unity/Runtime/Export/Scripting/UnitySynchronizationContext.cs:153)
UnityEngine.UnitySynchronizationContext.Exec () (at /Users/bokken/build/output/unity/unity/Runtime/Export/Scripting/UnitySynchronizationContext.cs:83)
UnityEngine.UnitySynchronizationContext.ExecuteTasks () (at /Users/bokken/build/output/unity/unity/Runtime/Export/Scripting/UnitySynchronizationContext.cs:107)
  • Trying to create a Marketplace
NullReferenceException: Object reference not set to an instance of an object
Scripts.EVM.Marketplace.Marketplace.CreateMarketplace (System.String _bearerToken, System.String _name, System.String _description, System.Boolean _whitelisting) (at /Users/juanmanuelspoleti/Desktop/workspace/web3.unity/Packages/io.chainsafe.web3-unity.marketplace/Runtime/Scripts/Marketplace/Marketplace.cs:334)
ChainSafe.Gaming.Marketplace.CreateMarketplaceManager.CreateMarketplace (System.String marketplaceName, System.String marketplaceDescription, System.Boolean marketplaceWhiteListing) (at Assets/Samples/web3.unity SDK Marketplace/2.6.1/Marketplace Samples/Scripts/CreateMarketplaceManager.cs:41)
System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.<ThrowAsync>b__7_0 (System.Object state) (at <e307bbb467104258887a104f6151f183>:0)
UnityEngine.UnitySynchronizationContext+WorkRequest.Invoke () (at /Users/bokken/build/output/unity/unity/Runtime/Export/Scripting/UnitySynchronizationContext.cs:153)
UnityEngine.UnitySynchronizationContext.Exec () (at /Users/bokken/build/output/unity/unity/Runtime/Export/Scripting/UnitySynchronizationContext.cs:83)
UnityEngine.UnitySynchronizationContext.ExecuteTasks () (at /Users/bokken/build/output/unity/unity/Runtime/Export/Scripting/UnitySynchronizationContext.cs:107)
  • Also, description for Marketplace should be optional, is not mandatory to add a description

  • Create a collection asks me for 4 images, but it should be only 2

@sneakzttv sneakzttv removed the ready-to-merge Ready to Merge PR - this'll trigger required checks label Jul 8, 2024
sneakzttv added 2 commits July 8, 2024 15:03
Processing bool added with check to stop multiple uploads.
Description and name altered to allow null inputs whilst still allowing post call.
@sneakzttv
Copy link
Contributor Author

sneakzttv commented Jul 8, 2024

Login token error is web3auth wallet related, needs a null check, will fix in another PR as it's out of scope.

Marketplace description & name has been made optional.

Image uploads should be at 2 images now instead of 4.

sneakzttv added 3 commits July 8, 2024 23:44
This reverts commit 1d91ed4, reversing
changes made to 90be72c.
processing bool was missing a reset after execution.
@sneakzttv sneakzttv added the ready-to-merge Ready to Merge PR - this'll trigger required checks label Jul 8, 2024
public string cursor { get; set; }
public List<Item> items { get; set; }
public List<Owners> owners { get; set; }
#region ProjectMarketplaces
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be moved to Samples too (if you still need it), otherwise, we are going to have two implementations of the same thing in the package.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to be clear, I'm talking about the whole implementation, not just this file.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will clean it up in next PR, too many changes in this one.

namespace ChainSafe.Gaming.Marketplace
// <copyright file="MarketplaceItemStatus.cs" company="PlaceholderCompany">
// Copyright (c) PlaceholderCompany. All rights reserved.
// </copyright>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this placeholder header pls and update from dev. After you update, lint.bat will no longer generate this bs in the files of Marketplace project.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

MarketplaceItemStatus? filterStatus = null,
MarketplaceSortType sortType = MarketplaceSortType.None,
MarketplaceSortOrder? sortOrder = null)
public Task<MarketplacePage> LoadPage(MarketplacePage? prevPage = null)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like it overwrites the recent marketplace update. Please make sure this doesn't get written to dev.

Copy link
Contributor Author

@sneakzttv sneakzttv Jul 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@sneakzttv sneakzttv removed the ready-to-merge Ready to Merge PR - this'll trigger required checks label Jul 10, 2024
@sneakzttv
Copy link
Contributor Author

conflicts are messy, need to fix

@sneakzttv
Copy link
Contributor Author

closing for #1057

@sneakzttv sneakzttv closed this Jul 10, 2024
@sneakzttv sneakzttv deleted the sneakz/marketplace-prefab branch July 10, 2024 15:40
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.

4 participants