Once a metamask transaction is confirmed, acceptOffer mutation is called to complete the offer approval process to update the transaction hash and transfer the ownership in database level and triggering the respective mails to the user.
Sample mutation
mutation acceptOffer(
$orderId: UUID1!
$orgId: UUID1!
$transactionHash: String!
) {
acceptOffer(
orderId: $orderId
orgId: $orgId
transactionHash: $transactionHash
) {
success
newNFTID
__typename
}
}
Sample variable
{
"orderId": "b2d7ad12-9515-470d-b393-22e2d6b5ee0c",
"orgId": "f2f5c627-5421-4c40-9913-edfd09dd98b3",
"transactionHash": "0xb54cefb4f32f97d9e38954837c865cb5a2f2a1c2dff7bef6dcf0c4476b212229"
}
Sample response
{
"data": {
"acceptOffer": {
"success": true,
"newNFTID": "ba7be6d2-0294-4eca-b124-a9c46dbb11bc",
"__typename": "TransactionResponse"
}
}
}
Arguments
Name | Type | Description | Required |
---|---|---|---|
orderId | UUID | Update status as rejected against the order id | Yes |
orgId | UUID | The organization id | Yes |
transactionHash | String | Metamask transaction address | Yes |
Fields
Name | Type | Description |
---|---|---|
acceptOffer | Object | An object that contains the accept offer status and new NFT id. |