Open apbendi opened 4 years ago
Riffing on possible ways to do this, perhaps store a large JSON object with TX IDs as keys, and an array of entries for each TXID summarizing some event.
Roughly:
{
"txidnumber1": {
to: "kaspatest:whatevertheaddressis",
amount: "100000000",
fee: "1000",
note: "This is my cool transaction",
events: [
{event: "Created", timestamp: "1597442372"},
{event: "Processing", timestamp: "1597442376"},
]
},
"txidnumber2": {
to: "kaspatest:whatevertheaddressis",
amount: "160000000",
fee: "2000",
note: "This is my next cool transaction",
events: [
{event: "Created", timestamp: "1597442372"},
{event: "Processing", timestamp: "1597442376"},
{event: "Failure", timestamp: "1597442376", code: 1234, message: "Insufficient funds"},
]
},
}
Issue 7.1.1 & 7.2.1 & 7.3.1
Create a log file that will store transaction history data. This could be in local storage, but perhaps we need to consider a file/blob storage in Index DB to avoid file size limits, given we're already having trouble with the cache for lots of txs.
Log file can be any form of structured data— maybe JSON where key is the tx ID? Other obvious option would be a CSV.
Should record the following data when sending a transaction:
When a transaction fails, it should log:
Possibly log confirmations? This does not make much sense without MQTT. Pending feedback from client: What, if anything, do we do about confirmations right now.