This pull request includes updates to the asset purchase flow in both the frontend and backend, improving the handling of transaction statuses and refining the smart contract interaction for asset management.
Summary
Updated the AssetItem component in client/src/components/marketplace/AssetItem.tsx to check for a boolean true value instead of a string 'success' to determine the outcome of an asset purchase.
Modified the purchase_asset function in server/app/api/routes.py to destructure the response from sc_manager.purchase_asset into success and transaction_details variables for clearer and more direct access to these values.
Refined error handling in the get_asset_details method within server/app/blockchain/smart_contracts.py by consolidating exception handling, ensuring that asset details retrieval errors are more efficiently managed.
Adjusted the create_asset transaction configuration in server/app/blockchain/smart_contracts.py to specify a fixed gas limit and gas price, enhancing the predictability of transaction costs.
These changes aim to streamline the asset purchase process, improve error handling in smart contract interactions, and ensure more consistent transaction configuration for asset creation.
Fixes #23.
🎉 Latest improvements to Sweep:
New dashboard launched for real-time tracking of Sweep issues, covering all stages from search to coding.
Integration of OpenAI's latest Assistant API for more efficient and reliable code planning and editing, improving speed by 3x.
PR Feedback (click)
Description
This pull request includes updates to the asset purchase flow in both the frontend and backend, improving the handling of transaction statuses and refining the smart contract interaction for asset management.
Summary
AssetItem
component inclient/src/components/marketplace/AssetItem.tsx
to check for a booleantrue
value instead of a string'success'
to determine the outcome of an asset purchase.purchase_asset
function inserver/app/api/routes.py
to destructure the response fromsc_manager.purchase_asset
intosuccess
andtransaction_details
variables for clearer and more direct access to these values.get_asset_details
method withinserver/app/blockchain/smart_contracts.py
by consolidating exception handling, ensuring that asset details retrieval errors are more efficiently managed.create_asset
transaction configuration inserver/app/blockchain/smart_contracts.py
to specify a fixed gas limit and gas price, enhancing the predictability of transaction costs.These changes aim to streamline the asset purchase process, improve error handling in smart contract interactions, and ensure more consistent transaction configuration for asset creation.
Fixes #23.
🎉 Latest improvements to Sweep:
💡 To get Sweep to edit this pull request, you can:
This is an automated message generated by Sweep AI.