updateTransactionHash

Once metamask transaction is confirmed, updateTransactionHash mutation is called to complete the buy process by transferring the NFT ownership and creating order histories.

Sample mutation

mutation updateTransactionHash(
  $nftTokenId: UUID1!
  $orgId: UUID1!
  $orderId: UUID1
  $transactionHash: String!
  $buyerAddress: String!
) {
  updateTransactionHash(
    nftTokenId: $nftTokenId
    orgId: $orgId
    orderId: $orderId
    transactionHash: $transactionHash
    buyerAddress: $buyerAddress
  ) {
    success
    order {
      id
      nftTokenId
      fixedPrice
      price {
        value
        unit
        type
        __typename
      }
      __typename
    }
    newNFTID
    tokenOwnerUsername
    __typename
  }
}

Sample variable

{
  "nftTokenId": "ba7be6d2-0294-4eca-b124-a9c46dbb11bc",
  "orgId": "f2f5c627-5421-4c40-9913-edfd09dd98b3",
  "transactionHash": "0x6c6fcc27e74edca9cea1a2173998bc3f8878f6075d6d11ff73602a90b6d49dc4",
  "buyerAddress": "0x823e14E47EaB5118FDd9d55BB4bd55C415255AF7",
  "orderId": "304d276e-2600-460e-8f19-aeaf708f607b"
}

Sample response

{
  "data": {
    "updateTransactionHash": {
      "success": false,
      "order": {
        "id": "304d276e-2600-460e-8f19-aeaf708f607b",
        "nftTokenId": "ba7be6d2-0294-4eca-b124-a9c46dbb11bc",
        "fixedPrice": 0.04,
        "price": [
          {
            "value": 62.9404,
            "unit": "USD",
            "type": "FIAT",
            "__typename": "NFTPrice"
          },
          {
            "value": 0.04,
            "unit": "ETH",
            "type": "CRYPTO",
            "__typename": "NFTPrice"
          }
        ],
        "__typename": "Order"
      },
      "newNFTID": "ba7be6d2-0294-4eca-b124-a9c46dbb11bc",
      "tokenOwnerUsername": "gayathri",
      "__typename": "TransactionResponse"
    }
  }
}

Arguments

NameTypeDescriptionRequired
nftTokenIdUUIDNft token id.Yes
orgIdUUIDThe organization ID.Yes
orderIdUUIDListing order id.Yes
buyerAddressStringBuyer wallet address.Yes
transactionHashStringTransaction hash of NFT transfer.Yes

Fields

NameTypeDescription
TransactionResponseObjectContains all the information from TransactionResponse such as the order, new nft id, buyer and seller wallet info and etc..

Example

To transfer the NFT ownership and respective status.