Closed n8maninger closed 2 weeks ago
@alexfreska this is also a bug in the backend, but it will end up breaking the frontend.
@alexfreska this is also a bug in the backend, but it will end up breaking the frontend.
No problem, I can put in a fix and add a test for the value in the UI e2e tests.
@alexfreska #135 has been merged, see https://github.com/SiaFoundation/walletd/pull/135#issue-2352249776 for API structure changes
@n8maninger what are the possible values of V2FileContractResolutionType
?
@alexfreska
{
"id": "h:0000000000000000000000000000000000000000000000000000000000000000",
"index": {
"height": 0,
"id": "bid:0000000000000000000000000000000000000000000000000000000000000000"
},
"timestamp": "0001-01-01T00:00:00Z",
"maturityHeight": 0,
"type": "v2ContractResolution",
"data": {
"parent": {
"id": "h:0000000000000000000000000000000000000000000000000000000000000000",
"leafIndex": 0,
"merkleProof": null,
"v2FileContract": {
"filesize": 0,
"fileMerkleRoot": "h:0000000000000000000000000000000000000000000000000000000000000000",
"proofHeight": 0,
"expirationHeight": 0,
"renterOutput": {
"value": "0",
"address": "addr:000000000000000000000000000000000000000000000000000000000000000089eb0d6a8a69"
},
"hostOutput": {
"value": "0",
"address": "addr:000000000000000000000000000000000000000000000000000000000000000089eb0d6a8a69"
},
"missedHostValue": "0",
"totalCollateral": "0",
"renterPublicKey": "ed25519:0000000000000000000000000000000000000000000000000000000000000000",
"hostPublicKey": "ed25519:0000000000000000000000000000000000000000000000000000000000000000",
"revisionNumber": 0,
"renterSignature": "sig:00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"hostSignature": "sig:00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
}
},
"type": "expiration",
"resolution": {}
}
}
{
"id": "h:0000000000000000000000000000000000000000000000000000000000000000",
"index": {
"height": 0,
"id": "bid:0000000000000000000000000000000000000000000000000000000000000000"
},
"timestamp": "0001-01-01T00:00:00Z",
"maturityHeight": 0,
"type": "v2ContractResolution",
"data": {
"parent": {
"id": "h:0000000000000000000000000000000000000000000000000000000000000000",
"leafIndex": 0,
"merkleProof": null,
"v2FileContract": {
"filesize": 0,
"fileMerkleRoot": "h:0000000000000000000000000000000000000000000000000000000000000000",
"proofHeight": 0,
"expirationHeight": 0,
"renterOutput": {
"value": "0",
"address": "addr:000000000000000000000000000000000000000000000000000000000000000089eb0d6a8a69"
},
"hostOutput": {
"value": "0",
"address": "addr:000000000000000000000000000000000000000000000000000000000000000089eb0d6a8a69"
},
"missedHostValue": "0",
"totalCollateral": "0",
"renterPublicKey": "ed25519:0000000000000000000000000000000000000000000000000000000000000000",
"hostPublicKey": "ed25519:0000000000000000000000000000000000000000000000000000000000000000",
"revisionNumber": 0,
"renterSignature": "sig:00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"hostSignature": "sig:00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
}
},
"type": "finalization",
"resolution": {
"filesize": 0,
"fileMerkleRoot": "h:0000000000000000000000000000000000000000000000000000000000000000",
"proofHeight": 0,
"expirationHeight": 0,
"renterOutput": {
"value": "0",
"address": "addr:000000000000000000000000000000000000000000000000000000000000000089eb0d6a8a69"
},
"hostOutput": {
"value": "0",
"address": "addr:000000000000000000000000000000000000000000000000000000000000000089eb0d6a8a69"
},
"missedHostValue": "0",
"totalCollateral": "0",
"renterPublicKey": "ed25519:0000000000000000000000000000000000000000000000000000000000000000",
"hostPublicKey": "ed25519:0000000000000000000000000000000000000000000000000000000000000000",
"revisionNumber": 0,
"renterSignature": "sig:00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"hostSignature": "sig:00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
}
}
}
{
"id": "h:0000000000000000000000000000000000000000000000000000000000000000",
"index": {
"height": 0,
"id": "bid:0000000000000000000000000000000000000000000000000000000000000000"
},
"timestamp": "0001-01-01T00:00:00Z",
"maturityHeight": 0,
"type": "v2ContractResolution",
"data": {
"parent": {
"id": "h:0000000000000000000000000000000000000000000000000000000000000000",
"leafIndex": 0,
"merkleProof": null,
"v2FileContract": {
"filesize": 0,
"fileMerkleRoot": "h:0000000000000000000000000000000000000000000000000000000000000000",
"proofHeight": 0,
"expirationHeight": 0,
"renterOutput": {
"value": "0",
"address": "addr:000000000000000000000000000000000000000000000000000000000000000089eb0d6a8a69"
},
"hostOutput": {
"value": "0",
"address": "addr:000000000000000000000000000000000000000000000000000000000000000089eb0d6a8a69"
},
"missedHostValue": "0",
"totalCollateral": "0",
"renterPublicKey": "ed25519:0000000000000000000000000000000000000000000000000000000000000000",
"hostPublicKey": "ed25519:0000000000000000000000000000000000000000000000000000000000000000",
"revisionNumber": 0,
"renterSignature": "sig:00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"hostSignature": "sig:00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
}
},
"type": "renewal",
"resolution": {
"finalRevision": {
"filesize": 0,
"fileMerkleRoot": "h:0000000000000000000000000000000000000000000000000000000000000000",
"proofHeight": 0,
"expirationHeight": 0,
"renterOutput": {
"value": "0",
"address": "addr:000000000000000000000000000000000000000000000000000000000000000089eb0d6a8a69"
},
"hostOutput": {
"value": "0",
"address": "addr:000000000000000000000000000000000000000000000000000000000000000089eb0d6a8a69"
},
"missedHostValue": "0",
"totalCollateral": "0",
"renterPublicKey": "ed25519:0000000000000000000000000000000000000000000000000000000000000000",
"hostPublicKey": "ed25519:0000000000000000000000000000000000000000000000000000000000000000",
"revisionNumber": 0,
"renterSignature": "sig:00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"hostSignature": "sig:00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
},
"newContract": {
"filesize": 0,
"fileMerkleRoot": "h:0000000000000000000000000000000000000000000000000000000000000000",
"proofHeight": 0,
"expirationHeight": 0,
"renterOutput": {
"value": "0",
"address": "addr:000000000000000000000000000000000000000000000000000000000000000089eb0d6a8a69"
},
"hostOutput": {
"value": "0",
"address": "addr:000000000000000000000000000000000000000000000000000000000000000089eb0d6a8a69"
},
"missedHostValue": "0",
"totalCollateral": "0",
"renterPublicKey": "ed25519:0000000000000000000000000000000000000000000000000000000000000000",
"hostPublicKey": "ed25519:0000000000000000000000000000000000000000000000000000000000000000",
"revisionNumber": 0,
"renterSignature": "sig:00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"hostSignature": "sig:00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
},
"renterRollover": "0",
"hostRollover": "0",
"renterSignature": "sig:00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"hostSignature": "sig:00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
}
}
}
{
"id": "h:0000000000000000000000000000000000000000000000000000000000000000",
"index": {
"height": 0,
"id": "bid:0000000000000000000000000000000000000000000000000000000000000000"
},
"timestamp": "0001-01-01T00:00:00Z",
"maturityHeight": 0,
"type": "v2ContractResolution",
"data": {
"parent": {
"id": "h:0000000000000000000000000000000000000000000000000000000000000000",
"leafIndex": 0,
"merkleProof": null,
"v2FileContract": {
"filesize": 0,
"fileMerkleRoot": "h:0000000000000000000000000000000000000000000000000000000000000000",
"proofHeight": 0,
"expirationHeight": 0,
"renterOutput": {
"value": "0",
"address": "addr:000000000000000000000000000000000000000000000000000000000000000089eb0d6a8a69"
},
"hostOutput": {
"value": "0",
"address": "addr:000000000000000000000000000000000000000000000000000000000000000089eb0d6a8a69"
},
"missedHostValue": "0",
"totalCollateral": "0",
"renterPublicKey": "ed25519:0000000000000000000000000000000000000000000000000000000000000000",
"hostPublicKey": "ed25519:0000000000000000000000000000000000000000000000000000000000000000",
"revisionNumber": 0,
"renterSignature": "sig:00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"hostSignature": "sig:00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
}
},
"type": "storage proof",
"resolution": {
"proofIndex": {
"id": "h:0000000000000000000000000000000000000000000000000000000000000000",
"leafIndex": 0,
"merkleProof": null,
"chainIndex": {
"height": 0,
"id": "bid:0000000000000000000000000000000000000000000000000000000000000000"
}
},
"leaf": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"proof": null
}
}
}
The calculation for pending transactions is wrong