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

walletd maturity height, walletd events update #621

Merged
merged 1 commit into from
May 8, 2024

Conversation

alexfreska
Copy link
Member

@alexfreska alexfreska commented May 7, 2024

  • Updated wallet events to include maturityHeight and renamed val to data.
  • The events list now shows the maturity height, transactions that have not reached this height are shown as locked.
Screenshot 2024-05-08 at 8 54 32 AM

Copy link

changeset-bot bot commented May 7, 2024

🦋 Changeset detected

Latest commit: 20d9935

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 5 packages
Name Type
walletd Minor
@siafoundation/walletd-types Minor
@siafoundation/walletd-js Patch
@siafoundation/walletd-mock Patch
@siafoundation/walletd-react Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Member Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @alexfreska and the rest of your teammates on Graphite Graphite

@alexfreska alexfreska changed the title fix: walletd events update fix: walletd maturity height, walletd events update May 7, 2024
@alexfreska alexfreska changed the title fix: walletd maturity height, walletd events update walletd maturity height, walletd events update May 7, 2024
@n8maninger
Copy link
Member

n8maninger commented May 7, 2024

Does it make sense to show both height and maturity height? That may get confusing to see both when most transactions mature instantly. My gut says show maturity height labeled as height, but it may make more sense to users the other way around.

Related: currently, events are sorted by maturity height. That means immature payouts are always at the top. I'm on the fence on whether that's fine UX or confusing. Maybe they should be sorted by the height they were received instead?

@alexfreska
Copy link
Member Author

Does it make sense to show both height and maturity height? That may get confusing to see both when most transactions mature instantly. My gut says show maturity height labeled as height, but it may make more sense to users the other way around.

Related: currently, events are sorted by maturity height. That means immature payouts are always at the top. I'm on the fence on whether that's fine UX or confusing. Maybe they should be sorted by the height they were received instead?

@n8maninger

  • I can combine the maturity height into one height column that displays both values in some way.
  • I think sorting by maturity height makes sense for 90% of users, maybe we could also offer timestamp or height sorting options.

@alexfreska
Copy link
Member Author

@n8maninger let me know what you think of the updated screenshot.

@alexfreska alexfreska force-pushed the fix_walletd_events_update branch 2 times, most recently from 8079936 to 6cc16c3 Compare May 7, 2024 19:08
@n8maninger
Copy link
Member

n8maninger commented May 7, 2024

@alexfreska that's super nice. Looks like the amount isn't showing though. The value should be in data.siacoinOutput.siacoinOutput.value

{
  "id": "h:8fd182dd7ae4df47ae2dbaffe6a4c20fe81eef103e0f152e90fe38ee091c8f9a",
  "timestamp": "2023-11-13T02:02:34Z",
  "index": {
    "height": 43750,
    "id": "bid:0000000123932498c50eb356df7749f6db871227dc20a68a610cb537989249fe"
  },
  "maturityHeight": 43895,
  "relevant": [
    "addr:27a37a46b524361f0dd21017a5ec73f05686d36c388e3833b633e4830a58cb529852ffc8c94f"
  ],
  "type": "contract payout",
  "data": {
    "fileContract": {
      "id": "h:e1f158a2585b18c178bd7d80b90182941283db9a775be07f0454f289cb151517",
      "leafIndex": 149013,
      "merkleProof": [
        "h:f8595d0a5b8f589d63535eeb594320fff585ff5fcb591a08a4e6797bc34f4b3d",
        "h:1dd50c195d802ffa071d14f51a77d7f1d1a4ed19bd2b59da43d6f29b3b8b6df0",
        "h:7705f21aeeb929fb90bd3b363a13c29da6350b680e23e727f5271c03ac9b37d2",
        "h:a7b5a697bc8f7234a08c7ee7129725ea7b4a7c34fb7c864ea50b353766178169",
        "h:b77a6474eeca8e9c76900b99340c88421009a39358b224b576880b91a76b012e",
        "h:772d4338c069e629c92a6163d6a8bd1d9a82a0aa2d1cd5cc5416d305b060684c",
        "h:a659a68e9c6f74e9cdbe8abd0fb51494c58c51653f96e78257a935103d9c46d0",
        "h:63b2d8da34c7162fe290c20ea43107a58650ea811477d06512c6e36ddb1cb426",
        "h:58c9effcc34c6bf7e16392613cee45675560b8e47ff8fc3c1e014cda81425e50",
        "h:2e01cdcab01f8b4e3462e3c5e715db1f8bf169a05d58bdcd7d66d6da06ea232e",
        "h:ef46e5080275ef135b2873886fe4f014e3703eea604d517718626aeae1abfbde"
      ],
      "fileContract": {
        "filesize": 41943040,
        "fileMerkleRoot": "h:40d784a14422c7294cfef4d5d2eedac5a50f7fba3d4d0aad647ab4545b70d8a4",
        "windowStart": 43749,
        "windowEnd": 43893,
        "payout": "319426853553597248740366",
        "validProofOutputs": [
          {
            "value": "63452897244445334568953",
            "address": "addr:7c10e2fbd6972946291d90e52c01e8c5397e74909b7aaf91a541611206cae96cdcc2c4ae4bef"
          },
          {
            "value": "243516309020561621471413",
            "address": "addr:27a37a46b524361f0dd21017a5ec73f05686d36c388e3833b633e4830a58cb529852ffc8c94f"
          }
        ],
        "missedProofOutputs": [
          {
            "value": "63452897244445334568953",
            "address": "addr:7c10e2fbd6972946291d90e52c01e8c5397e74909b7aaf91a541611206cae96cdcc2c4ae4bef"
          },
          {
            "value": "239496767687210602156213",
            "address": "addr:27a37a46b524361f0dd21017a5ec73f05686d36c388e3833b633e4830a58cb529852ffc8c94f"
          },
          {
            "value": "4019541333351019315200",
            "address": "addr:000000000000000000000000000000000000000000000000000000000000000089eb0d6a8a69"
          }
        ],
        "unlockHash": "h:99d052eb65e4ebab6ea4639c121d6b47c1114aaae1e50dd60bf03df7869e3cb8",
        "revisionNumber": 16
      }
    },
    "siacoinOutput": {
      "id": "h:8fd182dd7ae4df47ae2dbaffe6a4c20fe81eef103e0f152e90fe38ee091c8f9a",
      "leafIndex": 149577,
      "merkleProof": null,
      "siacoinOutput": {
        "value": "243516309020561621471413",
        "address": "addr:27a37a46b524361f0dd21017a5ec73f05686d36c388e3833b633e4830a58cb529852ffc8c94f"
      },
      "maturityHeight": 43894
    },
    "missed": false
  }
}

@alexfreska
Copy link
Member Author

@alexfreska that's super nice. Looks like the amount isn't showing though. The value should be in data.siacoinOutput.siacoinOutput.value

@n8maninger ah good catch, fixed.

@alexfreska alexfreska merged commit 0e39388 into main May 8, 2024
10 checks passed
@alexfreska alexfreska deleted the fix_walletd_events_update branch June 7, 2024 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants