mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
tx state history - append note to first op of diff
This commit is contained in:
parent
c9c0e6f674
commit
df59ef9942
@ -20,8 +20,11 @@ function migrateFromSnapshotsToDiffs(longHistory) {
|
||||
)
|
||||
}
|
||||
|
||||
function generateHistoryEntry(previousState, newState) {
|
||||
return jsonDiffer.compare(previousState, newState)
|
||||
function generateHistoryEntry(previousState, newState, note) {
|
||||
const entry = jsonDiffer.compare(previousState, newState)
|
||||
// Add a note to the first op, since it breaks if we append it to the entry
|
||||
if (note && entry[0]) entry[0].note = note
|
||||
return entry
|
||||
}
|
||||
|
||||
function replayHistory(shortHistory) {
|
||||
|
Loading…
Reference in New Issue
Block a user