Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decodes all Atomicals outputs with the transaction #233

Merged
merged 9 commits into from
Nov 21, 2024

Conversation

wizz-wallet-dev
Copy link
Collaborator

@wizz-wallet-dev wizz-wallet-dev commented Oct 5, 2024

When building transaction details, only output at 0 index will be deserialized, this is not always correct when minting subrealm using the direct mode since it will merge the parent realm and the subrealm into a single UTXO.

Before

{
  "atomical_id": "88883d9c3f599784cbc17ddc48cb4fb0695e0b3e28f3acde850ea9d0ce97abcdi0",
  "location_id": "46fb74271f75ba1dbe80b33e897b543a06143aac1c5ef65cae87ec814b89abcdi0",
  "outputs": {
    "0": [
      {
        "address": "tb1pethmmnjaunvyjsfn4ykvabcdk0k6xqh6ejacavpwjmea3qwg8yuqgnabcd",
        "atomical_id": "88883d9c3f599784cbc17ddc48cb4fb0695e0b3e28f3acde850ea9d0ce97abcdi0",
        "index": 0,
        "type": "NFT",
        "value": 546
      }
    ]
  },
  "payload": {
    "args": {
      "claim_type": "direct",
      "parent_realm": "88883d9c3f599784cbc17ddc48cb4fb0695e0b3e28f3acde850ea9d0ce97abcdi0",
      "request_subrealm": "1"
    }
  }
}

After

{
- "atomical_id": "88883d9c3f599784cbc17ddc48cb4fb0695e0b3e28f3acde850ea9d0ce97abcdi0",
- "location_id": "46fb74271f75ba1dbe80b33e897b543a06143aac1c5ef65cae87ec814b89abcdi0",
  "outputs": {
    "0": [
      {
        "address": "tb1pethmmnjaunvyjsfn4ykvabcdk0k6xqh6ejacavpwjmea3qwg8yuqgnabcd",
+       "atomical_id": "ba4de8724b857f05b2e193da6f1c6b11ea25b53717f604389c1ec2a5c22dabcdi0",
+       "location_id": "46fb74271f75ba1dbe80b33e897b543a06143aac1c5ef65cae87ec814b89abcdi0",
        "type": "NFT",
        "index": 0,
        "value": 546
      }
    ]
  },
  "payload": {
    "args": {
      "claim_type": "direct",
      "parent_realm": "88883d9c3f599784cbc17ddc48cb4fb0695e0b3e28f3acde850ea9d0ce97abcdi0",
      "request_subrealm": "1"
    }
  }
}

@wizz-wallet-dev wizz-wallet-dev marked this pull request as ready for review October 6, 2024 07:13
Copy link
Collaborator

@shadowv0vshadow shadowv0vshadow left a comment

Choose a reason for hiding this comment

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

LGTM

@wizz-wallet-dev wizz-wallet-dev merged commit 8060bb1 into develop Nov 21, 2024
4 checks passed
@wizz-wallet-dev wizz-wallet-dev deleted the fix/transactions-decode branch November 21, 2024 07:58
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.

3 participants