SiaFoundation / walletd

A new Sia wallet
https://sia.tech/software/walletd
MIT License
14 stars 9 forks source link

Client-side exception in personal mode #150

Closed n8maninger closed 3 months ago

n8maninger commented 3 months ago

Getting the error A.data.spentSiacoinElements.reduce when loading a wallet with received events in "personal" index mode. Since the input f882471974c48c6410b2f63e9be072b4bd710b18712e5de35c3b646044257292 is not relevant to one of my wallet addresses, spentSiacoinElements is null.

This transaction should show +500 SC (500 SC inflow - 0 SC outflow)

[
    {
        "id": "h:85e850176d6b7d775a69e2cb523ceebbebfab3467d8752e79e3757d08d64aa84",
        "index": {
            "height": 78257,
            "id": "bid:0000000000000000000000000000000000000000000000000000000000000000"
        },
        "timestamp": "2024-07-09T15:46:59.800284-07:00",
        "maturityHeight": 78258,
        "type": "v1Transaction",
        "data": {
            "transaction": {
                "siacoinInputs": [
                    {
                        "parentID": "scoid:f882471974c48c6410b2f63e9be072b4bd710b18712e5de35c3b646044257292",
                        "unlockConditions": {
                            "timelock": 0,
                            "publicKeys": [
                                "ed25519:afe8e21257d6e2eb2ee72acb0b3e092e68c47a7ecacd8059f832462e45fe4b48"
                            ],
                            "signaturesRequired": 1
                        }
                    }
                ],
                "siacoinOutputs": [
                    {
                        "value": "500000000000000000000000000",
                        "address": "addr:944d162e3bdd7d3080b56ca29db937c9be085f5a97d56e90e8ef2afca00aba439614be5e4843"
                    },
                    {
                        "value": "999847356000000000000000000000000",
                        "address": "addr:241352c83da002e61f57e96b14f3a5f8b5de22156ce83b753ea495e64f1affebae88736b2347"
                    }
                ],
                "minerFees": [
                    "1000000000000000000000000"
                ],
                "signatures": [
                    {
                        "parentID": "h:f882471974c48c6410b2f63e9be072b4bd710b18712e5de35c3b646044257292",
                        "publicKeyIndex": 0,
                        "coveredFields": {
                            "wholeTransaction": true
                        },
                        "signature": "WSvcr6bPVmZs9W6jSajPslsS/PKzhski1pkeNYP3WRml6vKjcGCZtPK6sKwJTiR68wAs4+BrX8D6I11TaybSAg=="
                    }
                ]
            },
            "spentSiacoinElements": null,
            "spentSiafundElements": null
        },
        "relevant": [
            "addr:944d162e3bdd7d3080b56ca29db937c9be085f5a97d56e90e8ef2afca00aba439614be5e4843"
        ]
    }
]