feat(MintToken): Add param `artworkCropRect` in the UI minting chain

Added new parameter `artworkCropRect` from initial UI mint signal to the store.
This commit is contained in:
Noelia 2023-05-08 13:33:49 +02:00 committed by Noelia
parent 7bcf42a7ed
commit 6602ab15e2
3 changed files with 10 additions and 5 deletions

View File

@ -47,7 +47,8 @@ SettingsPageLayout {
bool selfDestruct, bool selfDestruct,
int chainId, int chainId,
string accountName, string accountName,
string accountAddress) string accountAddress,
var artworkCropRect)
signal signMintTransactionOpened(int chainId, string accountAddress) signal signMintTransactionOpened(int chainId, string accountAddress)
@ -227,7 +228,8 @@ SettingsPageLayout {
selfDestruct, selfDestruct,
chainId, chainId,
accountName, accountName,
d.accountAddress) d.accountAddress,
artworkCropRect)
stackManager.clear(d.initialViewState, StackView.Immediate) stackManager.clear(d.initialViewState, StackView.Immediate)
} }

View File

@ -299,7 +299,8 @@ StatusSectionLayout {
selfDestruct, selfDestruct,
chainId, chainId,
artworkSource, artworkSource,
accountName) accountName,
artworkCropRect)
} }
onSignSelfDestructTransactionOpened: communityTokensStore.computeSelfDestructFee(chainId) onSignSelfDestructTransactionOpened: communityTokensStore.computeSelfDestructFee(chainId)
onRemoteSelfDestructCollectibles: { onRemoteSelfDestructCollectibles: {

View File

@ -19,11 +19,13 @@ QtObject {
// Minting tokens: // Minting tokens:
function deployCollectible(communityId, accountAddress, name, symbol, description, supply, function deployCollectible(communityId, accountAddress, name, symbol, description, supply,
infiniteSupply, transferable, selfDestruct, chainId, artworkSource, accountName) infiniteSupply, transferable, selfDestruct, chainId, artworkSource, accountName, artworkCropRect)
{ {
// TODO: Backend needs to create new role `accountName` and update this call accordingly // TODO: Backend needs to create new role `accountName` and update this call accordingly
// TODO: Backend needs to modify the call to expect an image JSON file with cropped artwork information:
const jsonArtworkFile = Utils.getImageAndCropInfoJson(artworkSource, artworkCropRect)
communityTokensModuleInst.deployCollectible(communityId, accountAddress, name, symbol, description, supply, communityTokensModuleInst.deployCollectible(communityId, accountAddress, name, symbol, description, supply,
infiniteSupply, transferable, selfDestruct, chainId, artworkSource) infiniteSupply, transferable, selfDestruct, chainId, artworkSource/*instead: jsonArtworkFile*/)
} }
readonly property Connections connections: Connections { readonly property Connections connections: Connections {